seqloop.h
1 /***************************************************************************
2  seqloop.h - description
3  -------------------
4  begin : Mon Aug 13 2001
5  copyright : (C) 2000-2015 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 
58  SeqObjLoop& operator = (const SeqObjLoop& sl);
59 
60 
64  double get_preduration () const;
65 
69  double get_postduration() const;
70 
71 
75  SeqObjLoop& set_body(const SeqObjBase& so);
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
RecoValList get_recovallist(unsigned int reptimes, LDRkSpaceCoords &coords) const
STD_string get_program(programContext &context) const
SeqValList get_freqvallist(freqlistAction action) const
SeqObjLoop & set_times(unsigned int t)
double get_preduration() const
SeqObjLoop & set_body(const SeqObjBase &so)
Container for sequence objects.
Definition: seqlist.h:86
STD_string get_properties() const
SeqObjLoop(const STD_string &object_label="unnamedSeqObjLoop")
SeqObjLoop & operator=(const SeqObjLoop &sl)
SeqValList get_delayvallist() const
SeqObjLoop & operator[](const SeqVector &seqvector)
freqlistAction
Definition: seqtree.h:102
int get_times() const
SeqObjLoop & operator()(const SeqObjBase &embeddedBody)
unsigned int event(eventContext &context) const
double get_postduration() const
double get_duration() const
double get_rf_energy() const
void query(queryContext &context) const
Sequence Loop.
Definition: seqloop.h:38