Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
CycleDataWriter< CycleDataType > Class Template Reference

This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_write() in the destructor. More...

`#include "cycleDataWriter.h"`

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

## Detailed Description

template<class CycleDataType>
class CycleDataWriter< CycleDataType >

This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_write() in the destructor.

In the interim, it provides a transparent read-write access to the CycleData.

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 34 of file cycleDataWriter.h.

## Constructor & Destructor Documentation

## ◆ CycleDataWriter() [1/6]

template<class CycleDataType>

CycleDataWriter< CycleDataType >::CycleDataWriter | ( | PipelineCycler< CycleDataType > & | cycler,
|  | Thread * | current_thread = Thread::get_current_thread() )
| inline

Definition at line 220 of file cycleDataWriter.I.

## ◆ CycleDataWriter() [2/6]

template<class CycleDataType>

CycleDataWriter< CycleDataType >::CycleDataWriter | ( | PipelineCycler< CycleDataType > & | cycler,
|  | bool | force_to_0,
|  | Thread * | current_thread = Thread::get_current_thread() )
| inline

Definition at line 229 of file cycleDataWriter.I.

## ◆ CycleDataWriter() [3/6]

template<class CycleDataType>

CycleDataWriter< CycleDataType >::CycleDataWriter | ( | PipelineCycler< CycleDataType > & | cycler,
|  | CycleDataType * | locked_cdata,
|  | Thread * | current_thread = Thread::get_current_thread() )
| inline

Definition at line 238 of file cycleDataWriter.I.

## ◆ CycleDataWriter() [4/6]

template<class CycleDataType>

CycleDataWriter< CycleDataType >::CycleDataWriter | ( | const CycleDataWriter< CycleDataType > & | copy | ) |
| inline

Definition at line 248 of file cycleDataWriter.I.

## ◆ CycleDataWriter() [5/6]

template<class CycleDataType>

CycleDataWriter< CycleDataType >::CycleDataWriter | ( | PipelineCycler< CycleDataType > & | cycler,
|  | CycleDataLockedReader< CycleDataType > & | take_from )
| inline

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

Definition at line 269 of file cycleDataWriter.I.

## ◆ CycleDataWriter() [6/6]

template<class CycleDataType>

CycleDataWriter< CycleDataType >::CycleDataWriter | ( | PipelineCycler< CycleDataType > & | cycler,
|  | CycleDataLockedReader< CycleDataType > & | take_from,
|  | bool | force_to_0 )
| inline

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

It also propagates the pointer back upstream; see PipelineCycler::write_upstream().

Definition at line 283 of file cycleDataWriter.I.

## ◆ ~CycleDataWriter()

template<class CycleDataType>

CycleDataWriter< CycleDataType >::~CycleDataWriter | ( |  | ) |
| inline

Definition at line 295 of file cycleDataWriter.I.

## Member Function Documentation

## ◆ get_current_thread()

template<class CycleDataType>

Thread * CycleDataWriter< 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 332 of file cycleDataWriter.I.

References Thread::get_current_thread.

## ◆ operator CycleDataType *()

template<class CycleDataType>

CycleDataWriter< CycleDataType >::operator CycleDataType * | ( |  | ) |
| inline

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

Definition at line 322 of file cycleDataWriter.I.

## ◆ operator->() [1/2]

template<class CycleDataType>

CycleDataType * CycleDataWriter< CycleDataType >::operator-> | ( |  | ) |
| inline

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

Definition at line 303 of file cycleDataWriter.I.

## ◆ operator->() [2/2]

template<class CycleDataType>

const CycleDataType * CycleDataWriter< CycleDataType >::operator-> | ( |  | ) | const
| inline

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

Definition at line 312 of file cycleDataWriter.I.

## ◆ operator=()

template<class CycleDataType>

void CycleDataWriter< CycleDataType >::operator= | ( | const CycleDataWriter< CycleDataType > & | copy | ) |
| inline

Definition at line 258 of file cycleDataWriter.I.

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

- panda/src/pipeline/cycleDataWriter.h
- panda/src/pipeline/cycleDataWriter.I