AbstractEntityWrapper Class Reference

AbstractEntityWrapper is a superclass for all covenience classes, which provide typed access to entity attributes. More...

#include <MemoryX/core/entity/AbstractEntityWrapper.h>

+ Inheritance diagram for AbstractEntityWrapper:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AbstractEntityWrapper()

Definition at line 30 of file AbstractEntityWrapper.cpp.

◆ ~AbstractEntityWrapper()

~AbstractEntityWrapper ( )
override

Definition at line 35 of file AbstractEntityWrapper.cpp.

Member Function Documentation

◆ getEntity()

EntityBasePtr getEntity ( ) const

Get the stored name of the stored entity.

Definition at line 49 of file AbstractEntityWrapper.cpp.

+ Here is the caller graph for this function:

◆ getId()

std::string getId ( ) const

Get the identifier of the stored entity.

Definition at line 39 of file AbstractEntityWrapper.cpp.

◆ getName()

std::string getName ( ) const

Get the name of the stored entity.

Definition at line 44 of file AbstractEntityWrapper.cpp.

+ Here is the caller graph for this function:

◆ setEntity()

void setEntity ( const EntityBasePtr &  entity)

Replace the stored entity with a new one.

Parameters
entityentity to set

Definition at line 54 of file AbstractEntityWrapper.cpp.

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: