Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::BinaryDataHandler Class Reference
[Base]

#include <OSGBinaryDataHandler.h>

Inheritance diagram for osg::BinaryDataHandler:

osg::BINLoader::BinaryFileHandler osg::BINWriter::BinaryFileHandler osg::Connection osg::GroupConnection osg::PointConnection osg::GroupSockConnection osg::PointSockConnection osg::GroupMCastConnection osg::GroupSockPipeline osg::PointMCastConnection osg::PointSockPipeline List of all members.

Public Member Functions

Constructors
BinaryDataHandler (UInt32 zeroCopyThreshold=0, bool networkOrder=true)
Destructors
*virtual ~BinaryDataHandler (void)

Protected Types

typedef std::vector< MemoryBlockBuffersT
typedef std::list< MemoryHandleFreeMemT

Private Member Functions

 BinaryDataHandler (const BinaryDataHandler &source)
 prohibit default function (move to 'public' if needed)
void operator= (const BinaryDataHandler &source)
 prohibit default function (move to 'public' if needed)
Internal Helper
*void pushBuffer (void)
void pullBuffer (void)
void freeMem (void)

Classes

struct  MemoryBlock
struct  ReadError
struct  WriteError

Detailed Description

Definition at line 60 of file OSGBinaryDataHandler.h.


Member Typedef Documentation

typedef std::vector<MemoryBlock> osg::BinaryDataHandler::BuffersT [protected]
 

Definition at line 213 of file OSGBinaryDataHandler.h.

typedef std::list<MemoryHandle> osg::BinaryDataHandler::FreeMemT [protected]
 

Definition at line 214 of file OSGBinaryDataHandler.h.


Constructor & Destructor Documentation

BinaryDataHandler::BinaryDataHandler UInt32  zeroCopyThreshold = 0,
bool  networkOrder = true
 

Definition at line 57 of file OSGBinaryDataHandler.cpp.

00058                                                                :
00059     _readBuffers          (                 ),
00060     _writeBuffers         (                 ),
00061     _zeroCopyBuffers      (                 ),
00062     _zeroCopyThreshold    (zeroCopyThreshold),
00063     _freeMem              (                 ),
00064     _currentReadBuffer    (                 ),
00065     _currentReadBufferPos (0                ),
00066     _currentWriteBuffer   (                 ),
00067     _currentWriteBufferPos(0                ),
00068     _networkOrder         (networkOrder     )
00069 {
00070 }

BinaryDataHandler::~BinaryDataHandler void   )  [virtual]
 

Definition at line 75 of file OSGBinaryDataHandler.cpp.

References freeMem().

00076 {
00077     freeMem();
00078 }

osg::BinaryDataHandler::BinaryDataHandler const BinaryDataHandler source  )  [private]
 


Member Function Documentation

void BinaryDataHandler::put void const *  src,
UInt32  size
 

Definition at line 83 of file OSGBinaryDataHandler.cpp.

References _currentWriteBuffer, _currentWriteBufferPos, _zeroCopyBuffers, _zeroCopyThreshold, osg::osgMin(), pushBuffer(), write(), and writeBufEnd().

Referenced by putAndFree(), putValue(), putValues(), and osg::ClusterViewBuffer::send().

00084 {
00085     UInt8 const *data = static_cast<UInt8 const *>(src);
00086 
00087     if(_zeroCopyThreshold && size >= _zeroCopyThreshold)
00088     {
00089         if(_zeroCopyThreshold == 1)
00090         {
00091             write(const_cast<MemoryHandle>(data), size);
00092         }
00093         else
00094         {
00095             UInt8 tag = 1;
00096 
00097             // we have to write a tag, to indicate the membership
00098             // of this zero copy block to the current data block
00099             put(&tag, sizeof(tag));
00100 
00101             _zeroCopyBuffers.push_back(
00102                 MemoryBlock(const_cast<MemoryHandle>(data), size, size));
00103         }
00104     }
00105     else
00106     {
00107         UInt32 copySize;
00108 
00109         while(size != 0)
00110         {
00111             if(_currentWriteBuffer == writeBufEnd())
00112             {
00113                 pushBuffer();
00114             }
00115 
00116             copySize = osgMin((_currentWriteBuffer->getSize() -
00117                                _currentWriteBufferPos),
00118                               size);
00119 
00120             memcpy(_currentWriteBuffer->getMem() + _currentWriteBufferPos,
00121                     data,
00122                     copySize);
00123 
00124              size                  -= copySize;
00125             _currentWriteBufferPos += copySize;
00126              data                  += copySize;
00127 
00128             // skip to next buffer if current buffer is full
00129             if(_currentWriteBufferPos == _currentWriteBuffer->getSize())
00130             {
00131                 _currentWriteBuffer->setDataSize(_currentWriteBufferPos);
00132                 _currentWriteBuffer++;
00133                 _currentWriteBufferPos = 0;
00134             }
00135         }
00136     }
00137 }

