OMNeT++ Simulation Library  5.6.1
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

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 ()
 
cObject methods
virtual std::string str () const override
 
virtual void forEachChild (cVisitor *v) override
 
- 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)
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
const cObjectgetThisPtr () const
 
virtual _OPPDEPRECATED std::string info () const
 
virtual _OPPDEPRECATED std::string detailedInfo () const
 
virtual cObjectdup () const
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
cObjectfindObject (const char *name, bool deep=true)
 
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

Produce a one-line description of the object. The string is displayed at various places e.g. in graphical user interfaces.

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: