00001 /*************************************************************************** 00002 seqloop.h - description 00003 ------------------- 00004 begin : Mon Aug 13 2001 00005 copyright : (C) 2001 by Thies H. Jochimsen 00006 email : jochimse@cns.mpg.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef SEQLOOP_H 00019 #define SEQLOOP_H 00020 00021 #include <tjutils/tjembed.h> 00022 00023 #include <odinseq/seqcounter.h> 00024 #include <odinseq/seqlist.h> 00025 00026 00038 class SeqObjLoop : public SeqCounter, public SeqObjList, public Embed<SeqObjLoop,SeqObjBase> { 00039 00040 public: 00041 00045 SeqObjLoop(const STD_string& object_label = "unnamedSeqObjLoop"); 00046 00050 SeqObjLoop(const SeqObjLoop& sl); 00051 00052 00053 ~SeqObjLoop() {} 00054 00058 SeqObjLoop& operator = (const SeqObjLoop& sl); 00059 00060 00064 double get_preduration () const; 00065 00069 double get_postduration() const; 00070 00071 00075 SeqObjLoop& set_body(const SeqObjBase& so); 00076 00080 SeqObjLoop& set_times(unsigned int t); 00081 00082 00087 SeqObjLoop& operator () (const SeqObjBase& embeddedBody); 00088 00089 00093 SeqObjLoop& operator [] (const SeqVector& seqvector); 00094 00098 SeqObjLoop& operator [] (unsigned int t); 00099 00100 00101 00102 00103 // overwriting virtual functions from SeqCounter 00104 int get_times() const; 00105 00106 00107 // overloading virtual function from SeqTreeObj 00108 STD_string get_program(programContext& context) const; 00109 double get_duration() const; 00110 unsigned int event(eventContext& context) const; 00111 SeqValList get_freqvallist(freqlistAction action) const; 00112 SeqValList get_delayvallist() const; 00113 double get_rf_energy() const; 00114 void query(queryContext& context) const; 00115 RecoValList get_recovallist(unsigned int reptimes, JDXkSpaceCoords& coords) const; 00116 STD_string get_properties() const; 00117 00118 00119 private: 00120 00121 // overwriting virtual functions from SeqClass 00122 bool prep(); 00123 void clear_container(); 00124 00125 // overwriting virtual functions from SeqCounter 00126 void add_vector(const SeqVector& seqvector); 00127 bool unroll_program(programContext& context) const; 00128 00134 bool is_repetition_loop(bool only_qualvectors=false) const; 00135 00139 bool is_acq_repetition_loop() const; 00140 00145 bool is_obj_repetition_loop() const; 00146 00150 bool contains_acq_iter() const; 00151 00152 00153 float get_single_duration() const; 00154 00155 unsigned int times; 00156 00157 unsigned int get_numof_acq() const; 00158 mutable unsigned int numof_acq_cache; 00159 mutable bool is_toplevel_reploop; 00160 }; 00161 00162 00166 #endif
1.5.6