CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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