OMNeT++ API 6.1
Discrete Event Simulation Library
cDefaultMessagePrinter Class Reference

Description

A default message printer that displays the ID, kind, and length (for packets) of the message.

Note: The name and class name do not need to be returned, as they are already displayed by default.

Inheritance diagram for cDefaultMessagePrinter:
[legend]

Public Member Functions

virtual int getScoreFor (cMessage *msg) const override
 
virtual std::set< std::string > getSupportedTags () const override
 
virtual std::set< std::string > getDefaultEnabledTags () const override
 
virtual std::vector< std::string > getColumnNames (const Options *options) const override
 
virtual void printMessage (std::ostream &os, cMessage *msg, const Options *options) const override
 
- Public Member Functions inherited from cMessagePrinter
 cMessagePrinter ()
 
virtual ~cMessagePrinter ()
 
- 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 const char * getFullName () 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
 

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)
 

Member Function Documentation

◆ getScoreFor()

virtual int getScoreFor ( cMessage msg) const
overridevirtual

Scoring function that lets OMNeT++ decide which message printer to use for a particular message object. The "better", more specific the message printer is for that message, the higher score it should return. Guideline: 0 or negative: does not support this message; 10: returned by cDefaultMessagePrinter

Implements cMessagePrinter.

◆ getSupportedTags()

virtual std::set<std::string> getSupportedTags ( ) const
overridevirtual

Returns the tags supported by this printer.

Note
These are normally presented to the user on the graphical interfaces unmodified, and there are no constraints on the format or content of the tags, so for example using "Show 'Details' column" is preferred to using "col_details".

Reimplemented from cMessagePrinter.

◆ getDefaultEnabledTags()

virtual std::set<std::string> getDefaultEnabledTags ( ) const
overridevirtual

Returns the list of tags that this printer recommends to enable by default. The result must only contain tags that are also returned by "getSupportedTags()".

Reimplemented from cMessagePrinter.

◆ getColumnNames()

virtual std::vector<std::string> getColumnNames ( const Options options) const
overridevirtual

Returns column names for the specified options. The options parameter should never be nullptr. The list of enabled tags in "options" may contain tags not known or supported by this printer. Those should be silently ignored.

Reimplemented from cMessagePrinter.

◆ printMessage()

virtual void printMessage ( std::ostream &  os,
cMessage msg,
const Options options 
) const
overridevirtual

Print a single-line text about the message object into the given output stream. Use Tab characters to separate columns. Splitting the text into more or fewer columns than returned by getColumnNames is allowed, but being consistent with those is highly recommended. The options parameter should never be nullptr.

Implements cMessagePrinter.


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