seqdelayvec.h
1 /***************************************************************************
2  seqdelayvec.h - description
3  -------------------
4  begin : Mon Oct 7 2002
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 SEQDELAYVEC_H
19 #define SEQDELAYVEC_H
20 
21 #include <odinseq/seqobj.h>
22 #include <odinseq/seqvec.h>
23 #include <odinseq/seqdriver.h>
24 
29 class SeqDelayVecDriver : public SeqDriverBase {
30 
31  public:
33  virtual ~SeqDelayVecDriver() {}
34 
35  virtual bool prep_driver() = 0;
36 
37  virtual STD_string get_program(programContext& context, double duration) const = 0;
38 
39  virtual bool unroll_program() const = 0;
40 
41  virtual SeqDelayVecDriver* clone_driver() const = 0;
42 };
43 
45 
46 
58 class SeqDelayVector : public SeqObjBase, public SeqVector {
59 
60  public:
61 
67  SeqDelayVector(const STD_string& object_label,const dvector& delaylist);
68 
69 
73  SeqDelayVector(const STD_string& object_label = "unnamedSeqDelayVector");
74 
75 
79  SeqDelayVector(const SeqDelayVector& sdv);
80 
81 
85  SeqDelayVector& operator = (const SeqDelayVector& sdv);
86 
87 
92  SeqDelayVector& set_delayvector(const dvector& delaylist);
93 
98  dvector get_delayvector() const;
99 
100 
101  // overloading virtual function from SeqTreeObj
102  double get_duration() const;
103  STD_string get_program(programContext& context) const;
104  SeqValList get_delayvallist() const;
105 
106  private:
107 
108  // overwriting virtual functions from SeqClass
109  bool prep();
110 
111  // overloading virtual function from SeqVector
112  unsigned int get_vectorsize() const;
113  bool needs_unrolling_check() const {return delayvecdriver->unroll_program();}
114 
115  mutable SeqDriverInterface<SeqDelayVecDriver> delayvecdriver;
116 
117  dvector delayvec;
118 
119 };
120 
121 
126 #endif
virtual bool prep()
Definition: seqclass.h:116
Vector of variable timing delays.
Definition: seqdelayvec.h:58