OMNeT++ Simulation Library  5.6.1
cChannelType Class Referenceabstract

#include <ccomponenttype.h>

Description

Abstract base class for creating a channel of a given type.

Inheritance diagram for cChannelType:
cComponentType cNoncopyableOwnedObject cOwnedObject noncopyable cNamedObject cObject

Public Member Functions

Constructors, destructor, assignment
 cChannelType (const char *qname=nullptr)
 
Channel object creation
virtual cChannelcreate (const char *name)
 
- Public Member Functions inherited from cComponentType
virtual std::string getNedSource () const =0
 
 cComponentType (const char *qname=nullptr)
 
virtual ~cComponentType ()
 
virtual const char * getFullName () const override
 
- Public Member Functions inherited from cNoncopyableOwnedObject
 cNoncopyableOwnedObject (const char *name=nullptr, bool namepooling=true)
 
virtual cNoncopyableOwnedObjectdup () const override
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) 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
 
virtual bool isSoftOwner () const
 
- 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)
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
bool isName (const char *s) const
 
virtual std::string getFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual _OPPDEPRECATED std::string info () const
 
virtual _OPPDEPRECATED std::string detailedInfo () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
void copyNotSupported () const
 

Static Public Member Functions

static cChannelTypefind (const char *qname)
 
static cChannelTypeget (const char *qname)
 
static cChannelTypegetIdealChannelType ()
 
static cChannelTypegetDelayChannelType ()
 
static cChannelTypegetDatarateChannelType ()
 
static cIdealChannelcreateIdealChannel (const char *name)
 
static cDelayChannelcreateDelayChannel (const char *name)
 
static cDatarateChannelcreateDatarateChannel (const char *name)
 
- Static Public Member Functions inherited from cComponentType
static cComponentTypefind (const char *qname)
 
static cComponentTypeget (const char *qname)
 
- Static Public Member Functions inherited from cOwnedObject
static long getTotalObjectCount ()
 
static long getLiveObjectCount ()
 
static void resetObjectCounters ()
 
static cDefaultListgetDefaultOwner ()
 

Protected Member Functions

virtual cChannelcreateChannelObject ()=0
 
virtual void addParametersTo (cChannel *channel)=0
 
cChannelinstantiateChannelClass (const char *classname)
 
- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Constructor & Destructor Documentation

◆ cChannelType()

cChannelType ( const char *  qname = nullptr)

Constructor.

Member Function Documentation

◆ createChannelObject()

virtual cChannel* createChannelObject ( )
protectedpure virtual

Creates the channel object. To be defined in subclasses.

◆ addParametersTo()

virtual void addParametersTo ( cChannel channel)
protectedpure virtual

Adds parameters to a newly created channel object. To be defined in subclasses.

◆ instantiateChannelClass()

cChannel* instantiateChannelClass ( const char *  classname)
protected

Utility function: instantiates the given class, and tries to cast the result to cChannel. Raises an error if class was not found or could not be cast.

◆ create()

virtual cChannel* create ( const char *  name)
virtual

Factory method to create a channel object with the given name.

If the name is nullptr, a default name will be taken from the @defaultname NED property of the channel type; or if there is no such property, "channel" will be used.

In addition to creating an object of the correct type, this methods inserts it into the simulation's data structure, and adds the parameters specified in the NED declaration.

◆ find()

static cChannelType* find ( const char *  qname)
static

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

◆ get()

static cChannelType* get ( const char *  qname)
static

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

◆ getIdealChannelType()

static cChannelType* getIdealChannelType ( )
static

Equivalent to cChannelType::get("ned.IdealChannel"), but more efficient.

◆ getDelayChannelType()

static cChannelType* getDelayChannelType ( )
static

Equivalent to cChannelType::get("ned.DelayChannel"), but more efficient.

◆ getDatarateChannelType()

static cChannelType* getDatarateChannelType ( )
static

Equivalent to cChannelType::get("ned.DatarateChannel"), but more efficient.

◆ createIdealChannel()

static cIdealChannel* createIdealChannel ( const char *  name)
static

Creates an IdealChannel via getIdealChannelType()->create(name).

◆ createDelayChannel()

static cDelayChannel* createDelayChannel ( const char *  name)
static

Creates a DelayChannel via getDelayChannelType()->create(name).

◆ createDatarateChannel()

static cDatarateChannel* createDatarateChannel ( const char *  name)
static

Creates a DatarateChannel via getDatarateChannelType()->create(name).


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