Converts scene graph objects to character byte streams. More...
#include <Inventor/misc/SoByteStream.h>
Public Member Functions | |
SoByteStream () | |
Constructor. | |
~SoByteStream () | |
Destructor. | |
void | convert (SoNode *node, SbBool binaryFormat=TRUE) |
Converts the passed scene graph object(s) into a byte stream. | |
void | convert (SoPath *path, SbBool binaryFormat=TRUE) |
Converts the passed scene graph object(s) into a byte stream. | |
void | convert (SoPathList *pathList, SbBool binaryFormat=TRUE) |
Converts the passed scene graph object(s) into a byte stream. | |
void * | getData () |
Returns the data from the last convert() operation. | |
size_t | getNumBytes () |
Returns the number of bytes from the last convert() operation. | |
Static Public Member Functions | |
static SoPathList * | unconvert (SoByteStream *byteStream) |
Takes byte stream data and unconverts it back to scene graph objects. | |
static SoPathList * | unconvert (void *data, size_t numBytes) |
Takes byte stream data and unconverts it back to scene graph objects. | |
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.)
Definition at line 85 of file SoByteStream.h.
SoByteStream::SoByteStream | ( | ) |
Constructor.
SoByteStream::~SoByteStream | ( | ) |
Destructor.
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().
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().
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().
|
inline |
Returns the data from the last convert() operation.
This byte stream format is well suited to data transfers, like copy and paste.
Definition at line 129 of file SoByteStream.h.
|
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.
Definition at line 136 of file SoByteStream.h.
|
static |
Takes byte stream data and unconverts it back to scene graph objects.
The objects are returned in a path list.
|
static |
Takes byte stream data and unconverts it back to scene graph objects.
The objects are returned in a path list.