Yate
AsnValue Class Reference

An ASN.1 value. More...

#include <yateasn.h>

Inheritance diagram for AsnValue:
GenObject

Public Types

enum  ValType {
  INTEGER = 1 , STRING = 2 , OBJECT_ID = 3 , IPADDRESS = 4 ,
  COUNTER = 5 , TIMETICKS = 6 , ARBITRARY = 7 , BIG_COUNTER = 8 ,
  UNSIGNED_INTEGER = 9
}
 

Public Member Functions

 AsnValue ()
 
 AsnValue (const AsnValue &original)
 
 AsnValue (const String &value, int type=STRING)
 
virtual ~AsnValue ()
 
const StringgetValue ()
 
int type ()
 
AsnValueoperator= (AsnValue *val)
 
AsnValueoperator= (AsnValue val)
 
void setValue (const String &data)
 
void setType (int type)
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Additional Inherited Members

- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Detailed Description

An ASN.1 value.

Class wrapper for different types of ASN.1 values

Member Enumeration Documentation

◆ ValType

enum ValType

Type of value

Constructor & Destructor Documentation

◆ AsnValue() [1/3]

AsnValue ( )
inline

Constructor

Referenced by AsnValue(), operator=(), and operator=().

◆ AsnValue() [2/3]

AsnValue ( const AsnValue & original)
inline

Copy constructor

Parameters
originalValue object to copy

References AsnValue().

◆ AsnValue() [3/3]

AsnValue ( const String & value,
int type = STRING )
inline

Constructor

Parameters
valueObject value
typeAsnValue type, default is String

References type().

◆ ~AsnValue()

virtual ~AsnValue ( )
inlinevirtual

Destructor

Member Function Documentation

◆ getValue()

const String & getValue ( )
inline

Get the value in the form of a string

Returns
String containing the internal data

Referenced by operator=(), and operator=().

◆ operator=() [1/2]

AsnValue & operator= ( AsnValue * val)
inline

Assign operator

References AsnValue(), getValue(), and type().

◆ operator=() [2/2]

AsnValue & operator= ( AsnValue val)
inline

Assign operator

References AsnValue(), getValue(), and type().

◆ setType()

void setType ( int type)
inline

Set data type

Parameters
typeThe type assigned

References type().

◆ setValue()

void setValue ( const String & data)
inline

Set data

Parameters
dataThe data to which the internal data will be set

◆ type()

int type ( )
inline

Get the type of the data so that we know how to interpret it

Returns
The type of the data

Referenced by AsnValue(), operator=(), operator=(), and setType().


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