OMNeT++ Simulation Library  6.0.3
cRegistrationList Class Reference

#include <cregistrationlist.h>

Description

Implements a list or table of objects with qualified names.

The getName() method of objects should return the unqualified name (without namespace or package name), and the getFullName() method the qualified name (with namespace or package).

Inheritance diagram for cRegistrationList:
cNamedObject noncopyable cObject

Public Member Functions

cObject methods
virtual std::string str () const override
 
virtual void forEachChild (cVisitor *v) override
 
iterator begin ()
 
iterator end ()
 
virtual void add (cOwnedObject *obj)
 
virtual int size () const
 
virtual cOwnedObjectget (int i) const
 
virtual cOwnedObjectfind (const char *name) const
 
virtual cOwnedObjectlookup (const char *qualifiedName) const
 
virtual cOwnedObjectlookup (const char *qualifiedName, const char *contextNamespace, bool fallbackToOmnetpp=false)
 
virtual void sort ()
 
- Public Member Functions inherited from cNamedObject
 cNamedObject ()
 
 cNamedObject (const char *name, bool namepooling=true)
 
 cNamedObject (const cNamedObject &obj)
 
virtual ~cNamedObject ()
 
cNamedObjectoperator= (const cNamedObject &o)
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) override
 
virtual void setName (const char *s)
 
virtual const char * getName () const override
 
virtual void setNamePooling (bool b)
 
virtual bool getNamePooling ()
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)=default
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
virtual std::string getClassAndFullName () const
 
virtual std::string getClassAndFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::ostream & printOn (std::ostream &os) const
 
virtual cObjectdup () const
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual bool isSoftOwner () const
 
cObjectfindObject (const char *name, bool deep=true)
 
virtual cClassDescriptorgetDescriptor () const
 
void copyNotSupported () const
 

Additional Inherited Members

- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Member Function Documentation

◆ str()

virtual std::string str ( ) const
overridevirtual

Returns a brief, one-line description of the object. The returned string does (should) NOT include the object's name and class. This method is used to display object information at several places in the Qtenv GUI, among others.

Reimplemented from cObject.

◆ forEachChild()

virtual void forEachChild ( cVisitor v)
overridevirtual

Enables traversing the object tree, performing some operation on each object. The operation is encapsulated in the particular subclass of cVisitor.

This method should be redefined in every subclass to call v->visit(obj) for every obj object contained.

Reimplemented from cObject.

◆ begin()

iterator begin ( )
inline

Returns an iterator referring to the first element.

◆ end()

iterator end ( )
inline

Returns an iterator referring to the past-the-end element.

◆ add()

virtual void add ( cOwnedObject obj)
virtual

Adds an object to the container.

◆ size()

virtual int size ( ) const
inlinevirtual

Returns the number of elements.

◆ get()

virtual cOwnedObject* get ( int  i) const
virtual

Returns the ith element, or nullptr.

◆ find()

virtual cOwnedObject* find ( const char *  name) const
virtual

Returns (one of) the object(s) with the given name (not fullName!). Returns nullptr if not found.

◆ lookup() [1/2]

virtual cOwnedObject* lookup ( const char *  qualifiedName) const
virtual

Returns the object with the exact given qualified name (getFullName()). Returns nullptr if not found.

◆ lookup() [2/2]

virtual cOwnedObject* lookup ( const char *  qualifiedName,
const char *  contextNamespace,
bool  fallbackToOmnetpp = false 
)
virtual

Returns the object with the given qualified name. If not found, it is also tried in the given context namespace(s). Returns nullptr if not found.

◆ sort()

virtual void sort ( )
virtual

Sorts the elements by qualified name (getFullName()). This affects the order get() will return the elements.


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