4#ifndef _29882abf_80e7_4434_8f2c_b5109dd75ef7
5#define _29882abf_80e7_4434_8f2c_b5109dd75ef7
10#include <MrMeasSrv/MeasUtils/NLSStatus.h>
11#include <MrMeasSrv/SeqIF/libRT/sSLICE_POS.h>
13#include <MrProtSrv/Domain/CoreNative/SeqLim.h>
14#include <MrProtSrv/Domain/MrProtData/MrProt/MrProt.h>
15#include <MrProtSrv/Domain/MrProtData/MrProt/SeqIF/SeqExpo.h>
16#include <MrProtSrv/Domain/MrProtData/MrProt/SeqIF/SeqExpoRFBlockInfo.h>
43 std::string
const & key, T
const &
child,
51 std::string
const & key,
Siblings const & siblings,
54 virtual ~If() =
default;
58 MrProt & protocol, SeqLim & limits, SeqExpo & exports)
override;
62 MrProt & protocol, SeqLim & limits, SeqExpo & exports)
override;
80 MrProtocolData::SeqExpoRFInfo
rfInfo()
const override;
86 mutable uint64_t _duration;
87 mutable MrProtocolData::SeqExpoRFInfo _rfInfo;
93 std::string
const & key, T
const &
child,
101 std::string
const & key,
Siblings const & siblings,
104 If(If
const &) =
default;
106 If & operator=(If
const &) =
default;
107 If & operator=(If &&) =
default;
109 bool _condition(MrProt & protocol, SeqLim & limits, SeqExpo & exports)
const;
#define DECLARE_POINTERS(name)
Declare pointer type aliases.
Definition Dictionary.h:18
std::shared_ptr< Dictionary > Pointer
Reference-counted pointer to Dictionary
Definition Dictionary.h:39
Dictionary::ConstPointer registry() const
Return the registry.
Node running its children based on a boolean key or a function key.
Definition If.h:29
NLSStatus run(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Run the children if the boolean is true.
std::shared_ptr< If > Pointer
Reference-counted pointer to If
Definition If.h:31
static Pointer New(std::string const &key, Siblings const &siblings, Dictionary::Pointer registry={})
Create an If node with multiple children.
static Pointer New(std::string const &key, T const &child, Dictionary::Pointer registry={})
Create an If node with a single child.
Definition If.h:42
uint64_t duration() const override
Return the sum of the duration of the children if the boolean is true, 0 otherwise.
static Pointer New(std::string const &key, Dictionary::Pointer registry={})
Create an If node without children.
MrProtocolData::SeqExpoRFInfo rfInfo() const override
Return the sum of the RF information of the children if the boolean is true, empty RF information oth...
FlexibleFunction< bool > Function
Test function.
Definition If.h:34
NLSStatus prepare(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Prepare the children if the boolean is true.
Container node, prepare and run its children sequentially.
Definition Node.h:28
std::vector< AbstractNode::Pointer > Siblings
Child container.
Definition Node.h:33
AbstractNode::ConstPointer child(std::size_t index) const
Return a child at given position.
boost::variant< std::function< T()>, std::function< T(Dictionary::Pointer)>, std::function< T(MrProt &)>, std::function< T(MrProt &, Dictionary::Pointer)>, std::function< T(MrProt &, SeqLim &, SeqExpo &)>, std::function< T(MrProt &, SeqLim &, SeqExpo &, Dictionary::Pointer)> > FlexibleFunction
A graph function (e.g. Case or If), with flexible arguments.
Definition FlexibleFunction.h:35
Top-level namespace of the msl library.
Definition acceleration.h:17