Abstract base class for creating a channel of a given type. More...
#include <ccomponenttype.h>
Public Member Functions | |
Constructors, destructor, assignment | |
cChannelType (const char *qname=NULL) | |
Channel object creation | |
virtual cChannel * | create (const char *name) |
Static Public Member Functions | |
static cChannelType * | find (const char *qname) |
static cChannelType * | get (const char *qname) |
static cChannelType * | getIdealChannelType () |
static cChannelType * | getDelayChannelType () |
static cChannelType * | getDatarateChannelType () |
static _OPPDEPRECATED cIdealChannel * | createIdealChannel (const char *name) |
static _OPPDEPRECATED cDelayChannel * | createDelayChannel (const char *name) |
static _OPPDEPRECATED cDatarateChannel * | createDatarateChannel (const char *name) |
Protected Member Functions | |
virtual cChannel * | createChannelObject ()=0 |
virtual void | addParametersTo (cChannel *channel)=0 |
cChannel * | instantiateChannelClass (const char *classname) |
Abstract base class for creating a channel of a given type.
virtual void cChannelType::addParametersTo | ( | cChannel * | channel | ) | [protected, pure virtual] |
Adds parameters to a newly created channel object.
To be defined in subclasses.
virtual cChannel* cChannelType::create | ( | const char * | name | ) | [virtual] |
Factory method to create a channel object with the given name.
If the name is NULL, a default name will be taken from the () 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.
virtual cChannel* cChannelType::createChannelObject | ( | ) | [protected, pure virtual] |
Creates the channel object.
To be defined in subclasses.
static _OPPDEPRECATED cDatarateChannel* cChannelType::createDatarateChannel | ( | const char * | name | ) | [static] |
DEPRECATED.
Use cDatarateChannel::create(name)
instead.
static _OPPDEPRECATED cDelayChannel* cChannelType::createDelayChannel | ( | const char * | name | ) | [static] |
DEPRECATED.
Use cDelayChannel::create(name)
instead.
static _OPPDEPRECATED cIdealChannel* cChannelType::createIdealChannel | ( | const char * | name | ) | [static] |
DEPRECATED.
Use cIdealChannel::create(name)
instead.
static cChannelType* cChannelType::find | ( | const char * | qname | ) | [static] |
Finds a channel type by fully qualified NED type name.
Returns NULL if not found.
Reimplemented from cComponentType.
static cChannelType* cChannelType::get | ( | const char * | qname | ) | [static] |
Finds a channel type by fully qualified NED type name.
Throws an error if not found.
Reimplemented from cComponentType.
cChannel* cChannelType::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.