LibCarna Version 3.4.0
Loading...
Searching...
No Matches
RenderStageSequence.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef RENDERSTAGESEQUENCE_H_0874895466
16#define RENDERSTAGESEQUENCE_H_0874895466
17
18#include <LibCarna/LibCarna.hpp>
21#include <memory>
22
28namespace LibCarna
29{
30
31namespace base
32{
33
34
35
36// ----------------------------------------------------------------------------------
37// RenderStageSequence
38// ----------------------------------------------------------------------------------
39
45class LIBCARNA RenderStageSequence
46{
47
49
50 struct Details;
51 const std::unique_ptr< Details > pimpl;
52
53public:
54
59
64
68 std::size_t stages() const;
69
74
78 virtual void clearStages();
79
83 RenderStage& stageAt( std::size_t position ) const;
84
90 template< typename RenderStage >
91 Aggregation< RenderStage > findStage() const;
92
93protected:
94
100
101}; // RenderStageSequence
102
103
104template< typename RenderStage >
106{
107 for( std::size_t index = 0; index < stages(); ++index )
108 {
109 RenderStage* const rs = dynamic_cast< RenderStage* >( &stageAt( index ) );
110 if( rs != nullptr )
111 {
113 }
114 }
116}
117
118
119
120} // namespace LibCarna :: base
121
122} // namespace LibCarna
123
124#endif // RENDERSTAGESEQUENCE_H_0874895466
Defines LibCarna::base::Aggregation.
Contains forward-declarations.
Represents an aggregation, i.e. a weak reference.
Represents an association.
Represents a rendering stages sequence.
virtual ~RenderStageSequence()
Deletes all stages contained by the sequence.
void releaseStages()
Assumes that the ownership over all stages has been taken over by someone else. Clears the stages seq...
void appendStage(RenderStage *stage)
Appends stage to the rendering stages sequence.
Aggregation< RenderStage > findStage() const
References the first RenderStage within the rendering stages sequence. This method performs a linear ...
RenderStage & stageAt(std::size_t position) const
References the stage at position within the rendering stages sequence.
virtual void clearStages()
Deletes all stages from the rendering stages sequence.
std::size_t stages() const
Tells number of stages contained by the sequence.
Base abstract class of each rendering stage. Refer to the documentation of the rendering process.
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.