ardour
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ARDOUR::DataType Class Reference

#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
 

Detailed Description

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.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

ARDOUR::DataType::DataType ( const Symbol symbol)
inline

Definition at line 60 of file data_type.h.

ARDOUR::DataType::DataType ( const std::string &  str)
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.

Member Function Documentation

static iterator ARDOUR::DataType::begin ( )
inlinestatic

Definition at line 108 of file data_type.h.

static iterator ARDOUR::DataType::end ( )
inlinestatic

Definition at line 109 of file data_type.h.

ARDOUR::DataType::operator uint32_t ( ) const
inline

Definition at line 87 of file data_type.h.

bool ARDOUR::DataType::operator!= ( const Symbol  symbol)
inline

Definition at line 112 of file data_type.h.

bool ARDOUR::DataType::operator!= ( const DataType  other)
inline

Definition at line 115 of file data_type.h.

bool ARDOUR::DataType::operator== ( const Symbol  symbol)
inline

Definition at line 111 of file data_type.h.

bool ARDOUR::DataType::operator== ( const DataType  other)
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.

const char* ARDOUR::DataType::to_string ( ) const
inline

Inverse of the from-string constructor

Definition at line 77 of file data_type.h.

Member Data Documentation

Symbol ARDOUR::DataType::_symbol
private

Definition at line 118 of file data_type.h.

const uint32_t ARDOUR::DataType::num_types = 2
static

Number of types (not including NIL). WARNING: make sure this matches Symbol!

Definition at line 58 of file data_type.h.


The documentation for this class was generated from the following files: