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

#include <chan_count.h>

Public Member Functions

 ChanCount (const XMLNode &node)
 
 ChanCount ()
 
 ChanCount (DataType type, uint32_t channels)
 
void reset ()
 
void set (DataType t, uint32_t count)
 
uint32_t get (DataType t) const
 
uint32_t n (DataType t) const
 
uint32_t n_audio () const
 
void set_audio (uint32_t a)
 
uint32_t n_midi () const
 
void set_midi (uint32_t m)
 
uint32_t n_total () const
 
bool operator== (const ChanCount &other) const
 
bool operator!= (const ChanCount &other) const
 
bool operator< (const ChanCount &other) const
 
bool operator<= (const ChanCount &other) const
 
bool operator> (const ChanCount &other) const
 
bool operator>= (const ChanCount &other) const
 
ChanCount operator+ (const ChanCount &other) const
 
ChanCountoperator+= (const ChanCount &other)
 
XMLNodestate (const std::string &name) const
 

Static Public Member Functions

static ChanCount min (const ChanCount &a, const ChanCount &b)
 
static ChanCount max (const ChanCount &a, const ChanCount &b)
 

Static Public Attributes

static const ChanCount INFINITE = infinity_factory()
 
static const ChanCount ZERO = ChanCount()
 

Private Attributes

uint32_t _counts [DataType::num_types]
 

Detailed Description

A count of channels, possibly with many types.

Operators are defined so this may safely be used as if it were a simple (single-typed) integer count of channels.

Definition at line 41 of file chan_count.h.

Constructor & Destructor Documentation

ARDOUR::ChanCount::ChanCount ( const XMLNode node)

Definition at line 35 of file chan_count.cc.

ARDOUR::ChanCount::ChanCount ( )
inline

Definition at line 44 of file chan_count.h.

ARDOUR::ChanCount::ChanCount ( DataType  type,
uint32_t  channels 
)
inline

Definition at line 47 of file chan_count.h.

Member Function Documentation

uint32_t ARDOUR::ChanCount::get ( DataType  t) const
inline

Definition at line 59 of file chan_count.h.

static ChanCount ARDOUR::ChanCount::max ( const ChanCount a,
const ChanCount b 
)
inlinestatic

Definition at line 138 of file chan_count.h.

static ChanCount ARDOUR::ChanCount::min ( const ChanCount a,
const ChanCount b 
)
inlinestatic

Definition at line 130 of file chan_count.h.

uint32_t ARDOUR::ChanCount::n ( DataType  t) const
inline

Definition at line 61 of file chan_count.h.

uint32_t ARDOUR::ChanCount::n_audio ( ) const
inline

Definition at line 63 of file chan_count.h.

uint32_t ARDOUR::ChanCount::n_midi ( ) const
inline

Definition at line 66 of file chan_count.h.

uint32_t ARDOUR::ChanCount::n_total ( ) const
inline

Definition at line 69 of file chan_count.h.

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

Definition at line 85 of file chan_count.h.

ChanCount ARDOUR::ChanCount::operator+ ( const ChanCount other) const
inline

Definition at line 115 of file chan_count.h.

ChanCount& ARDOUR::ChanCount::operator+= ( const ChanCount other)
inline

Definition at line 123 of file chan_count.h.

bool ARDOUR::ChanCount::operator< ( const ChanCount other) const
inline

Definition at line 89 of file chan_count.h.

bool ARDOUR::ChanCount::operator<= ( const ChanCount other) const
inline

Definition at line 98 of file chan_count.h.

bool ARDOUR::ChanCount::operator== ( const ChanCount other) const
inline

Definition at line 77 of file chan_count.h.

bool ARDOUR::ChanCount::operator> ( const ChanCount other) const
inline

Definition at line 102 of file chan_count.h.

bool ARDOUR::ChanCount::operator>= ( const ChanCount other) const
inline

Definition at line 111 of file chan_count.h.

void ARDOUR::ChanCount::reset ( )
inline

Definition at line 52 of file chan_count.h.

void ARDOUR::ChanCount::set ( DataType  t,
uint32_t  count 
)
inline

Definition at line 58 of file chan_count.h.

void ARDOUR::ChanCount::set_audio ( uint32_t  a)
inline

Definition at line 64 of file chan_count.h.

void ARDOUR::ChanCount::set_midi ( uint32_t  m)
inline

Definition at line 67 of file chan_count.h.

XMLNode * ARDOUR::ChanCount::state ( const std::string &  name) const

Definition at line 61 of file chan_count.cc.

Member Data Documentation

uint32_t ARDOUR::ChanCount::_counts[DataType::num_types]
private

Definition at line 152 of file chan_count.h.

const ChanCount ARDOUR::ChanCount::INFINITE = infinity_factory()
static

Definition at line 148 of file chan_count.h.

const ChanCount ARDOUR::ChanCount::ZERO = ChanCount()
static

Definition at line 149 of file chan_count.h.


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