void BinaryDataHandler::putAndFree MemoryHandle  src,
UInt32  size
 

Put data from dynamic allocated block The caller doesn't know, when the block will be written. So we are responsible for freeing this block.

Definition at line 144 of file OSGBinaryDataHandler.cpp.

References _freeMem, _zeroCopyThreshold, and put().

00145 {
00146     put(src, size);
00147 
00148     if(_zeroCopyThreshold && size > _zeroCopyThreshold)
00149     {
00150         _freeMem.push_back(src);
00151     }
00152     else
00153     {
00154         delete [] src;
00155     }
00156 }

void osg::BinaryDataHandler::putValue const bool &  value  )  [inline]
 

Definition at line 60 of file OSGBinaryDataHandler.inl.

References put().

Referenced by osg::SortFirstWindow::clientInit(), osg::ClusterNetwork::connectAllGroupToPoint(), osg::ClusterNetwork::connectAllPointToPoint(), osg::FieldDataTraits2< bool >::copyToBin(), osg::RenderNode::copyToBin(), osg::ParticleBSPTree::copyToBin(), osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::FieldTraitsIntegralRecurseMapper< Int32 >::copyToBin(), osg::FieldTraitsRecurseBase1< GLXContext >::copyToBin(), osg::FieldTraitsRecurseBase< DisplayCalibrationPtr >::copyToBin(), osg::FieldTraitsRecurseMapper< FieldContainerPtr, false >::copyToBin(), osg::FieldDataTraits< Plane >::copyToBin(), osg::FieldDataTraits1< GLenum >::copyToBin(), osg::FieldDataTraits1< BitVector >::copyToBin(), osg::FieldDataTraits< DynamicVolume >::copyToBin(), osg::FieldDataTraits1< Time >::copyToBin(), osg::FieldDataTraits< std::string >::copyToBin(), osg::FieldTraitsRecurseMapper< AttachmentMap, false >::copyToBin(), osg::BINWriter::doWriteIndexedFC(), osg::RemoteAspect::handleFCMapping(), osg::ClusterWindow::init(), putValue(), putValues(), osg::ClusterViewBuffer::send(), osg::RemoteAspect::sendSync(), osg::SortFirstWindow::serverInit(), osg::GroupMCastConnection::signal(), osg::ClusterServer::start(), and osg::BINWriter::writeFileHeader().

00061 {
00062     // on Mac OS X a bool is four bytes long on all other
00063     // platfroms it is one byte long. So we write now always
00064     // one byte out.
00065     // put(&value, sizeof(bool));
00066     UInt8 temp = (UInt8) value;
00067     put(&temp, sizeof(UInt8));
00068 }

void osg::BinaryDataHandler::putValue const UInt8 value  )  [inline]
 

Definition at line 71 of file OSGBinaryDataHandler.inl.

References put().

00072 {
00073     put(&value, sizeof(UInt8));
00074 }

void osg::BinaryDataHandler::putValue const UInt16 value  )  [inline]
 

Definition at line 77 of file OSGBinaryDataHandler.inl.

References osg::osghtons(), and put().

00078 {
00079     UInt16 z = osghtons(value);
00080 
00081     put(&z, sizeof(UInt16));
00082 }

void osg::BinaryDataHandler::putValue const UInt32 value  )  [inline]
 

Definition at line 85 of file OSGBinaryDataHandler.inl.

References osg::osghtonl(), and put().

00086 {
00087     UInt32 z = osghtonl(value);
00088 
00089     put(&z, sizeof(UInt32));
00090 }

void osg::BinaryDataHandler::putValue const UInt64 value  )  [inline]
 

