ASN1TDynOctStr Struct Reference
[ASN.1 Type (ASN1T_) Base Classes]

#include <ASN1TOctStr.h>

List of all members.

Public Member Functions

 ASN1TDynOctStr ()
 ASN1TDynOctStr (OSUINT32 _numocts, const OSOCTET *_data)
 ASN1TDynOctStr (ASN1DynOctStr &_os)
 ASN1TDynOctStr (const char *cstring)
ASN1TDynOctStroperator= (const char *cstring)
EXTRTMETHOD ASN1TDynOctStroperator= (const ASN1TDynOctStr &octet)
EXTRTMETHOD const char * toString (OSCTXT *pctxt) const
EXTRTMETHOD const char * toHexString (OSCTXT *pctxt) const
EXTRTMETHOD int nCompare (OSUINT32 n, const ASN1TDynOctStr &o) const

Detailed Description

Dynamic octet string. This is the base class for generated C++ data type classes for unsized OCTET string's.


Constructor & Destructor Documentation

ASN1TDynOctStr::ASN1TDynOctStr (  )  [inline]

The default constructor creates an empty octet string.

ASN1TDynOctStr::ASN1TDynOctStr ( OSUINT32  _numocts,
const OSOCTET *  _data 
) [inline]

This constructor initializes the octet string to contain the given data values.

Parameters:
_numocts - Number of octet in the octet string.
_data - The binary octet data values.
ASN1TDynOctStr::ASN1TDynOctStr ( ASN1DynOctStr &  _os  )  [inline]

This constructor initializes the octet string to contain the given data values.

Parameters:
_os - C octet string structure.
ASN1TDynOctStr::ASN1TDynOctStr ( const char *  cstring  )  [inline]

This constructor initializes the octet string to contain the given data values. In this case, it is initializes the string to contain the characters in a null-terminated C character string.

Parameters:
cstring - C null-terminated string.

Member Function Documentation

EXTRTMETHOD int ASN1TDynOctStr::nCompare ( OSUINT32  n,
const ASN1TDynOctStr o 
) const

This method compares the first n octets of this octet string with the given octet string.

Parameters:
n - Number of octets to compare
o - Octet string for comparison
Returns:
- 0 if strings are equal, -1 if this octet string is less than the given string, +1 if this string > given string.
EXTRTMETHOD ASN1TDynOctStr& ASN1TDynOctStr::operator= ( const ASN1TDynOctStr octet  ) 

This assignment operator sets the octet string to contain the characters from the given C++ octet string object.

Parameters:
octet - Octet string object reference
ASN1TDynOctStr& ASN1TDynOctStr::operator= ( const char *  cstring  )  [inline]

This assignment operator sets the octet string to contain the characters in a null-terminated C character string. For example, myOctStr = "a char string";

Parameters:
cstring - C null-terminated string.
EXTRTMETHOD const char* ASN1TDynOctStr::toHexString ( OSCTXT pctxt  )  const

This method converts the binary octet string to a hexadecimal string representation.

Parameters:
pctxt - Pointer to a context structure.
EXTRTMETHOD const char* ASN1TDynOctStr::toString ( OSCTXT pctxt  )  const

This method converts the binary octet string to a human-readable representation. The string is first checked to see if it contains all printable characters. If this is the case, the characters in the string are returned; otherwise, the string contents are converted into a hexadecimal character string.

Parameters:
pctxt - Pointer to a context structure.

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