OSDynOctStrClass Class Reference

Dynamic binary string. More...

#include <rtxCppDynOctStr.h>

Inheritance diagram for OSDynOctStrClass:
OSRTBaseType

List of all members.

Public Member Functions

 OSDynOctStrClass ()
 The default constructor creates an empty binary string.
 OSDynOctStrClass (OSUINT32 numocts_, const OSOCTET *data_)
 This constructor initializes the binary string to contain the given data values.
 OSDynOctStrClass (OSDynOctStr &os)
 The copy constructor initializes the binary string to contain the given data values from the C data structure.
 OSDynOctStrClass (const OSDynOctStrClass &os)
 This copy constructor initializes the binary string to contain the given data values from the C++ data object.
virtual ~OSDynOctStrClass ()
 The destructor frees string memory.
OSRTBaseTypeclone () const
 Clone method.
void copyValue (OSUINT32 numocts_, const OSOCTET *data_)
 This method copies the given binary string value to the internal string storage variable.
const OSOCTET * getValue () const
 This method returns a pointer to the binary data field.
size_t getLength () const
 This method returns the length in octets of the binary data field.
size_t length () const
 This method returns the length in octets of the binary data field.
void setValue (OSUINT32 numocts_, const OSOCTET *data_)
 This method copies the given binary string value to the internal string storage variable.
int setValue (const char *hexstr, size_t nchars=0)
 This method converts hex characters into binary form and sets the value.
int setValueFromBase64 (const char *base64str, size_t nchars=0)
 This method converts base64-encoded characters into binary form and sets the value.
OSDynOctStrClassoperator= (const OSDynOctStrClass &original)
 Assignment operator.

Detailed Description

Dynamic binary string.

This is the base class for generated C++ data type classes for XSD binary types (hexBinary and base64Binary).

Definition at line 38 of file rtxCppDynOctStr.h.


Constructor & Destructor Documentation

OSDynOctStrClass::OSDynOctStrClass ( OSUINT32  numocts_,
const OSOCTET *  data_ 
)

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

Parameters:
numocts_ - Number of bytes in the binary string.
data_ - The binary string data values.
OSDynOctStrClass::OSDynOctStrClass ( OSDynOctStr &  os  ) 

The copy constructor initializes the binary string to contain the given data values from the C data structure.

Parameters:
os - C binary string structure.
OSDynOctStrClass::OSDynOctStrClass ( const OSDynOctStrClass os  ) 

This copy constructor initializes the binary string to contain the given data values from the C++ data object.

Parameters:
os - C++ binary string object reference.

Member Function Documentation

OSRTBaseType* OSDynOctStrClass::clone (  )  const [inline, virtual]

Clone method.

Creates a copied instance and returns pointer to OSRTBaseType.

Reimplemented from OSRTBaseType.

Definition at line 83 of file rtxCppDynOctStr.h.

void OSDynOctStrClass::copyValue ( OSUINT32  numocts_,
const OSOCTET *  data_ 
)

This method copies the given binary string value to the internal string storage variable.

A deep-copy of the given value is done; the class will delete this memory when the object is deleted.

Parameters:
numocts_ - Number of bytes in the binary string.
data_ - The binary string data values.
int OSDynOctStrClass::setValue ( const char *  hexstr,
size_t  nchars = 0 
)

This method converts hex characters into binary form and sets the value.

Parameters:
hexstr - Hex char string value.
nchars - Number of characters in string. If zero, characters are read up to null-terminator.
Returns:
- Status of operation: zero if success or a negative status code on error.
void OSDynOctStrClass::setValue ( OSUINT32  numocts_,
const OSOCTET *  data_ 
)

This method copies the given binary string value to the internal string storage variable.

A deep-copy of the given value is done; the class will delete this memory when the object is deleted.

Parameters:
numocts_ - Number of bytes in the binary string.
data_ - The binary string data values.
int OSDynOctStrClass::setValueFromBase64 ( const char *  base64str,
size_t  nchars = 0 
)

This method converts base64-encoded characters into binary form and sets the value.

Parameters:
base64str - Base64 char string value.
nchars - Number of characters in string. If zero, characters are read up to null-terminator.
Returns:
- Status of operation: zero if success or a negative status code on error.

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