Definition at line 93 of file OSGBinaryDataHandler.inl.

References osg::osghtonll(), and put().

00094 {
00095     UInt64 z = osghtonll(value);
00096 
00097     put(&z, sizeof(UInt64));
00098 }

void osg::BinaryDataHandler::putValue const Int8 value  )  [inline]
 

Definition at line 101 of file OSGBinaryDataHandler.inl.

References put().

00102 {
00103     put(&value, sizeof(Int8));
00104 }

void osg::BinaryDataHandler::putValue const Int16 value  )  [inline]
 

Definition at line 107 of file OSGBinaryDataHandler.inl.

References osg::osghtons(), and put().

00108 {
00109     Int16 z = osghtons(value);
00110 
00111     put(&z, sizeof(Int16));
00112 }

void osg::BinaryDataHandler::putValue const Int32 value  )  [inline]
 

Definition at line 115 of file OSGBinaryDataHandler.inl.

References osg::osghtonl(), and put().

00116 {
00117     Int32 z = osghtonl(value);
00118 
00119     put(&z, sizeof(Int32));
00120 }

void osg::BinaryDataHandler::putValue const Int64 value  )  [inline]
 

Definition at line 123 of file OSGBinaryDataHandler.inl.

References osg::osghtonll(), and put().

00124 {
00125     Int64 z = osghtonll(value);
00126     put(&z, sizeof(Int64));
00127 
00128 }

void osg::BinaryDataHandler::putValue const Real16 value  )  [inline]
 

Definition at line 131 of file OSGBinaryDataHandler.inl.

References osg::Real16::bits(), osg::osghtons(), and put().

00132 {
00133     UInt16 v = osghtons(value.bits());
00134 
00135     put(&v, sizeof(Real16));
00136 }

void osg::BinaryDataHandler::putValue const Real32 value  )  [inline]
 

Definition at line 139 of file OSGBinaryDataHandler.inl.

References osg::osghtonl(), and put().

00140 {
00141     UInt32 v = osghtonl( *((const UInt32 *)(&value)) );
00142 
00143     put(&v, sizeof(Real32));
00144 }

void osg::BinaryDataHandler::putValue const Real64 value  )  [inline]
 

Definition at line 147 of file OSGBinaryDataHandler.inl.

References osg::osghtonll(), and put().

00148 {
00149     UInt64 v = osghtonll( *((const UInt64 *)(&value)) );
00150 
00151     put(&v, sizeof(Real64));
00152 }

void osg::BinaryDataHandler::putValue const Real128 value  )  [inline]
 

Definition at line 155 of file OSGBinaryDataHandler.inl.

References osg::osghtonll(), and put().

00156 {
00157     UInt64 v = osghtonll( *( (const UInt64 *)(&value)) );
00158     UInt64 w = osghtonll( *(((const UInt64 *)(&value)) + 1) );
00159 
00160 #if BYTE_ORDER == LITTLE_ENDIAN
00161     put(&w, sizeof(UInt64));
00162     put(&v, sizeof(UInt64));
00163 #else
00164     put(&v, sizeof(UInt64));
00165     put(&w, sizeof(UInt64));
00166 #endif
00167 }

void osg::BinaryDataHandler::putValue const std::string &  value  )  [inline]
 

Definition at line 170 of file OSGBinaryDataHandler.inl.

References put(), putValue(), and osg::stringlen().

00171 {
00172     UInt32 len = stringlen(value.c_str()) + 1;
00173 
00174     putValue(len);
00175 
00176     if(len != 0)
00177     {
00178         put(value.c_str(), len);
00179     }
00180 }

void osg::BinaryDataHandler::putValues const bool *  value,
UInt32  size
[inline]
 

Definition at line 184 of file OSGBinaryDataHandler.inl.

References put().

Referenced by osg::FieldTraitsRecurseVecStoreBase< Pnt2b >::copyToBin(), osg::FieldDataTraits< Quaternion >::copyToBin(), osg::FieldDataTraits< Matrix >::copyToBin(), osg::FieldTraitsIntegralRecurseMapper< Int32 >::copyToBin(), osg::FieldDataTraits< Plane >::copyToBin(), osg::FieldDataTraits< DynamicVolume >::copyToBin(), osg::FieldDataTraits1< Time >::copyToBin(), osg::FieldDataTraits< Color4ub >::copyToBin(), osg::FieldDataTraits< Color3ub >::copyToBin(), osg::FieldDataTraits< Color4f >::copyToBin(), and osg::FieldDataTraits< Color3f >::copyToBin().

