OMNeT++ Simulation Library  6.0.3
cComponentType Class Referenceabstract

#include <ccomponenttype.h>

Description

Common base class for cModuleType and cChannelType.

The getName() method returns the unqualified name (without namespace, e.g. "Queue"), and getFullName() returns the qualified name (with namespace, e.g. "inet.network.Queue").

Inheritance diagram for cComponentType:
cNoncopyableOwnedObject cOwnedObject noncopyable cNamedObject cObject cChannelType cModuleType

Public Member Functions

Constructors, destructor, assignment
 cComponentType (const char *qname=nullptr)
 
virtual ~cComponentType ()
 
- Public Member Functions inherited from cNoncopyableOwnedObject
 cNoncopyableOwnedObject (const char *name=nullptr, bool namepooling=true)
 
virtual cNoncopyableOwnedObjectdup () const override
 
- Public Member Functions inherited from cOwnedObject
 cOwnedObject ()
 
 cOwnedObject (const char *name, bool namepooling=true)
 
 cOwnedObject (const cOwnedObject &obj)
 
virtual ~cOwnedObject ()
 
cOwnedObjectoperator= (const cOwnedObject &o)
 
virtual cObjectgetOwner () const override
 
virtual bool isOwnedObject () const 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 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 std::string getFullPath () const
 
virtual std::string getClassAndFullName () const
 
virtual std::string getClassAndFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual std::ostream & printOn (std::ostream &os) const
 
virtual bool isSoftOwner () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
virtual cClassDescriptorgetDescriptor () const
 
void copyNotSupported () const
 

Redefined cObject member functions.

virtual const char * getFullName () const override
 
virtual std::string getNedSource () const =0
 
static cComponentTypefind (const char *qname)
 
static cComponentTypeget (const char *qname)
 

Additional Inherited Members

- Static Public Member Functions inherited from cOwnedObject
static long getTotalObjectCount ()
 
static long getLiveObjectCount ()
 
static void resetObjectCounters ()
 
static cSoftOwnergetOwningContext ()
 
- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Constructor & Destructor Documentation

◆ cComponentType()

cComponentType ( const char *  qname = nullptr)

Constructor. Takes the fully qualified component type name.

◆ ~cComponentType()

virtual ~cComponentType ( )
virtual

Destructor.

Member Function Documentation

◆ getFullName()

virtual const char* getFullName ( ) const
inlineoverridevirtual

Returns the fully qualified name (i.e. the simple name prefixed with the package name and any existing enclosing NED type names).

Examples:

The fully qualified name for a module named Fifo which is in the default package is "Fifo".

For a module named Host which is in the package some.package, the fully qualified name is "some.package.Host".

For a channel type Ch which is defined as an inner type inside the network Network in a package named some.package, the fully qualified name is "some.package.Network.Ch".

Reimplemented from cObject.

◆ getNedSource()

virtual std::string getNedSource ( ) const
pure virtual

Returns the NED source code of the component, if available.

◆ find()

static cComponentType* find ( const char *  qname)
static

Finds a component type by fully qualified NED type name. Returns nullptr if not found.

◆ get()

static cComponentType* get ( const char *  qname)
static

Finds a component type by fully qualified NED type name. Throws an error if not found.


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