Panda3D
Loading...
Searching...
No Matches
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 CycleDataReader< CycleDataType > &copy)
 
 CycleDataReader (const PipelineCycler< CycleDataType > &cycler, Thread *current_thread=Thread::get_current_thread())
 
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 35 of file cycleDataReader.h.

Constructor & Destructor Documentation

◆ CycleDataReader() [1/2]

template<class CycleDataType >
CycleDataReader< CycleDataType >::CycleDataReader ( const PipelineCycler< CycleDataType > & cycler,
Thread * current_thread = Thread::get_current_thread() )
inline

Definition at line 111 of file cycleDataReader.I.

◆ CycleDataReader() [2/2]

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

Definition at line 120 of file cycleDataReader.I.

◆ ~CycleDataReader()

template<class CycleDataType >
CycleDataReader< CycleDataType >::~CycleDataReader ( )
inline

Definition at line 139 of file cycleDataReader.I.

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

References Thread::get_current_thread.

◆ 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 157 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 147 of file cycleDataReader.I.

◆ operator=()

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

Definition at line 130 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 167 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: