Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

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

#include <ASN1TOctStr.h>

List of all members.


Detailed Description

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


Public Member Functions

 ASN1TDynOctStr ()
 ASN1TDynOctStr (ASN1UINT _numocts, const ASN1OCTET *_data)
 ASN1TDynOctStr (ASN1DynOctStr &_os)
 ASN1TDynOctStr (const char *cstring)
ASN1TDynOctStroperator= (const char *cstring)
ASN1TDynOctStroperator= (const ASN1TDynOctStr &octet)
const char * toString (ASN1CTXT *pctxt) const
const char * toHexString (ASN1CTXT *pctxt) const
int nCompare (ASN1UINT n, const ASN1TDynOctStr &o) const


Constructor & Destructor Documentation

ASN1TDynOctStr::ASN1TDynOctStr  )  [inline]
 

The default constructor creates an empty octet string.

ASN1TDynOctStr::ASN1TDynOctStr ASN1UINT  _numocts,
const ASN1OCTET *  _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

int ASN1TDynOctStr::nCompare ASN1UINT  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.

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.

const char* ASN1TDynOctStr::toHexString ASN1CTXT *  pctxt  )  const
 

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

Parameters:
pctxt - Pointer to a context structure.

const char* ASN1TDynOctStr::toString ASN1CTXT *  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:

Copyright © 1997-2004 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 1 Oct 2004.
ASN1C C/C++ Common Runtime, ASN1C v5.7x