xc
|
Object idenfied by an integer (tag). More...
#include <TaggedObject.h>
Public Member Functions | |
TaggedObject (int tag, CommandEntity *owr=nullptr) | |
Constructor. More... | |
virtual TaggedObject * | getCopy (void) const |
Virtual constructor. | |
void | assignTag (int newTag) |
Set tag (to be called from Python interface). | |
int | getTag (void) const |
Returns the tag associated with the object. | |
virtual void | Print (std::ostream &, int flag=0) |
Print stuff. | |
Protected Member Functions | |
void | setTag (int newTag) |
Set tag. More... | |
Friends | |
class | ElementHandler |
class | CommParameters |
template<class T > | |
T * | getBrokedTagged (const int &, const int &, const int &, FEM_ObjectBroker &, T *(FEM_ObjectBroker::*ptrFunc)(int)) |
std::ostream & | operator<< (std::ostream &, TaggedObject &) |
Object idenfied by an integer (tag).
TaggedObject is used as a base class to represent all classes that may have a integer identifier, a tag, to identify the object. It is used in the framework as a base class for many classes, for example DomainComponent and Vertex. The class is provided so that container classes can be written to store objects and provide access to them. This saves us rewriting container classes for each type of object. (templates will be able to provide this functionality when they are provided with all compilers).
XC::TaggedObject::TaggedObject | ( | int | tag, |
CommandEntity * | owr = nullptr |
||
) |
Constructor.
Constructs a TaggedObject with a tag given by tag
. The tag of a component is some unique means of identifying the component among like components, i.e. the tag of a node would be its unique node number.
tag | object identifier. |
owr | object owner (this object is somewhat contained by). |
|
protected |
Set tag.
Sets the tag of the object to be newTag
. It is provided so that MovableObjects can set their tag in recvSelf().