34 #ifndef __EST_TRACKMAP_H__ 35 #define __EST_TRACKMAP_H__ 86 # define NO_SUCH_CHANNEL (-1) 103 #define EST_TM_REFCOUNTED (1) 133 { p_map[(
int)type] = pos; }
137 {
short c = p_map[(
int)type];
141 {
return get(
type); }
146 || ( p_parent!=0 && p_parent->
has_channel(type) ); }
short get_parent(EST_ChannelType type) const
bool has_channel(EST_ChannelType type) const
Does the mapping contain a position for this channel?
short last_channel(void) const
Returns the index of the last known channel.
Reference Counting Interface.
EST_TNamedEnum< EST_ChannelType > EST_ChannelNameMap
Can be used to size arrays etc.
EST_ChannelNameMap esps_channel_names
Definition of the names ESPS programs use for channels.
EST_TrackMap(void)
Default constructor.
EST_TValuedEnumDefinition< EST_ChannelType, const char *, NO_INFO > EST_ChannelNameTable[]
EST_ChannelType channel_type(unsigned short channel) const
Returns the type of the channel at the given position.
short operator()(EST_ChannelType type) const
Get the position of a channel.
EST_THandle< EST_TrackMap, EST_TrackMap > P
Table of type to position pairs.
void copy(EST_TrackMap &from)
copy an exiting map.
void init(void)
Initialise the map.
EST_TrackMap * object_ptr()
friend std::ostream & operator<<(std::ostream &st, const EST_TrackMap &m)
EST_ChannelNameMap EST_default_channel_names
Definition of standard names we use for channels.
const EST_TrackMap * object_ptr() const
void clear(void)
Empty the map.
EST_Item * parent(const EST_Item *n)
return parent of n
#define NO_SUCH_CHANNEL
Returned if we ask for a channel not in the map.