|
AbstractEntityWrapper is a superclass for all covenience classes, which provide typed access to entity attributes. More...
#include <MemoryX/core/entity/AbstractEntityWrapper.h>
Public Member Functions | |
AbstractEntityWrapper () | |
EntityBasePtr | getEntity () const |
Get the stored name of the stored entity. More... | |
std::string | getId () const |
Get the identifier of the stored entity. More... | |
std::string | getName () const |
Get the name of the stored entity. More... | |
void | setEntity (const EntityBasePtr &entity) |
Replace the stored entity with a new one. More... | |
~AbstractEntityWrapper () override | |
AbstractEntityWrapper is a superclass for all covenience classes, which provide typed access to entity attributes.
See memoryx::EntityWrappers::SimoxObjectWrapper for sample implementation.
Apart of convenience, such wrapper classes give a maintance advantage, since they encapsulate all the implementation details (attribute names, storing formats), avoiding the need to duplicate them in multiple places in client code. So it's recommended to use this approach whenever possible.
Definition at line 47 of file AbstractEntityWrapper.h.
Definition at line 30 of file AbstractEntityWrapper.cpp.
|
override |
Definition at line 35 of file AbstractEntityWrapper.cpp.
EntityBasePtr getEntity | ( | ) | const |
Get the stored name of the stored entity.
Definition at line 49 of file AbstractEntityWrapper.cpp.
std::string getId | ( | ) | const |
Get the identifier of the stored entity.
Definition at line 39 of file AbstractEntityWrapper.cpp.
std::string getName | ( | ) | const |
Get the name of the stored entity.
Definition at line 44 of file AbstractEntityWrapper.cpp.
void setEntity | ( | const EntityBasePtr & | entity | ) |
Replace the stored entity with a new one.
entity | entity to set |
Definition at line 54 of file AbstractEntityWrapper.cpp.