#include <Named.hh>
Public Member Functions | |
Named () | |
Default constructor. | |
Named (const std::string newName) | |
Constructor with inital value. | |
virtual | ~Named () |
Virtual destructor. | |
virtual void | setName (const std::string newName) |
Set name. | |
virtual void | setName (const char *newName) |
Set name (char* version). | |
virtual const std::string & | getName () const |
Get name. | |
virtual const char * | getCName () const |
Get C-style name. | |
bool | isNamed (const std::string &newName) const |
Check if the name matches the provided parameter. | |
Static Public Member Functions | |
static bool | validateHLAName (const std::string &name) |
This method check if the provided name respects the HLA named object specifications, IEEE-1516.2-2000 (§3.3.1 Names). | |
static bool | isQualifiedClassName (const std::string &name) |
Check if the provided name is a qualified class name. | |
static std::string | getNextClassName (std::string &qualifiedClassName) |
Get next class name component. | |
static std::string | getLeafClassName (std::string qualifiedClassName) |
Get leaf class name component. | |
Protected Attributes | |
std::string | name |
Classes | |
class | IsNamed |
This class should be used to handle HLA named object the setName method should enforce HLA rules for naming scheme as specified in IEEE-1516.2-2000 (§3.3.1 Names) "IEEE Standard for Modeling and Simulation (M&S) High Level Architecture (HLA)—Object Model Template (OMT) Specification"
Definition at line 41 of file Named.hh.
Named | ( | ) |
Named | ( | const std::string | newName | ) |
~Named | ( | ) | [virtual] |
void setName | ( | const std::string | newName | ) | [virtual] |
Set name.
[in] | name | the new name |
Definition at line 37 of file Named.cc.
References Named::name.
Referenced by certi::fedparser::addDimension(), certi::fedparser::addParameter(), Interaction::Interaction(), Object::Object(), ObjectClassAttribute::ObjectClassAttribute(), and certi::fedparser::startSpace().
void setName | ( | const char * | newName | ) | [virtual] |
Set name (char* version).
[in] | name | the new name |
Definition at line 43 of file Named.cc.
References Named::name.
const std::string & getName | ( | ) | const [virtual] |
Get name.
Definition at line 48 of file Named.cc.
References Named::name.
Referenced by Interaction::addParameter(), RoutingSpace::display(), Interaction::getParameterName(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), ObjectClassAttribute::ObjectClassAttribute(), and Named::IsNamed::operator()().
const char * getCName | ( | ) | const [virtual] |
Get C-style name.
Definition at line 55 of file Named.cc.
References Named::name.
Referenced by ObjectClass::getAttributeName().
bool isNamed | ( | const std::string & | newName | ) | const |
Check if the name matches the provided parameter.
name | String to compare |
Definition at line 61 of file Named.cc.
References Named::name.
Referenced by ObjectClass::attributeOwnershipAcquisition(), ObjectClass::attributeOwnershipAcquisitionIfAvailable(), ObjectClass::attributeOwnershipReleaseResponse(), ObjectClass::negotiatedAttributeOwnershipDivestiture(), and ObjectClass::unconditionalAttributeOwnershipDivestiture().
bool validateHLAName | ( | const std::string & | name | ) | [static] |
bool isQualifiedClassName | ( | const std::string & | name | ) | [static] |
Check if the provided name is a qualified class name.
Qualified HLA class name are those beginning at root class name. In a qualified class name each component is separated by a dot '.' like in: "ObjectRoot.Bille.PositionX"
[in] | name | the name to be checked |
Definition at line 74 of file Named.cc.
Referenced by TreeNamedAndHandledSet::getHandleFromName().
std::string getNextClassName | ( | std::string & | qualifiedClassName | ) | [static] |
Get next class name component.
[in,out] | qualifiedClassName |
Definition at line 81 of file Named.cc.
Referenced by TreeNamedAndHandledSet::getHandleFromName().
std::string getLeafClassName | ( | std::string | qualifiedClassName | ) | [static] |
Get leaf class name component.
[in] | qualifiedClassName |
Definition at line 97 of file Named.cc.
Referenced by TreeNamedAndHandledSet::getHandleFromName().
std::string name [protected] |
Reimplemented in Object.
Definition at line 138 of file Named.hh.
Referenced by Interaction::addParameter(), Parameter::display(), ObjectClassAttribute::display(), ObjectClass::display(), Interaction::display(), Named::getCName(), Named::getName(), Named::isNamed(), and Named::setName().