Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

WorldStatePool::WriteRequest Class Reference

#include <WorldStatePool.h>

Inheritance diagram for WorldStatePool::WriteRequest:

List of all members.


Detailed Description

retrieves the current WorldState entry, and through it's destructor, marks the entry available again when it goes out of scope

By default, when the release occurs, the entry is marked "complete" unless you have called setComplete(false) before then

Definition at line 77 of file WorldStatePool.h.


Public Member Functions

 WriteRequest (WorldState *&target, bool block, unsigned int frame_number)
 stores the oldest unreferenced WorldState into tgt, optionally blocking if an update is currently in progress for the same frame
 WriteRequest (const WriteRequest &r)
 shallow copy constructor supported
WriteRequestoperator= (const WriteRequest &r)
 shallow assignment supported
unsigned int getStatus () const
 returns the WorldStatePool::status value for the target WorldState entry (see documentation for WorldStatePool::status)
void setStatus (unsigned int status)
 sets the WorldStatePool::status value for the target WorldState entry (see documentation for WorldStatePool::status)
bool getComplete () const
 returns the WorldStatePool::complete value for the target WorldState entry (see documentation for WorldStatePool::complete)
void setComplete (bool complete)
 returns the WorldStatePool::complete value for the target WorldState entry (see documentation for WorldStatePool::complete)

Public Attributes

WorldStatesrc
 will be set to the previously written element, so you can copy over unmodified values
ReadRequest srcRequest
 used to get src
unsigned int frame
 should be initialized to the frame number about to be written

Protected Attributes

unsigned int statusCache
 when using resource, this field is set to the status field for that entry, and when released, this value is stored back
bool completeCache
 when using resource, this field is set to the complete flag for that entry, and when released, this value is stored back

Constructor & Destructor Documentation

WorldStatePool::WriteRequest::WriteRequest ( WorldState *&  target,
bool  block,
unsigned int  frame_number 
) [inline]

stores the oldest unreferenced WorldState into tgt, optionally blocking if an update is currently in progress for the same frame

Definition at line 80 of file WorldStatePool.h.

WorldStatePool::WriteRequest::WriteRequest ( const WriteRequest r  )  [inline]

shallow copy constructor supported

Definition at line 84 of file WorldStatePool.h.


Member Function Documentation

WriteRequest& WorldStatePool::WriteRequest::operator= ( const WriteRequest r  )  [inline]

shallow assignment supported

Definition at line 86 of file WorldStatePool.h.

unsigned int WorldStatePool::WriteRequest::getStatus (  )  const [inline]

returns the WorldStatePool::status value for the target WorldState entry (see documentation for WorldStatePool::status)

Definition at line 92 of file WorldStatePool.h.

Referenced by WorldStatePool::doReleaseResource(), and WorldStatePool::read().

void WorldStatePool::WriteRequest::setStatus ( unsigned int  status  )  [inline]

sets the WorldStatePool::status value for the target WorldState entry (see documentation for WorldStatePool::status)

Definition at line 93 of file WorldStatePool.h.

Referenced by WorldStatePool::doUseResource(), and WorldStatePool::read().

bool WorldStatePool::WriteRequest::getComplete (  )  const [inline]

returns the WorldStatePool::complete value for the target WorldState entry (see documentation for WorldStatePool::complete)

Definition at line 94 of file WorldStatePool.h.

Referenced by WorldStatePool::doReleaseResource(), and WorldStatePool::read().

void WorldStatePool::WriteRequest::setComplete ( bool  complete  )  [inline]

returns the WorldStatePool::complete value for the target WorldState entry (see documentation for WorldStatePool::complete)

Definition at line 95 of file WorldStatePool.h.

Referenced by WorldStatePool::doUseResource(), and WorldStatePool::read().


Member Data Documentation

will be set to the previously written element, so you can copy over unmodified values

Definition at line 88 of file WorldStatePool.h.

Referenced by operator=(), and WorldStatePool::read().

should be initialized to the frame number about to be written

Definition at line 90 of file WorldStatePool.h.

Referenced by WorldStatePool::doUseResource(), operator=(), and WorldStatePool::read().

when using resource, this field is set to the status field for that entry, and when released, this value is stored back

Definition at line 98 of file WorldStatePool.h.

Referenced by getStatus(), operator=(), and setStatus().

when using resource, this field is set to the complete flag for that entry, and when released, this value is stored back

Definition at line 99 of file WorldStatePool.h.

Referenced by getComplete(), operator=(), and setComplete().


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

Tekkotsu v4.0
Generated Thu Nov 22 00:58:49 2007 by Doxygen 1.5.4