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

osg::GroupConnection Class Reference
[Network]

#include <OSGGroupConnection.h>

Inheritance diagram for osg::GroupConnection:

osg::Connection osg::BinaryDataHandler osg::GroupSockConnection osg::GroupMCastConnection osg::GroupSockPipeline List of all members.

Read

*BuffersT::iterator readBufBegin (void)
BuffersT::iterator readBufEnd (void)
void readBufAdd (MemoryHandle mem, UInt32 size, UInt32 dataSize=0)
void readBufClear (void)
virtual void read (MemoryHandle src, UInt32 size)
virtual void readBuffer (void)

Write

*BuffersT::iterator writeBufBegin (void)
BuffersT::iterator writeBufEnd (void)
void writeBufAdd (MemoryHandle mem, UInt32 size, UInt32 dataSize=0)
void writeBufClear (void)
virtual void write (MemoryHandle src, UInt32 size)
virtual void writeBuffer (void)

Public Member Functions

Constructors
GroupConnection (int zeroCopyThreshold)
virtual ~GroupConnection (void)
type info
*virtual const ConnectionTypegetType (void)=0
connection
*virtual void disconnect (Channel channel)=0
channel handling
*UInt32 getChannelCount (void)
void addSelection (Channel channel)
void subSelection (Channel channel)
void clearSelection (void)
void resetSelection (void)
UInt32 getSelectionCount (void)
group address
*void setDestination (const std::string &destination)
std::string getDestination (void)
connection
*virtual Channel connectPoint (const std::string &address, Time timeout=-1)=0
virtual Channel acceptPoint (Time timeout=-1)=0
synchronisation
*virtual bool wait (Time timeout=-1)=0 throw (ReadError )
virtual void signal (void)=0 throw (WriteError)
channel handling
*virtual Channel selectChannel (Time timeout=-1)=0 throw (ReadError)
bind to interface
*virtual std::string bind (const std::string &address="")=0

Protected Types

typedef std::vector< MemoryBlock > BuffersT
typedef std::list< MemoryHandleFreeMemT

Protected Member Functions

internal channel handling
*Channel newChannelIndex (ChannelIndex index)
void delChannelIndex (ChannelIndex index)
channel index mapping
*ChannelIndex channelToIndex (Channel channel) const
Channel indexToChannel (ChannelIndex index) const

Protected Attributes

protected fields
*std::vector< UInt8_selection
std::string _destination
std::set< Channel_disconnectedChannel
protected types
*typedef Int32 ChannelIndex

Private Types

typedef Connection Inherited

Private Member Functions

 GroupConnection (const GroupConnection &source)
GroupConnectionoperator= (const GroupConnection &source)

Private Attributes

private fields
*std::vector< ChannelIndex_channelToIndex
std::vector< Channel_indexToChannel
std::list< Channel_reuseChannel

Detailed Description

Definition at line 59 of file OSGGroupConnection.h.


Member Typedef Documentation

typedef Connection osg::GroupConnection::Inherited [private]
 

Reimplemented from osg::Connection.

Reimplemented in osg::GroupMCastConnection, osg::GroupSockConnection, and osg::GroupSockPipeline.

Definition at line 153 of file OSGGroupConnection.h.

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

Definition at line 213 of file OSGBinaryDataHandler.h.

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

Definition at line 214 of file OSGBinaryDataHandler.h.


Constructor & Destructor Documentation

GroupConnection::GroupConnection int  zeroCopyThreshold  ) 
 

Constructor

Definition at line 61 of file OSGGroupConnection.cpp.

00061                                                      :
00062     Connection(zeroCopyThreshold)
00063 {
00064 }

GroupConnection::~GroupConnection void   )  [virtual]
 

Destructor

Definition at line 69 of file OSGGroupConnection.cpp.

00070 {
00071 }

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


Member Function Documentation

* virtual const ConnectionType* osg::GroupConnection::getType void   )  [pure virtual]
 

Implements osg::Connection.

Implemented in osg::GroupMCastConnection, osg::GroupSockConnection, and osg::GroupSockPipeline.

* virtual void osg::GroupConnection::disconnect Channel  channel  )  [pure virtual]
 

Implemented in osg::GroupMCastConnection, osg::GroupSockConnection, and osg::GroupSockPipeline.

UInt32 GroupConnection::getChannelCount void   ) 
 

number of connected channels

Definition at line 78 of file OSGGroupConnection.cpp.

References _selection.

Referenced by osg::SortFirstWindow::clientInit(), osg::ClusterNetwork::connectAllGroupToPoint(), osg::ClusterNetwork::connectAllPointToPoint(), osg::ClusterViewBuffer::recv(), and osg::GroupSockPipeline::write().

00079 {
00080     return _selection.size();
00081 }

void GroupConnection::addSelection Channel  channel  ) 
 

mark the given channel as selectable

Definition at line 85 of file OSGGroupConnection.cpp.

References _channelToIndex, _selection, and ChannelIndex.

00086 {
00087     ChannelIndex index = _channelToIndex[channel];
00088     _selection[index] = true;
00089 }

void GroupConnection::subSelection Channel  channel  ) 
 

