cNamedObject Class Reference
[Simulation core classes]

Extends cObject with a name string. More...

#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.

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 ()

Detailed Description

Extends cObject with a name string.

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

Constructor & Destructor Documentation

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

Create object with given name.

Name pooling is an optimization feature.

Member Function Documentation

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().

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::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 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.

The documentation for this class was generated from the following file:
Generated on Fri Mar 7 17:19:41 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3