Panda3D
Public Member Functions | List of all members
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"

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. More...
 
const CycleDataType * operator -> () const
 This provides an indirect member access to the actual CycleData data. More...
 
 operator const CycleDataType * () const
 This allows the CycleDataReader to be passed to any function that expects a const CycleDataType pointer. More...
 
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. More...
 

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 35 of file cycleDataReader.h.

Member Function Documentation

◆ get_current_thread()

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

◆ operator ->()

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

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

Definition at line 148 of file cycleDataReader.I.

◆ operator const CycleDataType *()

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

◆ p()

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

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


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