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 (CycleDataStageWriter< CycleDataType > &&from) noexcept
 
 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...
 
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...
 
 operator CycleDataType * ()
 This allows the CycleDataStageWriter to be passed to any function that expects a CycleDataType pointer. More...
 
void operator= (const CycleDataStageWriter< CycleDataType > &copy)
 
void operator= (CycleDataStageWriter< CycleDataType > &&from) noexcept
 

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 31 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 269 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 282 of file cycleDataStageWriter.I.

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 331 of file cycleDataStageWriter.I.

◆ 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 302 of file cycleDataStageWriter.I.

◆ 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 311 of file cycleDataStageWriter.I.

◆ 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 321 of file cycleDataStageWriter.I.


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