4#ifndef _27135a4d_ad34_43b2_b032_c9745dc65fca
5#define _27135a4d_ad34_43b2_b032_c9745dc65fca
10#include <MrImagingFW/libSeqUtilFW/libSeqUtilFW.h>
12#include <MrMeasSrv/MeasUtils/NLSStatus.h>
13#include <MrMeasSrv/SeqIF/libRT/sSLICE_POS.h>
14#include <MrMeasSrv/SeqIF/Sequence/sequmsg.h>
16#include <MrProtSrv/Domain/CoreNative/SeqLim.h>
17#include <MrProtSrv/Domain/MrProtData/MrProt/MrProt.h>
18#include <MrProtSrv/Domain/MrProtData/MrProt/SeqIF/SeqExpo.h>
19#include <MrProtSrv/Domain/MrProtData/MrProt/SeqIF/SeqExpoRFBlockInfo.h>
46template<
typename T,
typename Slices=std::vector<sSLICE_POS>>
51 using Pointer = std::shared_ptr<Block<T, Slices>>;
59 template<
typename ... Args>
60 static Pointer New(std::string
const & slice, Args && ... args)
69 MrProt & protocol, SeqLim & limits, SeqExpo & exports)
override
72 return MRI_SEQ_SEQU_NORMAL;
77 MrProt & protocol, SeqLim & limits, SeqExpo & exports)
override
79 auto slice = this->get<msl::ConstIterator<Slices>>(this->_slice).item();
81 this->block,
run(protocol, limits, exports, &slice));
82 return MRI_SEQ_SEQU_NORMAL;
89 return const_cast<T&
>(this->
block).getDurationPerRequest();
93 MrProtocolData::SeqExpoRFInfo
rfInfo()
const override
96 return const_cast<T&
>(this->
block).getRFInfoPerRequest();
102 template<
typename ... Args>
103 Block(std::string
const & slice, Args && ... args)
108 Block(Block<T, Slices>
const &) =
default;
109 Block(Block<T, Slices> &&) =
default;
110 Block & operator=(Block<T, Slices>
const &) =
default;
111 Block & operator=(Block<T, Slices> &&) =
default;
Base class for all graph nodes.
Definition AbstractNode.h:28
Node encapsulating a block (anything respecting the API of SeqBuildBlock).
Definition Block.h:48
T block
Encapsulated block.
Definition Block.h:56
NLSStatus prepare(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Prepare the block.
Definition Block.h:68
uint64_t duration() const override
Return the duration of the block.
Definition Block.h:86
MrProtocolData::SeqExpoRFInfo rfInfo() const override
Return the RF information of the block.
Definition Block.h:93
NLSStatus run(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Run the block with the slice referenced by the counter.
Definition Block.h:76
std::shared_ptr< Block< T, Slices > > Pointer
Reference-counted pointer to Block.
Definition Block.h:51
std::shared_ptr< Block< T const, Slices > > ConstPointer
Reference-counted constant pointer to Block.
Definition Block.h:53
static Pointer New(std::string const &slice, Args &&... args)
Create a Block node by passing arguments to the encapsulated block.
Definition Block.h:60
#define ON_FALSE_RETURN_STATUS(O, S)
Execute statement O.S, and, if false, return the status of object O.
Definition helpers.h:52
Top-level namespace of the msl library.
Definition acceleration.h:17