msl 1.3.0
Loading...
Searching...
No Matches
msl::graph::IteratorTemplate< T > Class Template Reference

Detailed Description

template<typename T>
class msl::graph::IteratorTemplate< T >

Node encapsulating an msl::Iterator.

#include <Iterator.h>

Public Types

using Pointer = std::shared_ptr< IteratorTemplate< T > >
 Reference-counted pointer to IteratorTemplate<T>

 
using ConstPointer = std::shared_ptr< IteratorTemplate< T > const >
 Reference-counted constant pointer to IteratorTemplate<T>

 
- Public Types inherited from msl::graph::Node
using Pointer = std::shared_ptr< Node >
 Reference-counted pointer to Node

 
using ConstPointer = std::shared_ptr< Node const >
 Reference-counted constant pointer to Node

 
using Siblings = std::vector< AbstractNode::Pointer >
 Child container.
 
- Public Types inherited from msl::graph::AbstractNode
using Pointer = std::shared_ptr< AbstractNode >
 Reference-counted pointer to AbstractNode

 
using ConstPointer = std::shared_ptr< AbstractNode const >
 Reference-counted constant pointer to AbstractNode

 

Public Member Functions

virtual ~IteratorTemplate ()=default
 
NLSStatus prepare (MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
 Prepare the children.
 
NLSStatus run (MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
 Run the children for each item of the iterator range.
 
uint64_t duration () const override
 Return the sum of the duration of the children times the number of items of the iterator range.
 
MrProtocolData::SeqExpoRFInfo rfInfo () const override
 Return the sum of the RF information of the children times the number of items of the iterator range.
 
- Public Member Functions inherited from msl::graph::Node
virtual ~Node ()=default
 
NLSStatus prepare (MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
 Prepare all children in order.
 
NLSStatus run (MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
 Run all children in order.
 
NodesetRegistry (Dictionary::Pointer registry) override
 Set the registry to this node and its children.
 
uint64_t duration () const override
 Return the sum of the duration of the children.
 
MrProtocolData::SeqExpoRFInfo rfInfo () const override
 Return the sum of the RF information of the children.
 
bool empty () const
 Check whether this node has children.
 
std::size_t size () const
 Return the number of children.
 
template<typename T >
T & appendChild (std::shared_ptr< T > const &child)
 Append a child in last position, return the child.
 
NodedeleteChild (std::size_t index)
 Remove a child.
 
NodeclearChildren ()
 Remove all children.
 
AbstractNode::ConstPointer child (std::size_t index) const
 Return a child at given position.
 
AbstractNode::Pointer child (std::size_t index)
 Return a child at given position.
 
- Public Member Functions inherited from msl::graph::AbstractNode
virtual ~AbstractNode ()=default
 
Dictionary::ConstPointer registry () const
 Return the registry.
 
Dictionary::Pointer registry ()
 Return the registry.
 
template<typename T >
T const & get (std::string const &key) const
 Return an object from the dictionary.
 
template<typename T >
T & get (std::string const &key)
 Return an object from the dictionary.
 
boost::typeindex::type_info const & type (std::string const &key) const
 Return the type of an object in the dictionary.
 

Static Public Member Functions

static Pointer New (std::string const &key, Dictionary::Pointer registry={})
 Create an iterator with no child.
 
template<typename Child >
static Pointer New (std::string const &key, Child const &child, Dictionary::Pointer registry={})
 Create an iterator with a single child.
 
static Pointer New (std::string const &key, Siblings const &siblings, Dictionary::Pointer registry={})
 Create an iterator with multiple children.
 
- Static Public Member Functions inherited from msl::graph::Node
static Pointer New (Dictionary::Pointer registry={})
 Create a node with no child.
 
template<typename T >
static Pointer New (T const &child, Dictionary::Pointer registry={})
 Create a node with a single child.
 
static Pointer New (Siblings const &siblings, Dictionary::Pointer registry={})
 Create a node with multiple children.
 

Member Typedef Documentation

◆ Pointer

template<typename T >
using msl::graph::IteratorTemplate< T >::Pointer = std::shared_ptr< IteratorTemplate<T> >

Reference-counted pointer to IteratorTemplate<T>

◆ ConstPointer

template<typename T >
using msl::graph::IteratorTemplate< T >::ConstPointer = std::shared_ptr< IteratorTemplate<T> const>

Reference-counted constant pointer to IteratorTemplate<T>

Constructor & Destructor Documentation

◆ ~IteratorTemplate()

template<typename T >
virtual msl::graph::IteratorTemplate< T >::~IteratorTemplate ( )
virtualdefault

Member Function Documentation

◆ New() [1/3]

template<typename T >
static Pointer msl::graph::IteratorTemplate< T >::New ( std::string const &  key,
Dictionary::Pointer  registry = {} 
)
inlinestatic

Create an iterator with no child.

◆ New() [2/3]

template<typename T >
template<typename Child >
static Pointer msl::graph::IteratorTemplate< T >::New ( std::string const &  key,
Child const &  child,
Dictionary::Pointer  registry = {} 
)
inlinestatic

Create an iterator with a single child.

◆ New() [3/3]

template<typename T >
static Pointer msl::graph::IteratorTemplate< T >::New ( std::string const &  key,
Siblings const &  siblings,
Dictionary::Pointer  registry = {} 
)
inlinestatic

Create an iterator with multiple children.

◆ prepare()

template<typename T >
NLSStatus msl::graph::IteratorTemplate< T >::prepare ( MrProt &  protocol,
SeqLim &  limits,
SeqExpo &  exports 
)
inlineoverridevirtual

Prepare the children.

Implements msl::graph::AbstractNode.

◆ run()

template<typename T >
NLSStatus msl::graph::IteratorTemplate< T >::run ( MrProt &  protocol,
SeqLim &  limits,
SeqExpo &  exports 
)
inlineoverridevirtual

Run the children for each item of the iterator range.

Implements msl::graph::AbstractNode.

◆ duration()

template<typename T >
uint64_t msl::graph::IteratorTemplate< T >::duration ( ) const
inlineoverridevirtual

Return the sum of the duration of the children times the number of items of the iterator range.

Implements msl::graph::AbstractNode.

◆ rfInfo()

template<typename T >
MrProtocolData::SeqExpoRFInfo msl::graph::IteratorTemplate< T >::rfInfo ( ) const
inlineoverridevirtual

Return the sum of the RF information of the children times the number of items of the iterator range.

Implements msl::graph::AbstractNode.


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