ardour
|
#include <data_type.h>
Classes | |
class | iterator |
Public Types | |
enum | Symbol { AUDIO = 0, MIDI = 1, NIL = 2 } |
Public Member Functions | |
DataType (const Symbol &symbol) | |
DataType (const std::string &str) | |
const char * | to_string () const |
const char * | to_i18n_string () const |
operator uint32_t () const | |
bool | operator== (const Symbol symbol) |
bool | operator!= (const Symbol symbol) |
bool | operator== (const DataType other) |
bool | operator!= (const DataType other) |
Static Public Member Functions | |
static iterator | begin () |
static iterator | end () |
Static Public Attributes | |
static const uint32_t | num_types = 2 |
Private Attributes | |
Symbol | _symbol |
A type of Data Ardour is capable of processing.
The majority of this class is dedicated to conversion to and from various other type representations, simple comparison between then, etc. This code is deliberately 'ugly' so other code doesn't have to be.
Definition at line 37 of file data_type.h.
Numeric symbol for this DataType.
Castable to int for use as an array index (e.g. by ChanCount). Note this means NIL is (ntypes-1) and guaranteed to change when types are added, so this number is NOT suitable for serialization, network, or binary anything.
WARNING: The number of non-NIL entries here must match num_types.
Enumerator | |
---|---|
AUDIO | |
MIDI | |
NIL |
Definition at line 49 of file data_type.h.
|
inline |
Definition at line 60 of file data_type.h.
|
inline |
Construct from a string (Used for loading from XML and Ports) The string can be as in an XML file (eg "audio" or "midi"), or a
Definition at line 67 of file data_type.h.
|
inlinestatic |
Definition at line 108 of file data_type.h.
|
inlinestatic |
Definition at line 109 of file data_type.h.
|
inline |
Definition at line 87 of file data_type.h.
|
inline |
Definition at line 112 of file data_type.h.
|
inline |
Definition at line 115 of file data_type.h.
|
inline |
Definition at line 111 of file data_type.h.
|
inline |
Definition at line 114 of file data_type.h.
const char * ARDOUR::DataType::to_i18n_string | ( | ) | const |
Definition at line 24 of file data_type.cc.
|
inline |
Inverse of the from-string constructor
Definition at line 77 of file data_type.h.
|
private |
Definition at line 118 of file data_type.h.
|
static |
Number of types (not including NIL). WARNING: make sure this matches Symbol!
Definition at line 58 of file data_type.h.