00185 {
00186     put(value, size * sizeof(bool));
00187 }

void osg::BinaryDataHandler::putValues const UInt8 value,
UInt32  size
[inline]
 

Definition at line 190 of file OSGBinaryDataHandler.inl.

References put().

00191 {
00192     put(value, size * sizeof(UInt8));
00193 }

void osg::BinaryDataHandler::putValues const UInt16 value,
UInt32  size
[inline]
 

Definition at line 196 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00197 {
00198 #if BYTE_ORDER == LITTLE_ENDIAN
00199 
00200     if(_networkOrder == true)
00201     {
00202         for(UInt32 i = 0; i < size; ++i)
00203         {
00204             putValue(value[i]);
00205         }
00206     }
00207     else
00208 #endif
00209     {
00210         put(value, size * sizeof(UInt16));
00211     }
00212 }

void osg::BinaryDataHandler::putValues const UInt32 value,
UInt32  size
[inline]
 

Definition at line 215 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00216 {
00217 #if BYTE_ORDER == LITTLE_ENDIAN
00218     if(_networkOrder == true)
00219     {
00220         for(UInt32 i = 0; i < size; ++i)
00221         {
00222             putValue(value[i]);
00223         }
00224     }
00225     else
00226 #endif
00227     {
00228         put(value, size * sizeof(UInt32));
00229     }
00230 }

void osg::BinaryDataHandler::putValues const UInt64 value,
UInt32  size
[inline]
 

Definition at line 233 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00234 {
00235 #if BYTE_ORDER == LITTLE_ENDIAN
00236     if(_networkOrder == true)
00237     {
00238         for(UInt32 i = 0; i < size; ++i)
00239         {
00240             putValue(value[i]);
00241         }
00242     }
00243     else
00244 #endif
00245     {
00246         put(value, size * sizeof(UInt64));
00247     }
00248 }

void osg::BinaryDataHandler::putValues const Int8 value,
UInt32  size
[inline]
 

Definition at line 251 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00252 {
00253 #if BYTE_ORDER == LITTLE_ENDIAN
00254     if(_networkOrder == true)
00255     {
00256         for(UInt32 i = 0; i < size; ++i)
00257         {
00258             putValue(value[i]);
00259         }
00260     }
00261     else
00262 #endif
00263     {
00264         put(value, size * sizeof(Int8));
00265     }
00266 }

void osg::BinaryDataHandler::putValues const Int16 value,
UInt32  size
[inline]
 

Definition at line 269 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00270 {
00271 #if BYTE_ORDER == LITTLE_ENDIAN
00272     if(_networkOrder == true)
00273     {
00274         for(UInt32 i = 0; i < size; ++i)
00275         {
00276             putValue(value[i]);
00277         }
00278     }
00279     else
00280 #endif
00281     {
00282         put(value, size * sizeof(Int16));
00283     }
00284 }

void osg::BinaryDataHandler::putValues const Int32 value,
UInt32  size
[inline]
 

Definition at line 287 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00288 {
00289 #if BYTE_ORDER == LITTLE_ENDIAN
00290     if(_networkOrder == true)
00291     {
00292         for(UInt32 i = 0; i < size; ++i)
00293         {
00294             putValue(value[i]);
00295         }
00296     }
00297     else
00298 #endif
00299     {
00300         put(value, size * sizeof(Int32));
00301     }
00302 }

void osg::BinaryDataHandler::putValues const Int64 value,
UInt32  size
[inline]
 

Definition at line 305 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00306 {
00307 #if BYTE_ORDER == LITTLE_ENDIAN
00308     if(_networkOrder == true)
00309     {
00310         for(UInt32 i = 0; i < size; ++i)
00311         {
00312             putValue(value[i]);
00313         }
00314     }
00315     else
00316 #endif
00317     {
00318         put(value, size * sizeof(Int64));
00319     }
00320 }

void osg::BinaryDataHandler::putValues const Real16 value,
UInt32  size
[inline]
 

