21 INLINE PipelineCyclerTrivialImpl::
32 #ifdef SIMPLE_STRUCT_POINTERS
33 nassertv(initial_data == (
CycleData *)
this);
36 #endif // SIMPLE_STRUCT_POINTERS
44 INLINE PipelineCyclerTrivialImpl::
58 INLINE
void PipelineCyclerTrivialImpl::
72 INLINE PipelineCyclerTrivialImpl::
73 ~PipelineCyclerTrivialImpl() {
113 #ifdef SIMPLE_STRUCT_POINTERS
117 #endif // SIMPLE_STRUCT_POINTERS
130 #ifdef SIMPLE_STRUCT_POINTERS
134 #endif // SIMPLE_STRUCT_POINTERS
176 #ifdef SIMPLE_STRUCT_POINTERS
180 #endif // SIMPLE_STRUCT_POINTERS
214 #ifdef SIMPLE_STRUCT_POINTERS
218 #endif // SIMPLE_STRUCT_POINTERS
232 #ifdef SIMPLE_STRUCT_POINTERS
236 #endif // SIMPLE_STRUCT_POINTERS
249 #ifdef SIMPLE_STRUCT_POINTERS
253 #endif // SIMPLE_STRUCT_POINTERS
297 #ifdef SIMPLE_STRUCT_POINTERS
301 #endif // SIMPLE_STRUCT_POINTERS
314 #ifdef SIMPLE_STRUCT_POINTERS
318 #endif // SIMPLE_STRUCT_POINTERS
343 #ifdef SIMPLE_STRUCT_POINTERS
347 #endif // SIMPLE_STRUCT_POINTERS
362 #ifdef SIMPLE_STRUCT_POINTERS
366 #endif // SIMPLE_STRUCT_POINTERS
380 #ifdef SIMPLE_STRUCT_POINTERS
384 #endif // SIMPLE_STRUCT_POINTERS
398 #ifdef SIMPLE_STRUCT_POINTERS
402 #endif // SIMPLE_STRUCT_POINTERS
438 #ifdef SIMPLE_STRUCT_POINTERS
442 #endif // SIMPLE_STRUCT_POINTERS
CycleData * write_stage(int pipeline_stage, Thread *current_thread)
Returns a pointer suitable for writing to the nth stage of the pipeline.
CycleData * write_upstream(bool force_to_0, Thread *current_thread)
This special variant on write() will automatically propagate changes back to upstream pipeline stages...
void increment_read(const CycleData *pointer) const
Increments the count on a pointer previously retrieved by read(); now the pointer will need to be rel...
A single page of data maintained by a PipelineCycler.
This is the trivial, non-threaded implementation of PipelineCyclerBase.
void release_read(const CycleData *pointer) const
Releases a pointer previously obtained via a call to read().
TypeHandle get_parent_type() const
Returns the type of object that owns this cycler, as reported by CycleData::get_parent_type().
CycleData * elevate_read_stage(int pipeline_stage, const CycleData *pointer, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer.
const CycleData * read_stage(int pipeline_stage, Thread *current_thread) const
Returns a const CycleData pointer, filled with the data for the indicated pipeline stage...
CycleData * write(Thread *current_thread)
Returns a non-const CycleData pointer, filled with a unique copy of the data for the current stage of...
const CycleData * read(Thread *current_thread) const
Returns a const CycleData pointer, filled with the data for the current stage of the pipeline as seen...
const CycleData * read_stage_unlocked(int pipeline_stage) const
Returns a const CycleData pointer, filled with the data for the indicated stage of the pipeline...
void release_write_stage(int pipeline_stage, CycleData *pointer)
Releases a pointer previously obtained via a call to write_stage().
CycleData * write_stage_upstream(int pipeline_stage, bool force_to_0, Thread *current_thread)
Returns a pointer suitable for writing to the nth stage of the pipeline.
void release_read_stage(int pipeline_stage, const CycleData *pointer) const
Releases a pointer previously obtained via a call to read_stage().
virtual TypeHandle get_parent_type() const
Returns the type of the container that owns the CycleData.
CycleData * elevate_read(const CycleData *pointer, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer.
int get_write_count() const
Returns the number of handles currently outstanding to read the current stage of the data...
This class manages a staged pipeline of data, for instance the render pipeline, so that each stage of...
void release()
Release the overall lock on the cycler that was grabbed via acquire().
void release_write(CycleData *pointer)
Releases a pointer previously obtained via a call to write().
CycleData * cheat() const
Returns a pointer without counting it.
A thread; that is, a lightweight process.
int get_num_stages()
Returns the number of stages in the pipeline.
void acquire(Thread *current_thread=NULL)
Grabs an overall lock on the cycler.
TypeHandle is the identifier used to differentiate C++ class types.
CycleData * elevate_read_stage_upstream(int pipeline_stage, const CycleData *pointer, bool force_to_0, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer.
void increment_write(CycleData *pointer) const
Increments the count on a pointer previously retrieved by write(); now the pointer will need to be re...
CycleData * elevate_read_upstream(const CycleData *pointer, bool force_to_0, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer, like elevate_read(), but also propagates...
int get_read_count() const
Returns the number of handles currently outstanding to read the current stage of the data...
const CycleData * read_unlocked(Thread *current_thread) const
Returns a const CycleData pointer, filled with the data for the current stage of the pipeline as seen...