$darkmode
cloe::Entity Class Reference

#include <entity.hpp>

Inheritance diagram for cloe::Entity:
[legend]

Public Member Functions

 Entity (const std::string &name)
 
 Entity (const std::string &name, const std::string &desc)
 
std::string name () const
 
void set_name (const std::string &name)
 
std::string description () const
 
void set_description (const std::string &desc)
 

Protected Member Functions

virtual Logger logger () const
 

Protected Attributes

std::string name_
 
std::string desc_
 

Friends

void to_json (Json &j, const Entity &e)
 

Detailed Description

An Entity is the base class for all named objects.

Member Function Documentation

◆ description()

std::string cloe::Entity::description ( ) const
inline

Return the optional description of the Entity.

If there is no description, the empty string is returned.

Here is the caller graph for this function:

◆ logger()

virtual Logger cloe::Entity::logger ( ) const
inlineprotectedvirtual

Return the Logger that the manager should use.

Reimplemented in cloe::Action, and cloe::Event.

Here is the caller graph for this function:

◆ name()

std::string cloe::Entity::name ( ) const
inline

Return the name of the Entity.

Here is the caller graph for this function:

◆ set_name()

void cloe::Entity::set_name ( const std::string &  name)

Set the name of the Entity.

The name must conform to the following regular expression:

^[a-zA-Z_][a-zA-Z0-9_]*(/[a-zA-Z_][a-zA-Z0-9_]*)*$

That is, the following are proper names:

basic/hmi simulation/stop start _/strange_but_0k

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ to_json

void to_json ( Json &  j,
const Entity e 
)
friend

Return JSON representation of an Entity.


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