Yate
OctetString Class Reference

Helper class for operations with octet strings. More...

#include <yateasn.h>

Inheritance diagram for OctetString:
DataBlock GenObject

Public Member Functions

String getString ()
 
DataBlockoperator= (const String &value)
 
DataBlockoperator= (const DataBlock &value)
 
const String toHexString () const
 
DataBlockfromHexString (const String &value)
 
- Public Member Functions inherited from DataBlock
 DataBlock (unsigned int overAlloc=0)
 
 DataBlock (const DataBlock &value)
 
 DataBlock (const DataBlock &value, unsigned int overAlloc)
 
 DataBlock (void *value, unsigned int len, bool copyData=true, unsigned int overAlloc=0)
 
virtual ~DataBlock ()
 
virtual void * getObject (const String &name) const
 
void * data () const
 
unsigned char * data (unsigned int offs, unsigned int len=1) const
 
int at (unsigned int offs, int defvalue=-1) const
 
bool null () const
 
unsigned int length () const
 
unsigned int overAlloc () const
 
void overAlloc (unsigned int bytes)
 
void clear (bool deleteData=true)
 
DataBlockassign (void *value, unsigned int len, bool copyData=true, unsigned int allocated=0)
 
void append (void *value, unsigned int len)
 
void append (const DataBlock &value)
 
void append (const String &value)
 
void insert (const DataBlock &value)
 
void resize (unsigned int len)
 
void truncate (unsigned int len)
 
void cut (int len)
 
int operator[] (signed int index) const
 
int operator[] (unsigned int index) const
 
DataBlockoperator= (const DataBlock &value)
 
DataBlockoperator+= (const DataBlock &value)
 
DataBlockoperator+= (const String &value)
 
bool convert (const DataBlock &src, const String &sFormat, const String &dFormat, unsigned maxlen=0)
 
bool unHexify (const char *data, unsigned int len, char sep)
 
bool unHexify (const char *data, unsigned int len)
 
bool unHexify (const String &data)
 
String sqlEscape (char extraEsc) const
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Additional Inherited Members

- Static Public Member Functions inherited from DataBlock
static const DataBlockempty ()
 
- 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

Helper class for operations with octet strings.

Helper class for operations with octet strings. Helps with conversions from String to/from DataBlock

Member Function Documentation

◆ fromHexString()

DataBlock & fromHexString ( const String & value)
inline

Builed this DataBlock from a hexified string

Returns
The DataBlock built from the given hexified string

References DataBlock::DataBlock(), and DataBlock::unHexify().

◆ getString()

String getString ( )
inline

Get the String contained in this buffer

Returns
String containing the internal data

References DataBlock::data(), and DataBlock::length().

◆ toHexString()

const String toHexString ( ) const
inline

Get the content of the buffer in form of a hexified string

Returns
Hexified string

References DataBlock::data(), String::hexify(), and DataBlock::length().


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