CSL  6.0
Accessor.h
Go to the documentation of this file.
1 ///
2 /// Accessor.h -- "Reflective" parameter name/setter/type acessor object.
3 /// See the copyright notice and acknowledgment of authors in the file COPYRIGHT
4 ///
5 /// These are used as "plugs" for dynamically controllable instruments (e.g., with MIDI voicers or OSC).
6 ///
7 
8 #ifndef INCLUDE_Accessor_H
9 #define INCLUDE_Accessor_H
10 
11 /// Type flags
12 
13 #define CSL_INT_TYPE 1
14 #define CSL_FLOAT_TYPE 2
15 #define CSL_STRING_TYPE 3
16 
17 namespace csl {
18 
19 ///
20 /// The Accessor class has public data members
21 ///
22 class Accessor {
23 public:
24  /// Convenient constructor
25  Accessor(string na, unsigned sel, unsigned typ)
26  : mName(na), mSelector(sel), mType(typ) { };
27 
28  // public members
29  string mName; ///< name
30  unsigned mSelector; ///< operand selector (see macros in the instruments, e.g., set_attack_f)
31  unsigned mType; ///< argument type (see macros above, e.g., CSL_FLOAT_TYPE)
32 
33 };
34 
35 ///
36 /// Typedef for AccessorVector object
37 ///
38 
39 typedef vector<Accessor *> AccessorVector;
40 
41 }
42 
43 #endif
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
Definition: Accessor.h:17
unsigned mType
argument type (see macros above, e.g., CSL_FLOAT_TYPE)
Definition: Accessor.h:31
unsigned mSelector
operand selector (see macros in the instruments, e.g., set_attack_f)
Definition: Accessor.h:30
Accessor(string na, unsigned sel, unsigned typ)
Convenient constructor.
Definition: Accessor.h:25
vector< Accessor * > AccessorVector
Typedef for AccessorVector object.
Definition: Accessor.h:39
string mName
name
Definition: Accessor.h:26
The Accessor class has public data members.
Definition: Accessor.h:22