|
siplasplas
A library for C++ reflection and introspection
|
Stores dynamic reflection information of a namespace. More...
#include <siplasplas/reflection/dynamic/namespace.hpp>
Public Member Functions | |
| Namespace & | namespace_ (const std::string &name) |
| Returns dynamic reflection information of a nested namespace. More... | |
| Class & | class_ (const std::string &name) |
| Returns reflection information of a member class type. More... | |
| Enum & | enum_ (const std::string &name) |
| Returns reflection information of a member enumeration type. More... | |
Public Member Functions inherited from cpp::dynamic_reflection::Entity | |
| Entity & | parent () |
| Returns a reference to the parent entity The behavior is undefined if the entity has no parent entity (See orphan()) | |
| Runtime & | runtime () |
| Returns a reference to the runtime where the entity is registered. More... | |
| const SourceInfo & | sourceInfo () const |
| Returns source information about the entity. | |
| const std::string & | name () const |
| Returns the name of the entity. | |
| const std::string & | fullName () const |
| Returns the full qualifies name of the entity. | |
| const SourceInfo::Kind & | kind () const |
| Returns the kind (Namespace, class, enum, member function, etc) of the entity. | |
| bool | detached () const |
| Checks whether the entity is not registered (attached) into a dynamic reflection runtime. More... | |
| bool | orphan () const |
| Checks if the entity has no parent entity. More... | |
| void | attach (Runtime &runtime) |
| Attaches the entity to a given runtime. More... | |
| void | attach (const std::weak_ptr< Entity > &parent) |
| Attaches the entity to the runtime of a given entity and links that enity as parent. More... | |
| void | addChild (const std::shared_ptr< Entity > &entity) |
| Links the given entity as child of the entity. More... | |
| bool | isChild (const std::shared_ptr< Entity > &entity) const |
| Checks if the given entity is a child entity of this entity. More... | |
| bool | isChild (const Entity &entity) const |
| Checks if the given entity is a child entity of this entity. More... | |
| bool | isChildByName (const std::string &name) const |
| Checks if the entity has a child entity with the given name. More... | |
| bool | isChildByFullName (const std::string &fullName) const |
| Checks if the entity has a child entity with the given name. More... | |
| Entity & | getChildByFullName (const std::string &fullName) |
| Returns a child entity given its full name. More... | |
| Entity & | getChildByName (const std::string &name) |
| Returns a child entity given its name. More... | |
| std::vector< std::string > | getChildrenNamesByKind (const SourceInfo::Kind &kind) |
| Returns the names of the child entities with a given kind. More... | |
| std::shared_ptr< Entity > | pointer () |
| Returns the shared pointer holding the entity object. | |
Static Public Member Functions | |
| static std::shared_ptr< Namespace > | create (const SourceInfo &sourceInfo) |
| Creates a namespace entity given its source information. More... | |
| static Namespace & | fromEntity (const std::shared_ptr< Entity > &entity) |
| Returns a reference to a namespace entity from a pointer to an entity. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from cpp::dynamic_reflection::Entity | |
| Entity (const SourceInfo &sourceInfo) | |
Stores dynamic reflection information of a namespace.
| Class& cpp::dynamic_reflection::Namespace::class_ | ( | const std::string & | name | ) |
Returns reflection information of a member class type.
The behavior is undefined if the namespace has no nested class registered with that name
| name | Name of the member class |
|
static |
Creates a namespace entity given its source information.
| sourceInfo | Nmaespace source information |
| Enum& cpp::dynamic_reflection::Namespace::enum_ | ( | const std::string & | name | ) |
Returns reflection information of a member enumeration type.
The behavior is undefined if the namespace has no member enumeration registered with that name
| name | Name of the member enumeration type |
|
static |
Returns a reference to a namespace entity from a pointer to an entity.
This namespace performs an entity cast from a generic entity pointer to a namespace entity. The behavior is undefined if the entity is not a namespace (See Entity::kind())
| entity | A shared pointer to an entity |
| Namespace& cpp::dynamic_reflection::Namespace::namespace_ | ( | const std::string & | name | ) |
Returns dynamic reflection information of a nested namespace.
| name | Nested namespace name |