Definition at line 323 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00324 {
00325 #if BYTE_ORDER == LITTLE_ENDIAN
00326     if(_networkOrder == true)
00327     {
00328         for(UInt32 i = 0; i < size; ++i)
00329         {
00330             putValue(value[i]);
00331         }
00332     }
00333     else
00334 #endif
00335     {
00336         put(value, size * sizeof(Real16));
00337     }
00338 }

void osg::BinaryDataHandler::putValues const Real32 value,
UInt32  size
[inline]
 

Definition at line 341 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00342 {
00343 #if BYTE_ORDER == LITTLE_ENDIAN
00344     if(_networkOrder == true)
00345     {
00346         for(UInt32 i = 0; i < size; ++i)
00347         {
00348             putValue(value[i]);
00349         }
00350     }
00351     else
00352 #endif
00353     {
00354         put(value, size * sizeof(Real32));
00355     }
00356 }

void osg::BinaryDataHandler::putValues const Real64 value,
UInt32  size
[inline]
 

Definition at line 359 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00360 {
00361 #if BYTE_ORDER == LITTLE_ENDIAN
00362     if(_networkOrder == true)
00363     {
00364         for(UInt32 i = 0; i < size; ++i)
00365         {
00366             putValue(value[i]);
00367         }
00368     }
00369     else
00370 #endif
00371     {
00372         put(value, size * sizeof(Real64));
00373     }
00374 }

void osg::BinaryDataHandler::putValues const Real128 value,
UInt32  size
[inline]
 

Definition at line 377 of file OSGBinaryDataHandler.inl.

References _networkOrder, put(), and putValue().

00378 {
00379 #if BYTE_ORDER == LITTLE_ENDIAN
00380     if(_networkOrder == true)
00381     {
00382         for(UInt32 i = 0; i < size; ++i)
00383         {
00384             putValue(value[i]);
00385         }
00386     }
00387     else
00388 #endif
00389     {
00390         put(value, size * sizeof(Real128));
00391     }
00392 }

void osg::BinaryDataHandler::putValues const std::string *  value,
UInt32  size
[inline]
 

Definition at line 395 of file OSGBinaryDataHandler.inl.

References putValue().

00396 {
00397     for(UInt32 i = 0; i<size; ++i)
00398     {
00399         putValue(value[i]);    
00400     }
00401 }

void BinaryDataHandler::get void *  dst,
UInt32  size
 

Definition at line 161 of file OSGBinaryDataHandler.cpp.

References _currentReadBuffer, _currentReadBufferPos, _zeroCopyThreshold, osg::osgMin(), pullBuffer(), read(), and readBufEnd().

Referenced by getAndAlloc(), getValue(), getValues(), osg::RemoteAspect::receiveSync(), and osg::ClusterViewBuffer::recv().

00162 {
00163     MemoryHandle data = static_cast<MemoryHandle>(dst);
00164 
00165     if(_zeroCopyThreshold && size >= _zeroCopyThreshold)
00166     {
00167         if(_zeroCopyThreshold > 1)
00168         {
00169             UInt8 tag;
00170 
00171             // we have to read the tag, to force reading of data blocks
00172             // if the first data field was zero copied
00173             get(&tag, sizeof(tag));
00174         }
00175 
00176         // read direct into destination
00177         read(data, size);
00178     }
00179     else
00180     {
00181         UInt32 copySize;
00182 
00183         while(size != 0)
00184         {
00185             // read new data if nothing left
00186             if(_currentReadBuffer == readBufEnd())
00187             {
00188                 pullBuffer();
00189             }
00190 
00191             // num bytes to copy
00192             copySize = osgMin((_currentReadBuffer->getDataSize() -
00193                                _currentReadBufferPos),
00194                               size);
00195 
00196             // no data in buffer ?
00197             if(copySize != 0)
00198             {
00199                 memcpy( data,
00200                        _currentReadBuffer->getMem() + _currentReadBufferPos,
00201                         copySize);
00202 
00203                  size                 -= copySize;
00204                 _currentReadBufferPos += copySize;
00205                  data                 += copySize;
00206             }
00207 
00208             // skip to next buffer if current buffer is full
00209             if(_currentReadBufferPos == _currentReadBuffer->getDataSize())
00210             {
00211                 _currentReadBuffer++;
00212                 _currentReadBufferPos = 0;
00213             }
00214         }
00215     }
00216 }

