BinaryData representing a binary data chunk.
More...
#include <igstkBinaryData.h>
Public Types |
typedef std::vector< unsigned
char > | ContainerType |
| Data container type definition.
|
Public Member Functions |
| BinaryData () |
| Constructor.
|
| BinaryData (const char *encodedString) |
| Constructor that copies data from an encoded string.
|
| BinaryData (const std::string &encodedString) |
| Constructor that copies data from an encoded string.
|
virtual | ~BinaryData () |
| Destructor.
|
void | SetSize (unsigned int size) |
| SetSize method resizes/allocates memory.
|
unsigned int | GetSize () const |
| GetSize method returns the size of data.
|
const ContainerType & | GetData () const |
| Get a data container (returns constant)
|
ContainerType & | GetData () |
| Get a data container.
|
void | CopyFrom (unsigned char *inputBegin, unsigned int inputLength) |
| Copy data from an array.
|
void | CopyTo (unsigned char *output) const |
| Copy data into an array.
|
void | Append (unsigned char byte) |
| Append a byte.
|
void | Append (const unsigned char *inputBegin, unsigned int inputLength) |
| Append data from an array.
|
const BinaryData & | operator= (const BinaryData &inputBinaryData) |
| Assign the values of one BinaryData to another.
|
bool | operator== (const BinaryData &inputBinaryData) const |
| operator== redefinition
|
bool | operator!= (const BinaryData &inputBinaryData) const |
| operator!= redefinition
|
bool | operator< (const BinaryData &inputBinaryData) const |
| operator< redefinition
|
unsigned char | operator[] (const unsigned int index) const |
| operator[] redefinition
|
unsigned char & | operator[] (const unsigned int index) |
| operator[] redefinition (returns reference)
|
| operator std::string () const |
| operator that converts BinaryData to std::string type after encoding as ASCII
|
void | Print (std::ostream &os, itk::Indent indent) const |
| Method for printing the member variables of this class to an ostream.
|
bool | Decode (const std::string &asciiString) |
| Decode method decodes encoded ASCII string to binary data.
|
Static Public Member Functions |
static void | Encode (std::string &output, const unsigned char *data, unsigned int size) |
| Encode method encodes binary data to ASCII string in std::string.
|
Protected Member Functions |
void | PrintHeader (std::ostream &os, itk::Indent indent) const |
| Method for printing the header to an ostream.
|
void | PrintTrailer (std::ostream &itkNotUsed(os), itk::Indent itkNotUsed(indent)) const |
| Method for printing the trailer to an ostream.
|
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
| Print the object information in a stream.
|
Detailed Description
BinaryData representing a binary data chunk.
This class represents a binary data chunk.
This class can be used for storing binary stream during communication.
Definition at line 38 of file igstkBinaryData.h.
Member Typedef Documentation
Constructor & Destructor Documentation
igstk::BinaryData::BinaryData |
( |
| ) |
|
igstk::BinaryData::BinaryData |
( |
const char * |
encodedString | ) |
|
Constructor that copies data from an encoded string.
igstk::BinaryData::BinaryData |
( |
const std::string & |
encodedString | ) |
|
Constructor that copies data from an encoded string.
virtual igstk::BinaryData::~BinaryData |
( |
| ) |
|
|
virtual |
Member Function Documentation
void igstk::BinaryData::SetSize |
( |
unsigned int |
size | ) |
|
SetSize method resizes/allocates memory.
unsigned int igstk::BinaryData::GetSize |
( |
| ) |
const |
GetSize method returns the size of data.
void igstk::BinaryData::CopyFrom |
( |
unsigned char * |
inputBegin, |
|
|
unsigned int |
inputLength |
|
) |
| |
void igstk::BinaryData::CopyTo |
( |
unsigned char * |
output | ) |
const |
void igstk::BinaryData::Append |
( |
unsigned char |
byte | ) |
|
void igstk::BinaryData::Append |
( |
const unsigned char * |
inputBegin, |
|
|
unsigned int |
inputLength |
|
) |
| |
Append data from an array.
bool igstk::BinaryData::operator== |
( |
const BinaryData & |
inputBinaryData | ) |
const |
bool igstk::BinaryData::operator!= |
( |
const BinaryData & |
inputBinaryData | ) |
const |
bool igstk::BinaryData::operator< |
( |
const BinaryData & |
inputBinaryData | ) |
const |
unsigned char igstk::BinaryData::operator[] |
( |
const unsigned int |
index | ) |
const |
unsigned char& igstk::BinaryData::operator[] |
( |
const unsigned int |
index | ) |
|
operator[] redefinition (returns reference)
igstk::BinaryData::operator std::string |
( |
| ) |
const |
operator that converts BinaryData to std::string type after encoding as ASCII
void igstk::BinaryData::Print |
( |
std::ostream & |
os, |
|
|
itk::Indent |
indent |
|
) |
| const |
Method for printing the member variables of this class to an ostream.
static void igstk::BinaryData::Encode |
( |
std::string & |
output, |
|
|
const unsigned char * |
data, |
|
|
unsigned int |
size |
|
) |
| |
|
static |
Encode method encodes binary data to ASCII string in std::string.
bool igstk::BinaryData::Decode |
( |
const std::string & |
asciiString | ) |
|
Decode method decodes encoded ASCII string to binary data.
void igstk::BinaryData::PrintHeader |
( |
std::ostream & |
os, |
|
|
itk::Indent |
indent |
|
) |
| const |
|
protected |
Method for printing the header to an ostream.
void igstk::BinaryData::PrintTrailer |
( |
std::ostream & |
itkNotUsedos, |
|
|
itk::Indent |
itkNotUsedindent |
|
) |
| const |
|
protected |
Method for printing the trailer to an ostream.
virtual void igstk::BinaryData::PrintSelf |
( |
std::ostream & |
os, |
|
|
itk::Indent |
indent |
|
) |
| const |
|
protectedvirtual |
Print the object information in a stream.
The documentation for this class was generated from the following file: