00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef SEQPHASE_H
00021 #define SEQPHASE_H
00022
00023
00024 #include <odinseq/seqclass.h>
00025 #include <odinseq/seqvec.h>
00026 #include <odinseq/seqdriver.h>
00027
00029
00034 class SeqPhaseDriver : public SeqDriverBase {
00035
00036 public:
00037 SeqPhaseDriver() {}
00038 virtual ~SeqPhaseDriver() {}
00039
00040 virtual void prep_driver(const dvector& phaselist) = 0;
00041
00042 virtual unsigned int get_phaselistindex(const dvector& phaselist) const = 0;
00043
00044 virtual STD_string get_loopcommand(const dvector& phaselist) const = 0;
00045
00046 virtual svector get_phasevec_commands(const STD_string& iterator, const STD_string& instr) const = 0;
00047
00048 virtual SeqPhaseDriver* clone_driver() const = 0;
00049 };
00050
00051
00053
00054 class SeqFreqChan;
00055
00060 class SeqPhaseListVector : public SeqVector, public virtual SeqClass {
00061
00062 private:
00063
00064 SeqPhaseListVector(const STD_string& object_label = "unnamedSeqPhaseListVector", const dvector& phase_list=0 );
00065
00066 SeqPhaseListVector(const SeqPhaseListVector& spl);
00067
00068 SeqPhaseListVector& operator = (const SeqPhaseListVector& spl);
00069
00073 SeqPhaseListVector& set_phaselist(const dvector& pl);
00074
00078 dvector get_phaselist() const {return phaselist;}
00079
00083 unsigned int get_phaselistindex() const;
00084
00088 double get_phase() const;
00089
00090
00091
00092 unsigned int get_vectorsize() const {return phaselist.size();}
00093 STD_string get_loopcommand() const;
00094 svector get_vector_commands(const STD_string& iterator) const;
00095 bool prep_iteration() const;
00096 bool is_qualvector() const {return false;}
00097
00098 private:
00099 friend class SeqFreqChan;
00100
00101
00102
00103
00104 bool prep();
00105
00106
00107 mutable SeqDriverInterface<SeqPhaseDriver> phasedriver;
00108
00109 dvector phaselist;
00110
00111
00112 SeqFreqChan* user;
00113
00114 };
00115
00116
00117
00118 #endif