Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CycleDataReader< CycleDataType > Class Template Reference

This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read() in the destructor. More...

#include <cycleDataReader.h>

List of all members.

Public Member Functions

 CycleDataReader (const PipelineCycler< CycleDataType > &cycler)
 CycleDataReader (const CycleDataReader< CycleDataType > &copy)
void operator= (const CycleDataReader< CycleDataType > &copy)
 ~CycleDataReader ()
const CycleDataType * operator-> () const
 This provides an indirect member access to the actual CycleData data.

 operator const CycleDataType * () const
 This allows the CycleDataReader to be passed to any function that expects a const CycleDataType pointer.

const CycleDataType * take_pointer ()
 This is intended to be called only from CycleDataWriter when it elevates the pointer from read to write status.

CycleDataType * elevate_to_write (PipelineCycler< CycleDataType > &cycler)
 Call this to permanently elevate the readable pointer to a writable pointer.


Private Attributes

const CycleDataType * _pointer


Detailed Description

template<class CycleDataType>
class CycleDataReader< CycleDataType >

This template class calls PipelineCycler::read() in the constructor and PipelineCycler::release_read() in the destructor.

In the interim, it provides a transparent read-only access to the CycleData.

It exists as a syntactic convenience to access the data in the CycleData. It also allows the whole system to compile down to nothing if SUPPORT_PIPELINING is not defined.

Definition at line 54 of file cycleDataReader.h.


Constructor & Destructor Documentation

template<class CycleDataType>
CycleDataReader< CycleDataType >::CycleDataReader const PipelineCycler< CycleDataType > &  cycler  )  [inline]
 

Definition at line 203 of file cycleDataReader.I.

template<class CycleDataType>
CycleDataReader< CycleDataType >::CycleDataReader const CycleDataReader< CycleDataType > &  copy  )  [inline]
 

Definition at line 216 of file cycleDataReader.I.

References INLINE.

template<class CycleDataType>
CycleDataReader< CycleDataType >::~CycleDataReader  )  [inline]
 

Definition at line 243 of file cycleDataReader.I.


Member Function Documentation

template<class CycleDataType>
CycleDataType * CycleDataReader< CycleDataType >::elevate_to_write PipelineCycler< CycleDataType > &  cycler  )  [inline]
 

Call this to permanently elevate the readable pointer to a writable pointer.

This returns a writable pointer; subsequent calls to the same function will trivially return the same writable pointer.

Definition at line 318 of file cycleDataReader.I.

template<class CycleDataType>
CycleDataReader< CycleDataType >::operator const CycleDataType *  )  const [inline]
 

This allows the CycleDataReader to be passed to any function that expects a const CycleDataType pointer.

Definition at line 274 of file cycleDataReader.I.

template<class CycleDataType>
const CycleDataType * CycleDataReader< CycleDataType >::operator->  )  const [inline]
 

This provides an indirect member access to the actual CycleData data.

Definition at line 258 of file cycleDataReader.I.

template<class CycleDataType>
void CycleDataReader< CycleDataType >::operator= const CycleDataReader< CycleDataType > &  copy  )  [inline]
 

Definition at line 230 of file cycleDataReader.I.

References INLINE.

template<class CycleDataType>
const CycleDataType * CycleDataReader< CycleDataType >::take_pointer  )  [inline]
 

This is intended to be called only from CycleDataWriter when it elevates the pointer from read to write status.

This function returns the reader's pointer and relinquishes ownership of the pointer, rendering the reader invalid for future reads.

Definition at line 298 of file cycleDataReader.I.


Member Data Documentation

template<class CycleDataType>
const CycleDataType* CycleDataReader< CycleDataType >::_pointer [private]
 

Definition at line 76 of file cycleDataReader.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:49:07 2003 for Panda by doxygen1.3