cPrimitiveTypeDescriptor< T > Class Template Reference

API: cPrimitiveTypeDescriptor< T > Class Template Reference
API
cPrimitiveTypeDescriptor< T > Class Template Reference
Inheritance diagram for cPrimitiveTypeDescriptor< T >:
[legend]

Public Member Functions

virtual std::string getValueAsString (any_ptr object) const override
virtual void setValueAsString (any_ptr object, const char *value) const override
Public Member Functions inherited from cDynamicDescriptor
virtual const char ** getPropertyNames () const override
virtual const char * getProperty (const char *propertyName) const override
virtual int getFieldCount () const override
virtual const char * getFieldName (int field) const override
virtual unsigned int getFieldTypeFlags (int field) const override
virtual const char * getFieldTypeString (int field) const override
virtual const char ** getFieldPropertyNames (int field) const override
virtual const char * getFieldProperty (int field, const char *propertyName) const override
virtual int getFieldArraySize (any_ptr object, int field) const override
virtual void setFieldArraySize (any_ptr object, int field, int size) const override
virtual std::string getFieldValueAsString (any_ptr object, int field, int i) const override
virtual void setFieldValueAsString (any_ptr object, int field, int i, const char *value) const override
virtual cValue getFieldValue (any_ptr object, int field, int i) const override
virtual void setFieldValue (any_ptr object, int field, int i, const cValue &value) const override
virtual const char * getFieldStructName (int field) const override
virtual any_ptr getFieldStructValuePointer (any_ptr object, int field, int i) const override
virtual void setFieldStructValuePointer (any_ptr object, int field, int i, any_ptr ptr) const override
Public Member Functions inherited from cClassDescriptor
 cClassDescriptor (const char *className, const char *baseClassName=nullptr)
virtual ~cClassDescriptor ()
virtual bool doesSupport (cObject *obj) const
virtual cClassDescriptorgetBaseClassDescriptor () const
bool extendsCObject () const
std::string getNamespace () const
int getInheritanceChainLength () const
virtual int findField (const char *fieldName) const
virtual const char * getFieldDeclaredOn (int field) const
virtual const char * getFieldDynamicTypeString (any_ptr object, int field, int i) const
virtual std::string getFieldArrayIndexString (any_ptr object, int field, int arrayIndex) const
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

Public Types inherited from cClassDescriptor
enum  {
  FD_ISARRAY = 0x01 , FD_ISCOMPOUND = 0x02 , FD_ISPOINTER = 0x04 , FD_ISCOBJECT = 0x08 ,
  FD_ISCOWNEDOBJECT = 0x10 , FD_ISEDITABLE = 0x20 , FD_ISREPLACEABLE = 0x40 , FD_ISRESIZABLE = 0x80 ,
  FD_NONE = 0x0
}
 Field types. More...
Static Public Member Functions inherited from cClassDescriptor
static cClassDescriptorgetDescriptorFor (const char *classname)
static cClassDescriptorgetDescriptorFor (const cObject *object)
Static Public Member Functions inherited from cOwnedObject
static long getTotalObjectCount ()
static long getLiveObjectCount ()
static void resetObjectCounters ()
static cSoftOwnergetOwningContext ()
Static Public Attributes inherited from cClassDescriptor
static constexpr const char * UNPRINTABLE = "(unprintable)"
 Returned by getValueAsString() and getFieldValueAsString() for types that have no text representation.
Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
virtual void drop (cOwnedObject *obj)
void dropAndDelete (cOwnedObject *obj)

Description

template<typename T>
class omnetpp::internal::cPrimitiveTypeDescriptor< T >

Descriptor for primitive/simple types that support operator<< and/or operator>>. Has no fields; provides getValueAsString()/setValueAsString() via stream operators.

Member Function Documentation

◆ getValueAsString()

template<typename T>
virtual std::string getValueAsString ( any_ptr object) const
inlineoverridevirtual

Returns the value of the given object as a string.

Reimplemented from cClassDescriptor.

References cClassDescriptor::UNPRINTABLE.

◆ setValueAsString()

template<typename T>
virtual void setValueAsString ( any_ptr object,
const char * value ) const
inlineoverridevirtual

Sets the value of the given object by parsing the given value string. If the operation is not successful, an exception is thrown.

Reimplemented from cClassDescriptor.

References cClassDescriptor::setValueAsString().