DPsim
Loading...
Searching...
No Matches
CPS::IdentifiedObject Class Reference

#include <IdentifiedObject.h>

Inheritance diagram for CPS::IdentifiedObject:
[legend]
Collaboration diagram for CPS::IdentifiedObject:
[legend]

Public Types

typedef std::shared_ptr< IdentifiedObjectPtr
 
typedef std::vector< Ptr > List
 

Public Member Functions

 IdentifiedObject (const String &uid, const String &name)
 
 IdentifiedObject (const String &name)
 
AttributeBase::Ptr attribute (const String &name) const
 Return pointer to an attribute.
 
template<typename T>
Attribute< T >::Ptr attributeTyped (const String &name) const
 Return pointer to an attribute.
 
const AttributeBase::Map & attributes () const
 
String name ()
 
String uid ()
 Returns unique id.
 
String type ()
 Get component type (cross-platform)
 
virtual String description ()
 

Public Attributes

const Attribute< String >::Ptr mName
 Human readable name.
 
const Attribute< String >::Ptr mUID
 Unique identifier.
 

Protected Attributes

AttributeList::Ptr mAttributes = AttributeList::make()
 Attribute List.
 

Detailed Description

Common base class of all objects which are identified by a name and an unique identifier (UID).

Definition at line 19 of file IdentifiedObject.h.

Member Typedef Documentation

◆ List

typedef std::vector<Ptr> CPS::IdentifiedObject::List

Definition at line 31 of file IdentifiedObject.h.

◆ Ptr

typedef std::shared_ptr<IdentifiedObject> CPS::IdentifiedObject::Ptr

Definition at line 30 of file IdentifiedObject.h.

Constructor & Destructor Documentation

◆ IdentifiedObject() [1/3]

CPS::IdentifiedObject::IdentifiedObject ( )
inline

Definition at line 33 of file IdentifiedObject.h.

◆ IdentifiedObject() [2/3]

CPS::IdentifiedObject::IdentifiedObject ( const String & uid,
const String & name )
inline

Definition at line 35 of file IdentifiedObject.h.

◆ IdentifiedObject() [3/3]

CPS::IdentifiedObject::IdentifiedObject ( const String & name)
inlineexplicit

Definition at line 39 of file IdentifiedObject.h.

Member Function Documentation

◆ attribute()

AttributeBase::Ptr CPS::IdentifiedObject::attribute ( const String & name) const
inline

Return pointer to an attribute.

Definition at line 45 of file IdentifiedObject.h.

◆ attributes()

const AttributeBase::Map & CPS::IdentifiedObject::attributes ( ) const
inline

Definition at line 55 of file IdentifiedObject.h.

◆ attributeTyped()

template<typename T>
Attribute< T >::Ptr CPS::IdentifiedObject::attributeTyped ( const String & name) const
inline

Return pointer to an attribute.

Definition at line 51 of file IdentifiedObject.h.

◆ description()

virtual String CPS::IdentifiedObject::description ( )
inlinevirtual

Definition at line 65 of file IdentifiedObject.h.

◆ name()

String CPS::IdentifiedObject::name ( )
inline

Definition at line 59 of file IdentifiedObject.h.

◆ type()

String CPS::IdentifiedObject::type ( )
inline

Get component type (cross-platform)

Definition at line 63 of file IdentifiedObject.h.

◆ uid()

String CPS::IdentifiedObject::uid ( )
inline

Returns unique id.

Definition at line 61 of file IdentifiedObject.h.

Member Data Documentation

◆ mAttributes

AttributeList::Ptr CPS::IdentifiedObject::mAttributes = AttributeList::make()
protected

Attribute List.

Definition at line 22 of file IdentifiedObject.h.

◆ mName

const Attribute<String>::Ptr CPS::IdentifiedObject::mName

Human readable name.

Definition at line 26 of file IdentifiedObject.h.

◆ mUID

const Attribute<String>::Ptr CPS::IdentifiedObject::mUID

Unique identifier.

Definition at line 28 of file IdentifiedObject.h.


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