torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::physical::Named Class Reference

Concept for any object that can be named. More...

#include <Named.hpp>

+ Inheritance diagram for torc::physical::Named:
+ Collaboration diagram for torc::physical::Named:

Public Member Functions

 Named (const string &inName)
 Constructor which must specify the object name. More...
 
const stringgetName (void) const
 Returns the object name. More...
 
bool operator== (const Named &rhs) const
 Equality operator. More...
 

Protected Types

typedef std::string string
 Imported type name. More...
 

Protected Attributes

string mName
 The name of the object. More...
 

Detailed Description

Concept for any object that can be named.

No support is provided at this level for renaming, because many subclasses may may require oversight from their parent to avoid name collisions.

Todo:
Add a setName() accessor to support renaming. For many design elements, this may require permission from the parent, to avoid name collisions. We could make the function virtual, but that would come at the cost of a vtable, and that's very expensive for things like Config objects. In general, the renaming should probably be managed by the Progeny<T> template.

Definition at line 36 of file Named.hpp.

Member Typedef Documentation

typedef std::string torc::physical::Named::string
protected

Imported type name.

Definition at line 40 of file Named.hpp.

Constructor & Destructor Documentation

torc::physical::Named::Named ( const string inName)
inline

Constructor which must specify the object name.

Parameters
inNameThe object name.

Definition at line 48 of file Named.hpp.

48 : mName(inName) {}
string mName
The name of the object.
Definition: Named.hpp:43

Member Function Documentation

const string& torc::physical::Named::getName ( void  ) const
inline

Returns the object name.

Definition at line 51 of file Named.hpp.

51 { return mName; }
string mName
The name of the object.
Definition: Named.hpp:43

+ Here is the caller graph for this function:

bool torc::physical::Named::operator== ( const Named rhs) const
inline

Equality operator.

Definition at line 54 of file Named.hpp.

54 { return mName == rhs.mName; }
string mName
The name of the object.
Definition: Named.hpp:43

Field Documentation

string torc::physical::Named::mName
protected

The name of the object.

Definition at line 43 of file Named.hpp.


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