$darkmode
cloe::Entity Class Reference

#include <entity.hpp>

Inheritance diagram for cloe::Entity:

Public Member Functions

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

Protected Member Functions

virtual Logger logger () const
 

Protected Attributes

std::string name_
 
std::string desc_
 

Friends

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

Detailed Description

An Entity is the base class for all named objects.

Member Function Documentation

◆ description()

const 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()

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

Return the name of the Entity.

Here is the caller graph for this function:

◆ set_description()

void cloe::Entity::set_description ( std::string  desc)
inline

Set the free-form description of the entity.

Here is the caller graph for this function:

◆ set_name()

void cloe::Entity::set_name ( 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 call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ to_json

void to_json ( fable::Json j,
const Entity e 
)
friend

Return JSON representation of an Entity.


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