mark the given channel as not selectable

Definition at line 93 of file OSGGroupConnection.cpp.

References _channelToIndex, _selection, and ChannelIndex.

Referenced by osg::SortFirstWindow::clientInit(), osg::ClusterNetwork::connectAllGroupToPoint(), osg::ClusterNetwork::connectAllPointToPoint(), osg::ClusterWindow::init(), and osg::ClusterViewBuffer::recv().

00094 {
00095     ChannelIndex index = _channelToIndex[channel];
00096     _selection[index] = false;
00097 }

void GroupConnection::clearSelection void   ) 
 

mark all channels as selectable

Definition at line 101 of file OSGGroupConnection.cpp.

References _selection.

00102 {
00103     std::fill(_selection.begin(),_selection.end(),false);
00104 }

void GroupConnection::resetSelection void   ) 
 

mark all channels as not selectable

Definition at line 108 of file OSGGroupConnection.cpp.

References _selection.

Referenced by osg::SortFirstWindow::clientInit(), osg::ClusterNetwork::connectAllGroupToPoint(), osg::ClusterNetwork::connectAllPointToPoint(), osg::ClusterWindow::init(), and osg::ClusterViewBuffer::recv().

00109 {
00110     std::fill(_selection.begin(),_selection.end(),true);
00111 }

UInt32 GroupConnection::getSelectionCount void   ) 
 

get number of sockets in the selection

Definition at line 115 of file OSGGroupConnection.cpp.

References _selection.

Referenced by osg::ClusterNetwork::connectAllGroupToPoint().

00116 {
00117     UInt32 selectionCount=0;
00118     std::vector<UInt8>::iterator i;
00119     for(i=_selection.begin() ; i!=_selection.end() ; ++i)
00120         if(*i)
00121             selectionCount++;
00122     return selectionCount;
00123 }

void GroupConnection::setDestination const std::string &  destination  ) 
 

set destination address used to broadcast or multicast to all connected points. On Multicast connections this could be 224.22.22.1 or something like that.

Definition at line 132 of file OSGGroupConnection.cpp.

References _destination.

Referenced by osg::ClusterWindow::init().

00133 {
00134     _destination = destination;
00135 }

std::string GroupConnection::getDestination void   ) 
 

get destination address

Definition at line 139 of file OSGGroupConnection.cpp.

References _destination.

Referenced by osg::GroupMCastConnection::initialize().

00140 {
00141     return _destination;
00142 }

Connection::Channel GroupConnection::newChannelIndex ChannelIndex  index  )  [protected]
 

create a new channel

Definition at line 149 of file OSGGroupConnection.cpp.

References _channelToIndex, _indexToChannel, _reuseChannel, _selection, and osg::Connection::Channel.

Referenced by osg::GroupSockConnection::acceptPoint(), and osg::GroupSockConnection::connectPoint().

00150 {
00151     Channel channel;
00152     if(_reuseChannel.begin() != _reuseChannel.end())
00153     {
00154         channel = *(_reuseChannel.begin());
00155         _reuseChannel.pop_front();
00156     }
00157     else
00158     {
00159         channel = _channelToIndex.size();
00160         _channelToIndex.resize(channel+1);
00161     }
00162     if(index >= _indexToChannel.size())
00163         _indexToChannel.resize(index+1);
00164     if(index >= _selection.size())
00165         _selection.resize(index+1);
00166     // enable selection
00167     _selection[index] = true;
00168     // set index to channel mapping
00169     _indexToChannel[index] = channel;
00170     // set channel to index mapping
00171     _channelToIndex[channel] = index;
00172     return channel;
00173 }

void GroupConnection::delChannelIndex ChannelIndex  index  )  [protected]
 

remove a channel.

Definition at line 177 of file OSGGroupConnection.cpp.

References _indexToChannel, _reuseChannel, _selection, and osg::Connection::Channel.

Referenced by osg::GroupSockConnection::disconnect().

00178 {
00179     Channel channel = _indexToChannel[index];
00180     // erase from indexed arrays
00181     _selection     .erase(_selection.begin()      + index);
00182     _indexToChannel.erase(_indexToChannel.begin() + index);
00183     // move to reuse
00184     _reuseChannel.push_back(channel);
00185 }

GroupConnection::ChannelIndex GroupConnection::channelToIndex Channel  channel  )  const [protected]
 

Definition at line 190 of file OSGGroupConnection.cpp.

References _channelToIndex.

Referenced by osg::GroupSockConnection::disconnect(), and osg::GroupMCastConnection::disconnect().

00191 {
00192     return _channelToIndex[channel];
00193 }

Connection::Channel GroupConnection::indexToChannel ChannelIndex  index  )  const [protected]
 

Definition at line 195 of file OSGGroupConnection.cpp.

References _indexToChannel.

00196 {
00197     return _indexToChannel[index];
00198 }

GroupConnection& osg::GroupConnection::operator= const GroupConnection source  )  [private]
 

* virtual Channel osg::Connection::connectPoint const std::string &  address,
Time  timeout = -1
[pure virtual, inherited]
 

