Converts scene graph objects to character byte streams. More...
#include <Inventor/misc/SoByteStream.h>
Public Member Functions | |
SoByteStream () | |
~SoByteStream () | |
void | convert (SoNode *node, SbBool binaryFormat=TRUE) |
void | convert (SoPath *path, SbBool binaryFormat=TRUE) |
void | convert (SoPathList *pathList, SbBool binaryFormat=TRUE) |
void * | getData () |
size_t | getNumBytes () |
Static Public Member Functions | |
static SoPathList * | unconvert (SoByteStream *byteStream) |
static SoPathList * | unconvert (void *data, size_t numBytes) |
Converts scene graph objects to character byte streams.
This class creates a byte stream representation of a scene graph, using an SoWriteAction to write path lists to an in-memory buffer. Byte streams are commonly used to transfer data in copy and paste operations. (The SoWinClipboard class passes SoByteStream data during copy and paste.)
SoByteStream::SoByteStream | ( | ) |
Constructor.
SoByteStream::~SoByteStream | ( | ) |
Destructor.
void SoByteStream::convert | ( | SoPathList * | pathList, | |
SbBool | binaryFormat = TRUE | |||
) |
Converts the passed scene graph object(s) into a byte stream.
The object(s) are passed by pathList. The caller may specify whether the byte stream is written in binary (TRUE) or ASCII (FALSE) format. The converted data can be accessed through getData() and getNumBytes().
Converts the passed scene graph object(s) into a byte stream.
The object(s) are passed by path. The caller may specify whether the byte stream is written in binary (TRUE) or ASCII (FALSE) format. The converted data can be accessed through getData() and getNumBytes().
Converts the passed scene graph object(s) into a byte stream.
The object(s) are passed by node. The caller may specify whether the byte stream is written in binary (TRUE) or ASCII (FALSE) format. The converted data can be accessed through getData() and getNumBytes().
void* SoByteStream::getData | ( | ) | [inline] |
Returns the data from the last convert() operation.
This byte stream format is well suited to data transfers, like copy and paste.
size_t SoByteStream::getNumBytes | ( | ) | [inline] |
Returns the number of bytes from the last convert() operation.
This byte stream format is well suited to data transfers, like copy and paste.
static SoPathList* SoByteStream::unconvert | ( | void * | data, | |
size_t | numBytes | |||
) | [static] |
Takes byte stream data and unconverts it back to scene graph objects.
The objects are returned in a path list.
static SoPathList* SoByteStream::unconvert | ( | SoByteStream * | byteStream | ) | [static] |
Takes byte stream data and unconverts it back to scene graph objects.
The objects are returned in a path list.