Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoByteStream Class Reference

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 SoPathListunconvert (SoByteStream *byteStream)
 Takes byte stream data and unconverts it back to scene graph objects.
 
static SoPathListunconvert (void *data, size_t numBytes)
 Takes byte stream data and unconverts it back to scene graph objects.
 

Detailed Description

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.)

SEE ALSO

SoWinClipboard

Definition at line 85 of file SoByteStream.h.

Constructor & Destructor Documentation

◆ SoByteStream()

SoByteStream::SoByteStream ( )

Constructor.

◆ ~SoByteStream()

SoByteStream::~SoByteStream ( )

Destructor.

Member Function Documentation

◆ convert() [1/3]

void SoByteStream::convert ( SoNode node,
SbBool  binaryFormat = TRUE 
)

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().

◆ convert() [2/3]

void SoByteStream::convert ( SoPath path,
SbBool  binaryFormat = TRUE 
)

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().

◆ convert() [3/3]

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().

◆ getData()

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.

Definition at line 129 of file SoByteStream.h.

◆ getNumBytes()

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.

Definition at line 136 of file SoByteStream.h.

◆ unconvert() [1/2]

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.

◆ unconvert() [2/2]

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.


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