34 #ifndef __EST_TRACKMAP_H__
35 #define __EST_TRACKMAP_H__
40 #include "EST_TNamedEnum.h"
41 #include "EST_ChannelType.h"
42 #include "EST_Handleable.h"
43 #include "EST_THandle.h"
76 unsigned short channel;
87 # define NO_SUCH_CHANNEL (-1)
92 short p_map[num_channel_types];
104 #define EST_TM_REFCOUNTED (1)
117 short get_parent(EST_ChannelType type)
const ;
133 void set(EST_ChannelType type,
short pos)
134 { p_map[(int)type] = pos; }
137 short get(EST_ChannelType type)
const
138 {
short c = p_map[(int)type];
139 return c!=NO_SUCH_CHANNEL?c:get_parent(type); }
141 short operator() (EST_ChannelType type)
const
142 {
return get(type); }
145 bool has_channel(EST_ChannelType type)
const
146 {
return p_map[(int)type] != NO_SUCH_CHANNEL
147 || ( p_parent!=0 && p_parent->has_channel(type) ); }
150 short last_channel(
void)
const;
153 EST_ChannelType channel_type(
unsigned short channel)
const;
156 const EST_TrackMap * object_ptr()
const {
return this; }
159 friend ostream& operator << (ostream &st,
const EST_TrackMap &m);
170 EST_ChannelNameTable[];
177 extern ostream& operator << (ostream &st,
const EST_TrackMap &m);