void BinaryDataHandler::getAndAlloc MemoryHandle src,
UInt32  size
 

read data in a dynamic allocated block

If data was compressed or converted then it is not possible to write it into the destination memory. BinaryDataHandler doesn't store data in continous memory areas. If the caller needs a continuous memory then we provide a dynamic allocated block. The caller is responsible to free this block.

Definition at line 227 of file OSGBinaryDataHandler.cpp.

References get().

00228 {
00229     src = new UInt8[size];
00230 
00231     get(src, size);
00232 }

void osg::BinaryDataHandler::getValue bool &  value  )  [inline]
 

Definition at line 404 of file OSGBinaryDataHandler.inl.

References get().

Referenced by osg::BINLoader::chargeFieldContainers(), osg::SortFirstWindow::clientInit(), osg::ClusterNetwork::connectAllGroupToPoint(), osg::ClusterNetwork::connectAllPointToPoint(), osg::FieldDataTraits2< bool >::copyFromBin(), osg::RenderNode::copyFromBin(), osg::ParticleBSPTree::copyFromBin(), osg::MField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::FieldTraitsIntegralRecurseMapper< Int32 >::copyFromBin(), osg::FieldTraitsRecurseBase1< GLXContext >::copyFromBin(), osg::FieldTraitsRecurseBase< DisplayCalibrationPtr >::copyFromBin(), osg::FieldTraitsRecurseMapper< FieldContainerPtr, false >::copyFromBin(), osg::FieldDataTraits< Plane >::copyFromBin(), osg::FieldDataTraits1< GLenum >::copyFromBin(), osg::FieldDataTraits1< BitVector >::copyFromBin(), osg::FieldDataTraits< DynamicVolume >::copyFromBin(), osg::FieldDataTraits1< Time >::copyFromBin(), osg::FieldDataTraits< std::string >::copyFromBin(), osg::FieldTraitsRecurseMapper< AttachmentMap, false >::copyFromBin(), osg::BINLoader::createFieldContainers(), getValue(), getValues(), osg::ClusterWindow::init(), osg::RemoteAspect::receiveSync(), osg::ClusterViewBuffer::recv(), osg::SortFirstWindow::serverInit(), and osg::ClusterServer::start().

00405 {
00406     //get(&value, sizeof(bool));
00407     UInt8 temp;
00408     get(&temp, sizeof(UInt8));
00409     value = (temp!=0);
00410 }

void osg::BinaryDataHandler::getValue UInt8 value  )  [inline]
 

Definition at line 413 of file OSGBinaryDataHandler.inl.

References get().

00414 {
00415     get(&value, sizeof(UInt8));
00416 }

void osg::BinaryDataHandler::getValue UInt16 value  )  [inline]
 

Definition at line 419 of file OSGBinaryDataHandler.inl.

References get(), and osg::osgntohs().

00420 {
00421     get(&value, sizeof(UInt16));
00422 
00423     value = osgntohs(value);
00424 }

void osg::BinaryDataHandler::getValue UInt32 value  )  [inline]
 

Definition at line 427 of file OSGBinaryDataHandler.inl.

References get(), and osg::osgntohl().

00428 {
00429     get(&value, sizeof(UInt32));
00430 
00431     value = osgntohl(value);
00432 }

void osg::BinaryDataHandler::getValue UInt64 value  )  [inline]
 

Definition at line 435 of file OSGBinaryDataHandler.inl.

References get(), and osg::osgntohll().

00436 {
00437     get(&value, sizeof(UInt64));
00438 
00439     value = osgntohll(value);
00440 }

void osg::BinaryDataHandler::getValue Int8 value  )  [inline]
 

Definition at line 443 of file OSGBinaryDataHandler.inl.

References get().

00444 {
00445     get(&value, sizeof(Int8));
00446 }

void osg::BinaryDataHandler::getValue Int16 value  )  [inline]
 

Definition at line 449 of file OSGBinaryDataHandler.inl.

References get(), and osg::osgntohs().

00450 {
00451     get(&value, sizeof(Int16));
00452 
00453     value = osgntohs(value);
00454 }

void osg::BinaryDataHandler::getValue