cNamedObject Class Reference
[Simulation core classes]

#include <cnamedobject.h>

Inheritance diagram for cNamedObject:

cObject cOwnedObject cParImpl cProperty cRegistrationList cSimulation cAccuracyDetection cArray cEnum cFSM cLinkedList cMessage cMessageHeap cMsgPar cNoncopyableOwnedObject cQueue cStatistic cTopology cTransientDetection cBoolParImpl cDoubleParImpl cLongParImpl cStringParImpl cXMLParImpl

List of all members.


Detailed Description

Extends cObject with a name string.

Also includes a "flags" member, with bits open for use by subclasses.

Public Member Functions

Constructors, destructor, assignment.
 cNamedObject ()
 cNamedObject (const char *name, bool namepooling=true)
 cNamedObject (const cNamedObject &obj)
virtual ~cNamedObject ()
cNamedObjectoperator= (const cNamedObject &o)
virtual void parsimPack (cCommBuffer *buffer)
virtual void parsimUnpack (cCommBuffer *buffer)
Handling the name string.
virtual void setName (const char *s)
virtual const char * getName () const
virtual void setNamePooling (bool b)
virtual bool getNamePooling ()


Constructor & Destructor Documentation

cNamedObject::cNamedObject (  ) 

Create object without a name.

cNamedObject::cNamedObject ( const char *  name,
bool  namepooling = true 
) [explicit]

Create object with given name.

Name pooling is an optimization feature.

cNamedObject::cNamedObject ( const cNamedObject obj  ) 

Copy constructor.

virtual cNamedObject::~cNamedObject (  )  [virtual]

Destructor.


Member Function Documentation

cNamedObject& cNamedObject::operator= ( const cNamedObject o  ) 

The assignment operator.

Derived classes should contain similar methods (cClassName& cClassName::operator=(cClassName&)).

Assigment copies the contents of the object EXCEPT for the name string. If you want to copy the name string, you can do it by hand: setName(o.getName()).

virtual void cNamedObject::parsimPack ( cCommBuffer buffer  )  [virtual]

virtual void cNamedObject::parsimUnpack ( cCommBuffer buffer  )  [virtual]

virtual void cNamedObject::setName ( const char *  s  )  [virtual]

Sets object's name.

The object creates its own copy of the string. NULL pointer may also be passed, which will be interpreted as an empty string ("").

Reimplemented in cModule, cOutVector, and cProperty.

virtual const char* cNamedObject::getName (  )  const [inline, virtual]

Returns pointer to the object's name, a string stored in the object.

This function never returns NULL.

Reimplemented from cObject.

Referenced by cObject::getFullName(), and cObject::isName().

virtual void cNamedObject::setNamePooling ( bool  b  )  [virtual]

Turn name pooling on/off.

Name pooling is an optimization technique that saves memory if several objects have identical names.

virtual bool cNamedObject::getNamePooling (  )  [inline, virtual]

Returns whether name pooling is turned on for this object.


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

Generated on Wed Apr 3 14:40:28 2013 for OMNeT++ Simulation Library by  doxygen 1.5.5