Implemented in osg::GroupMCastConnection, osg::GroupSockConnection, osg::GroupSockPipeline, and osg::PointSockConnection.

Referenced by osg::ClusterWindow::init().

virtual Channel osg::Connection::acceptPoint Time  timeout = -1  )  [pure virtual, inherited]
 

Implemented in osg::GroupMCastConnection, osg::GroupSockConnection, osg::GroupSockPipeline, and osg::PointSockConnection.

Referenced by osg::ClusterNetwork::connectAllGroupToPoint(), and osg::ClusterNetwork::connectAllPointToPoint().

* virtual bool osg::Connection::wait Time  timeout = -1  )  throw (ReadError ) [pure virtual, inherited]
 

Implemented in osg::PointConnection, osg::GroupMCastConnection, osg::GroupSockConnection, osg::PointMCastConnection, and osg::PointSockConnection.

Referenced by osg::SortFirstWindow::clientSwap(), osg::MultiDisplayWindow::clientSwap(), osg::SortFirstWindow::serverSwap(), and osg::MultiDisplayWindow::serverSwap().

virtual void osg::Connection::signal void   )  throw (WriteError) [pure virtual, inherited]
 

Implemented in osg::PointConnection, osg::GroupMCastConnection, osg::GroupSockConnection, and osg::PointSockConnection.

Referenced by osg::SortFirstWindow::clientSwap(), osg::MultiDisplayWindow::clientSwap(), osg::SortFirstWindow::serverSwap(), and osg::MultiDisplayWindow::serverSwap().

* virtual Channel osg::Connection::selectChannel Time  timeout = -1  )  throw (ReadError) [pure virtual, inherited]
 

Implemented in osg::GroupSockConnection, osg::PointMCastConnection, osg::PointSockConnection, and osg::PointSockPipeline.

Referenced by osg::SortFirstWindow::clientInit(), osg::MultiDisplayWindow::clientSwap(), osg::ClusterNetwork::connectAllGroupToPoint(), osg::ClusterNetwork::connectAllPointToPoint(), osg::ClusterWindow::init(), osg::RemoteAspect::receiveSync(), osg::ClusterViewBuffer::recv(), osg::SortFirstWindow::serverInit(), and osg::ClusterServer::start().

* virtual std::string osg::Connection::bind const std::string &  address = ""  )  [pure virtual, inherited]
 

Implemented in osg::GroupSockConnection, and osg::PointSockConnection.

Referenced by osg::ClusterServer::acceptClient().

void Connection::setParams const std::string &  params  )  [virtual, inherited]
 

set connections parameters, a comma separated list e.g. "TTL=255"

Reimplemented in osg::GroupMCastConnection, and osg::GroupSockConnection.

Definition at line 91 of file OSGConnection.cpp.

Referenced by osg::ClusterWindow::init().

00092 {
00093     // do nothing this is implemented in the derived classes e.g. OSGGroupMCastConnection.cpp
00094 }

const std::string & Connection::getInterface void   )  [inherited]
 

get network interface

Definition at line 98 of file OSGConnection.cpp.

References osg::Connection::_interface.

Referenced by osg::PointSockConnection::bind(), osg::GroupSockConnection::bind(), osg::PointSockPipeline::initialize(), osg::PointMCastConnection::initialize(), and osg::GroupMCastConnection::initialize().

00099 {
00100     return _interface;
00101 }

void Connection::setInterface const std::string &  interf  )  [inherited]
 

set network interface

Definition at line 105 of file OSGConnection.cpp.

References osg::Connection::_interface.

Referenced by osg::ClusterServer::acceptClient(), and osg::ClusterWindow::init().

00106 {
00107     _interface = interf;
00108 }

void BinaryDataHandler::put void const *  src,
UInt32  size
[inherited]
 

Definition at line 83 of file OSGBinaryDataHandler.cpp.

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

Referenced by osg::BinaryDataHandler::putAndFree(), osg::BinaryDataHandler::putValue(), osg::BinaryDataHandler::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
[inherited]
 

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 osg::BinaryDataHandler::_freeMem, osg::BinaryDataHandler::_zeroCopyThreshold, and osg::BinaryDataHandler::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, inherited]
 

Definition at line 60 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::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(), osg::BinaryDataHandler::putValue(), osg::BinaryDataHandler::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, inherited]
 

Definition at line 71 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::put().

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

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

Definition at line 77 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 85 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 93 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 101 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::put().

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

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

Definition at line 107 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 115 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 123 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 131 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 139 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 147 of file OSGBinaryDataHandler.inl.

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

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

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

Definition at line 155 of file OSGBinaryDataHandler.inl.

References osg::osghtonll(), and osg::BinaryDataHandler::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, inherited]
 

Definition at line 170 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::put(), osg::BinaryDataHandler::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, inherited]
 

Definition at line 184 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::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, inherited]
 

Definition at line 190 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::put().

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

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

Definition at line 196 of file OSGBinaryDataHandler.inl.

References osg::BinaryDataHandler::_networkOrder, osg::BinaryDataHandler::put(), and osg::BinaryDataHandler::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, inherited]
 

Definition at line