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.
 
std::string getId () const
 Get the identifier of the stored entity.
 
std::string getName () const
 Get the name of the stored entity.
 
void setEntity (const EntityBasePtr &entity)
 Replace the stored entity with a new one.
 
 ~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.

Constructor & Destructor Documentation

◆ AbstractEntityWrapper()

◆ ~AbstractEntityWrapper()

~AbstractEntityWrapper ( )
override

Member Function Documentation

◆ getEntity()

EntityBasePtr getEntity ( ) const

Get the stored name of the stored entity.

◆ getId()

std::string getId ( ) const

Get the identifier of the stored entity.

◆ getName()

std::string getName ( ) const

Get the name of the stored entity.

◆ setEntity()

void setEntity ( const EntityBasePtr & entity)

Replace the stored entity with a new one.

Parameters
entityentity to set

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