Panda3D
Public Member Functions
CycleDataReader< CycleDataType > Class Template Reference

This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only access to the CycleData. More...

#include "cycleDataReader.h"

List of all members.

Public Member Functions

 CycleDataReader (const PipelineCycler< CycleDataType > &cycler, Thread *current_thread=Thread::get_current_thread())
 CycleDataReader (const CycleDataReader< CycleDataType > &copy)
Threadget_current_thread () const
 Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.
 operator const CycleDataType * () const
 This allows the CycleDataReader to be passed to any function that expects a const CycleDataType pointer.
const CycleDataType * operator-> () const
 This provides an indirect member access to the actual CycleData data.
void operator= (const CycleDataReader< CycleDataType > &copy)
const CycleDataType * p () const
 This allows the CycleDataReader to be passed to any function that expects a const CycleDataType pointer.

Detailed Description

template<class CycleDataType>
class CycleDataReader< CycleDataType >

This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only access to the CycleData.

It is used to access the data quickly, without holding a lock, for a thread that does not intend to modify the data and write it back out. For cases where the data might be subsequently modified, you should use CycleDataLockedReader.

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 DO_PIPELINING is not defined.

Definition at line 41 of file cycleDataReader.h.


Member Function Documentation

template<class CycleDataType >
Thread * CycleDataReader< CycleDataType >::get_current_thread ( ) const [inline]

Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.

Definition at line 213 of file cycleDataReader.I.

References Thread::get_current_thread().

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 189 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 177 of file cycleDataReader.I.

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

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

Definition at line 201 of file cycleDataReader.I.

Referenced by Lens::get_min_fov(), Lens::get_up_vector(), Lens::get_view_hpr(), and Lens::get_view_vector().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations