Helios++
Helios software for LiDAR simulations
DynSequencer< T > Class Template Reference

Dynamic sequencer handles dynamic sequences in a sequential fashion. More...

#include <DynSequencer.h>

Collaboration diagram for DynSequencer< T >:

Public Member Functions

 DynSequencer ()
 Default constructor for the dynamic sequencer.
 
virtual vector< shared_ptr< T > > nextStep ()
 Handle next sequential behavior. More...
 
virtual bool hasNextStep ()
 Check if the dynamic sequencer supports a next step or not. More...
 
void add (shared_ptr< DynSequence< T >> dynseq)
 Add the dynamic sequence to the sequencer. More...
 
void remove (string const &id)
 Remove the dynamic sequence with given identifier. More...
 
shared_ptr< DynSequence< T > > get (string const &id)
 Get the dynamic sequence with given identifier. More...
 
bool has (string const &id)
 Check if the dynamic sequencer has a dynamic sequence with given identifier. More...
 
void clear ()
 Remove all dynamic sequences composing the dynamic sequencer.
 

Protected Attributes

unordered_map< string, shared_ptr< DynSequence< T > > > dynseqs
 The dynamic sequences handled by the dynamic sequencer.
 
shared_ptr< DynSequence< T > > start
 The start dynamic sequence.
 
shared_ptr< DynSequence< T > > current
 The current dynamic sequence.
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a dynamic sequencer to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename T>
class DynSequencer< T >

Dynamic sequencer handles dynamic sequences in a sequential fashion.

Author
Alberto M. Esmoris Pena
Version
1.0
Template Parameters
TType of elements composing sequences
See also
DynSequence

Member Function Documentation

◆ add()

template<typename T >
void DynSequencer< T >::add ( shared_ptr< DynSequence< T >>  dynseq)

Add the dynamic sequence to the sequencer.

NOTICE the first added dynamic sequence will become the start dynamic sequence by default

Parameters
dynseqDynamic sequence to be added

◆ get()

template<typename T >
shared_ptr<DynSequence<T> > DynSequencer< T >::get ( string const &  id)

Get the dynamic sequence with given identifier.

Parameters
idIdentifier of dynamic sequence to be retrieved
Returns
Requested dynamic sequence if any, nullptr otherwise

◆ has()

template<typename T >
bool DynSequencer< T >::has ( string const &  id)
inline

Check if the dynamic sequencer has a dynamic sequence with given identifier.

Parameters
idIdentifier of the dynamic sequence to be checked
Returns
True if there is a dynamic sequence with given identifier, false otherwise

◆ hasNextStep()

template<typename T >
virtual bool DynSequencer< T >::hasNextStep ( )
inlinevirtual

Check if the dynamic sequencer supports a next step or not.

Returns
True if dynamic sequencer supports a next step, false otherwise

◆ nextStep()

template<typename T >
virtual vector<shared_ptr<T> > DynSequencer< T >::nextStep ( )
virtual

Handle next sequential behavior.

Returns
Sequence for the step

◆ remove()

template<typename T >
void DynSequencer< T >::remove ( string const &  id)
inline

Remove the dynamic sequence with given identifier.

Parameters
idIdentifier of dynamic sequence to be removed

◆ serialize()

template<typename T >
template<typename Archive >
void DynSequencer< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a dynamic sequencer to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for the dynamic sequencer

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