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); }
142 {
return get(type); }
146 {
return p_map[(int)type] != NO_SUCH_CHANNEL
147 || ( p_parent!=0 && p_parent->
has_channel(type) ); }
153 EST_ChannelType
channel_type(
unsigned short channel)
const;
156 const EST_TrackMap * object_ptr()
const {
return this; }
170 EST_ChannelNameTable[];
void init(void)
Initialise the map.
EST_ChannelType channel_type(unsigned short channel) const
Returns the type of the channel at the given position.
bool has_channel(EST_ChannelType type) const
Does the mapping contain a position for this channel?
EST_THandle< EST_TrackMap, EST_TrackMap > P
Table of type to position pairs.
void copy(EST_TrackMap &from)
copy an exiting map.
void clear(void)
Empty the map.
short last_channel(void) const
Returns the index of the last known channel.
short operator()(EST_ChannelType type) const
Get the position of a channel.
short get(EST_ChannelType type) const
Get the position of a channel.
void set(EST_ChannelType type, short pos)
Record the position of a channel.
EST_TrackMap(void)
Default constructor.