TransformationPipe Class Reference

#include <TransformationPipe.h>

Inherited by TransformationPipeMT.

Collaboration diagram for TransformationPipe:

List of all members.


Classes

union  MASK

Public Member Functions

 TransformationPipe (OSG::UInt64 pipeId, User *owner)
virtual ~TransformationPipe ()
virtual void push_back (TransformationData &data)
virtual int size ()
virtual TransformationData getTransformation (unsigned index)
virtual void flush ()
void addStage (TransformationModifier *stage)
bool setMerger (TransformationMerger *merger)
TransformationData execute ()
TransformationData executeAfterMerger (TransformationData lastResult)
UsergetOwner ()
OSG::UInt64 getPipeId ()
unsigned getPriority ()
void setExecutionInterval (float sec, float offset=0.0f)
float getExecutionInterval ()

Protected Types

enum  FLUSHSTRATEGY { FLUSHSTRATEGY_QUORUM, FLUSHSTRATEGY_TIMEOUT }

Protected Member Functions

void setFlushStrategy (FLUSHSTRATEGY stratetgy, unsigned param)

Protected Attributes

unsigned priority
Userowner
unsigned flushParam
FLUSHSTRATEGY flushStrategy
std::deque
< TransformationPipeData
transformationData
std::vector
< TransformationModifier * > 
stages
OSG::UInt64 pipeId
float executionInterval
float timeToNextExecution
TransformationMergermerger
int mergerIndex

Friends

class TransformationManager

Member Enumeration Documentation

THis determines, how many/which entries are removed from the pipe, if flush() is called.

Enumerator:
FLUSHSTRATEGY_QUORUM  remove TransformationData, until size() <= flushParam (default: 2)
FLUSHSTRATEGY_TIMEOUT  not implemented yet.


Constructor & Destructor Documentation

TransformationPipe::TransformationPipe ( OSG::UInt64  pipeId,
User owner 
)

Create a new TransformationPipe.

Parameters:
pipeId,as calculated by TransformationManager::packPipeId
owner the User owning the pipe.

TransformationPipe::~TransformationPipe (  )  [virtual]


Member Function Documentation

void TransformationPipe::addStage ( TransformationModifier stage  ) 

Add a new modifier as final stage.

TransformationData TransformationPipe::execute (  ) 

Execute all stages up to the merger (if set). Stages after the merger won't be executed.

TransformationData TransformationPipe::executeAfterMerger ( TransformationData  lastResult  ) 

Execute the remaining stages, after execute() has already been called.

Parameters:
lastResult the TransformationData returned by execute().

void TransformationPipe::flush (  )  [virtual]

Flush the TransformationPipe according to its flush strategy.

Reimplemented in TransformationPipeMT.

float TransformationPipe::getExecutionInterval (  ) 

The execution interval.

See also:
setExecutionInterval()

User * TransformationPipe::getOwner (  ) 

Return the owner of the pipe.

UInt64 TransformationPipe::getPipeId (  ) 

unsigned TransformationPipe::getPriority (  ) 

The pipe priority. The TransformationManager executes pipes with a higher priority first.

TransformationData TransformationPipe::getTransformation ( unsigned  index  )  [virtual]

Direct access to a TransformationData by its index in the deque.

Reimplemented in TransformationPipeMT.

void TransformationPipe::push_back ( TransformationData data  )  [virtual]

Put a TransformationData into the pipe. The TransformationData is wrapped in a TransformationPipeData, with the timestamp of the push_back operation.

Reimplemented in TransformationPipeMT.

void TransformationPipe::setExecutionInterval ( float  sec,
float  offset = 0.0f 
)

Set the desired execution interval and time-offset of the pipe. The TransformationManager will try to execute each pipe approximately once per execution interval.

Parameters:
sec mean time (in seconds) between execution.
Todo:
remove offset, because it isn't honored by TransformationManager::execute()

void TransformationPipe::setFlushStrategy ( FLUSHSTRATEGY  stratetgy,
unsigned  param 
) [protected]

bool TransformationPipe::setMerger ( TransformationMerger merger  ) 

Set a merger for the pipe. Any stages added after this will only be executed, if executeAfterMerger() is called.

int TransformationPipe::size (  )  [virtual]

The number of TransformationDatas in the pipe.

Reimplemented in TransformationPipeMT.


Friends And Related Function Documentation

friend class TransformationManager [friend]

current layout (order of bit significance:) bit: (x-X is both inclusive) 0 msg received by network 1-7 srcId (7 bit) 8 unused 9-15 dstId (7 bit) 16-23 pipe type (8 bit) 24-31 object class (8 bit) 32-47 object type (16 bit) 48-63 object id (16 bit)


Member Data Documentation

unsigned TransformationPipe::flushParam [protected]

OSG::UInt64 TransformationPipe::pipeId [protected]

unsigned TransformationPipe::priority [protected]


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

Generated on Wed Oct 20 16:12:01 2010 for inVRs by doxygen 1.5.8