ODIN
seqloop.h
1 /***************************************************************************
2  seqloop.h - description
3  -------------------
4  begin : Mon Aug 13 2001
5  copyright : (C) 2000-2021 by Thies H. Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SEQLOOP_H
19 #define SEQLOOP_H
20 
21 #include <tjutils/tjembed.h>
22 
23 #include <odinseq/seqcounter.h>
24 #include <odinseq/seqlist.h>
25 
26 
38 class SeqObjLoop : public SeqCounter, public SeqObjList, public Embed<SeqObjLoop,SeqObjBase> {
39 
40  public:
41 
45  SeqObjLoop(const STD_string& object_label = "unnamedSeqObjLoop");
46 
50  SeqObjLoop(const SeqObjLoop& sl);
51 
52 
53  ~SeqObjLoop() {}
54 
59 
60 
64  double get_preduration () const;
65 
69  double get_postduration() const;
70 
71 
76 
80  SeqObjLoop& set_times(unsigned int t);
81 
82 
87  SeqObjLoop& operator () (const SeqObjBase& embeddedBody);
88 
89 
93  SeqObjLoop& operator [] (const SeqVector& seqvector);
94 
98  SeqObjLoop& operator [] (unsigned int t);
99 
100 
101 
102 
103  // overwriting virtual functions from SeqCounter
104  int get_times() const;
105 
106 
107  // overloading virtual function from SeqTreeObj
108  STD_string get_program(programContext& context) const;
109  double get_duration() const;
110  unsigned int event(eventContext& context) const;
113  double get_rf_energy() const;
114  void query(queryContext& context) const;
115  RecoValList get_recovallist(unsigned int reptimes, LDRkSpaceCoords& coords) const;
116  STD_string get_properties() const;
117 
118 
119  private:
120 
121  // overwriting virtual functions from SeqClass
122  bool prep();
123  void clear_container();
124 
125  // overwriting virtual functions from SeqCounter
126  void add_vector(const SeqVector& seqvector);
127  bool unroll_program(programContext& context) const;
128 
134  bool is_repetition_loop(bool only_qualvectors=false) const;
135 
139  bool is_acq_repetition_loop() const;
140 
145  bool is_obj_repetition_loop() const;
146 
150  bool contains_acq_iter() const;
151 
152 
153  float get_single_duration() const;
154 
155  unsigned int times;
156 
157  unsigned int get_numof_acq() const;
158  mutable unsigned int numof_acq_cache;
159  mutable bool is_toplevel_reploop;
160 };
161 
162 
166 #endif
Container for sequence objects.
Definition: seqlist.h:87
Sequence Loop.
Definition: seqloop.h:38
STD_string get_properties() const
SeqValList get_delayvallist() const
SeqObjLoop(const SeqObjLoop &sl)
SeqObjLoop & operator=(const SeqObjLoop &sl)
void query(queryContext &context) const
SeqObjLoop(const STD_string &object_label="unnamedSeqObjLoop")
double get_duration() const
SeqObjLoop & operator()(const SeqObjBase &embeddedBody)
int get_times() const
double get_rf_energy() const
SeqObjLoop & operator[](const SeqVector &seqvector)
SeqObjLoop & set_times(unsigned int t)
SeqObjLoop & set_body(const SeqObjBase &so)
SeqValList get_freqvallist(freqlistAction action) const
RecoValList get_recovallist(unsigned int reptimes, LDRkSpaceCoords &coords) const
double get_postduration() const
double get_preduration() const
STD_string get_program(programContext &context) const
unsigned int event(eventContext &context) const
freqlistAction
Definition: seqtree.h:102