Panda3D
Public Member Functions | List of all members
CycleDataStageWriter< CycleDataType > Class Template Reference

This class is similar to CycleDataWriter, except it allows writing to a particular stage of the pipeline. More...

#include "cycleDataStageWriter.h"

Public Member Functions

 CycleDataStageWriter (PipelineCycler< CycleDataType > &cycler, int stage, Thread *current_thread=Thread::get_current_thread())
 
 CycleDataStageWriter (PipelineCycler< CycleDataType > &cycler, int stage, bool force_to_0, Thread *current_thread=Thread::get_current_thread())
 
 CycleDataStageWriter (const CycleDataStageWriter< CycleDataType > &copy)
 
 CycleDataStageWriter (PipelineCycler< CycleDataType > &cycler, int stage, CycleDataLockedStageReader< CycleDataType > &take_from)
 This flavor of the constructor elevates the pointer from the CycleDataLockedStageReader from a read to a write pointer (and invalidates the reader). More...
 
 CycleDataStageWriter (PipelineCycler< CycleDataType > &cycler, int stage, CycleDataLockedStageReader< CycleDataType > &take_from, bool force_to_0)
 This flavor of the constructor elevates the pointer from the CycleDataLockedStageReader from a read to a write pointer (and invalidates the reader). More...
 
Threadget_current_thread () const
 Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object. More...
 
 operator CycleDataType * ()
 This allows the CycleDataStageWriter to be passed to any function that expects a CycleDataType pointer. More...
 
CycleDataType * operator-> ()
 This provides an indirect member access to the actual CycleData data. More...
 
const CycleDataType * operator-> () const
 This provides an indirect member access to the actual CycleData data. More...
 
void operator= (const CycleDataStageWriter< CycleDataType > &copy)
 

Detailed Description

template<class CycleDataType>
class CycleDataStageWriter< CycleDataType >

This class is similar to CycleDataWriter, except it allows writing to a particular stage of the pipeline.

Usually this is used to implement writing directly to an upstream pipeline value, to recompute a cached value there (otherwise, the cached value would go away with the next pipeline cycle).

Definition at line 34 of file cycleDataStageWriter.h.

Constructor & Destructor Documentation

◆ CycleDataStageWriter() [1/2]

template<class CycleDataType >
CycleDataStageWriter< CycleDataType >::CycleDataStageWriter ( PipelineCycler< CycleDataType > &  cycler,
int  stage,
CycleDataLockedStageReader< CycleDataType > &  take_from 
)
inline

This flavor of the constructor elevates the pointer from the CycleDataLockedStageReader from a read to a write pointer (and invalidates the reader).

Definition at line 251 of file cycleDataStageWriter.I.

◆ CycleDataStageWriter() [2/2]

template<class CycleDataType >
CycleDataStageWriter< CycleDataType >::CycleDataStageWriter ( PipelineCycler< CycleDataType > &  cycler,
int  stage,
CycleDataLockedStageReader< CycleDataType > &  take_from,
bool  force_to_0 
)
inline

This flavor of the constructor elevates the pointer from the CycleDataLockedStageReader from a read to a write pointer (and invalidates the reader).

Definition at line 266 of file cycleDataStageWriter.I.

References CycleDataStageWriter< CycleDataType >::operator->().

Member Function Documentation

◆ get_current_thread()

template<class CycleDataType >
Thread * CycleDataStageWriter< 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 327 of file cycleDataStageWriter.I.

References Thread::get_current_thread().

Referenced by CycleDataStageWriter< CycleDataType >::operator CycleDataType *().

◆ operator CycleDataType *()

template<class CycleDataType >
CycleDataStageWriter< CycleDataType >::operator CycleDataType * ( )
inline

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

Definition at line 315 of file cycleDataStageWriter.I.

References CycleDataStageWriter< CycleDataType >::get_current_thread().

◆ operator->() [1/2]

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

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

Definition at line 291 of file cycleDataStageWriter.I.

Referenced by CycleDataStageWriter< CycleDataType >::CycleDataStageWriter().

◆ operator->() [2/2]

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

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

Definition at line 303 of file cycleDataStageWriter.I.


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