Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

WorldStatePool::WriteRequest Class Reference

#include <WorldStatePool.h>

Inheritance diagram for WorldStatePool::WriteRequest:

Inheritance graph
[legend]
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 76 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 79 of file WorldStatePool.h.

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

shallow copy constructor supported

Definition at line 83 of file WorldStatePool.h.


Member Function Documentation

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

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

Definition at line 93 of file WorldStatePool.h.

Referenced by WorldStatePool::doReleaseResource().

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 91 of file WorldStatePool.h.

Referenced by WorldStatePool::doReleaseResource().

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

shallow assignment supported

Definition at line 85 of file WorldStatePool.h.

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 94 of file WorldStatePool.h.

Referenced by WorldStatePool::doUseResource().

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 92 of file WorldStatePool.h.

Referenced by WorldStatePool::doUseResource().


Member Data Documentation

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 98 of file WorldStatePool.h.

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

should be initialized to the frame number about to be written

Definition at line 89 of file WorldStatePool.h.

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

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

Definition at line 87 of file WorldStatePool.h.

Referenced by operator=().

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 97 of file WorldStatePool.h.

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


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

Tekkotsu v3.0
Generated Wed Oct 4 00:05:20 2006 by Doxygen 1.4.7