3 #include <samchon/protocol/EntityGroup.hpp> 26 template <
typename _Ty = Entity>
30 std::vector<std::shared_ptr<_Ty>>,
31 _Ty, std::shared_ptr<_Ty>
40 #define SHARED_ENTITY_ARRAY_ELEMENT_ACCESSOR_HEADER(CHILD_TYPE) \ 41 auto operator[](size_t) const -> std::shared_ptr<CHILD_TYPE>; \ 42 auto at(size_t) const -> std::shared_ptr<CHILD_TYPE>; \ 43 auto get(const std::string&) const -> std::shared_ptr<CHILD_TYPE>; 46 #define SHARED_ENTITY_ARRAY_ELEMENT_ACCESSOR_BODY(THIS_TYPE, CHILD_TYPE) \ 47 auto THIS_TYPE::operator[](size_t x) const -> std::shared_ptr<CHILD_TYPE> { return std::dynamic_pointer_cast<CHILD_TYPE>(container_type::operator[](x)); }; \ 48 auto THIS_TYPE::at(size_t x) const -> std::shared_ptr<CHILD_TYPE> { return std::dynamic_pointer_cast<CHILD_TYPE>(container_type::at(x)); }; \ 49 auto THIS_TYPE::get(const std::string &key) const -> std::shared_ptr<CHILD_TYPE> { return std::dynamic_pointer_cast<CHILD_TYPE>(samchon::protocol::EntityGroup<container_type, entity_type, value_type>::get(key)); } EntityGroup< std::vector< std::shared_ptr< _Ty >>, _Ty, std::shared_ptr< _Ty > > SharedEntityArray
An EntityGroup with vector container and children capsuled in shared pointers.
Top level namespace of products built from samchon.