2 Copyright (C) 2000-2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <pbd/enumwriter.h>
22 #include <ardour/types.h>
23 #include <ardour/session.h>
24 #include <ardour/location.h>
25 #include <ardour/audiofilesource.h>
26 #include <ardour/diskstream.h>
27 #include <ardour/audioregion.h>
28 #include <ardour/route_group.h>
29 #include <ardour/panner.h>
30 #include <ardour/track.h>
34 using namespace ARDOUR
;
39 EnumWriter
* enum_writer
= new EnumWriter();
43 OverlapType _OverlapType
;
44 AlignStyle _AlignStyle
;
45 MeterPoint _MeterPoint
;
47 MeterFalloff _MeterFalloff
;
50 RegionPoint _RegionPoint
;
52 MonitorModel _MonitorModel
;
53 RemoteModel _RemoteModel
;
54 DenormalModel _DenormalModel
;
55 CrossfadeModel _CrossfadeModel
;
56 LayerModel _LayerModel
;
58 SampleFormat _SampleFormat
;
59 HeaderFormat _HeaderFormat
;
60 PluginType _PluginType
;
61 SlaveSource _SlaveSource
;
62 ShuttleBehaviour _ShuttleBehaviour
;
63 ShuttleUnits _ShuttleUnits
;
65 Session::RecordState _Session_RecordState
;
66 Session::Event::Type _Session_Event_Type
;
67 SmpteFormat _Session_SmpteFormat
;
68 Session::PullupFormat _Session_PullupFormat
;
69 AudioRegion::FadeShape _AudioRegion_FadeShape
;
70 Panner::LinkDirection _Panner_LinkDirection
;
72 AutomationType _AutomationType
;
75 AutoConnectOption _AutoConnectOption
;
76 Session::StateOfTheState _Session_StateOfTheState
;
77 Route::Flag _Route_Flag
;
78 AudioFileSource::Flag _AudioFileSource_Flag
;
79 Diskstream::Flag _Diskstream_Flag
;
80 Location::Flags _Location_Flags
;
81 RouteGroup::Flag _RouteGroup_Flag
;
82 Region::Flag _Region_Flag
;
83 Region::PositionLockStyle _Region_PositionLockStyle
;
84 Track::FreezeState _Track_FreezeState
;
86 #define REGISTER(e) enum_writer->register_distinct (typeid(e).name(), i, s); i.clear(); s.clear()
87 #define REGISTER_BITS(e) enum_writer->register_bits (typeid(e).name(), i, s); i.clear(); s.clear()
88 #define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e)
89 #define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e)
91 REGISTER_ENUM (NoChange
);
92 REGISTER_ENUM (ConfigurationChanged
);
93 REGISTER_ENUM (ConnectionsChanged
);
94 REGISTER_BITS (_IOChange
);
96 REGISTER_ENUM (OverlapNone
);
97 REGISTER_ENUM (OverlapInternal
);
98 REGISTER_ENUM (OverlapStart
);
99 REGISTER_ENUM (OverlapEnd
);
100 REGISTER_ENUM (OverlapExternal
);
101 REGISTER (_OverlapType
);
103 REGISTER_ENUM (GainAutomation
);
104 REGISTER_ENUM (PanAutomation
);
105 REGISTER_ENUM (PluginAutomation
);
106 REGISTER_ENUM (SoloAutomation
);
107 REGISTER_ENUM (MuteAutomation
);
108 REGISTER_BITS (_AutomationType
);
111 REGISTER_ENUM (Write
);
112 REGISTER_ENUM (Touch
);
113 REGISTER_ENUM (Play
);
114 REGISTER_BITS (_AutoState
);
116 REGISTER_ENUM (Absolute
);
117 REGISTER_ENUM (Trim
);
118 REGISTER_BITS (_AutoStyle
);
120 REGISTER_ENUM (CaptureTime
);
121 REGISTER_ENUM (ExistingMaterial
);
122 REGISTER (_AlignStyle
);
124 REGISTER_ENUM (MeterInput
);
125 REGISTER_ENUM (MeterPreFader
);
126 REGISTER_ENUM (MeterPostFader
);
127 REGISTER (_MeterPoint
);
129 REGISTER_ENUM (Normal
);
130 REGISTER_ENUM (Destructive
);
131 REGISTER (_TrackMode
);
133 REGISTER_ENUM (MeterFalloffOff
);
134 REGISTER_ENUM (MeterFalloffSlowest
);
135 REGISTER_ENUM (MeterFalloffSlow
);
136 REGISTER_ENUM (MeterFalloffMedium
);
137 REGISTER_ENUM (MeterFalloffFast
);
138 REGISTER_ENUM (MeterFalloffFaster
);
139 REGISTER_ENUM (MeterFalloffFastest
);
140 REGISTER (_MeterFalloff
);
142 REGISTER_ENUM (MeterHoldOff
);
143 REGISTER_ENUM (MeterHoldShort
);
144 REGISTER_ENUM (MeterHoldMedium
);
145 REGISTER_ENUM (MeterHoldLong
);
146 REGISTER (_MeterHold
);
148 REGISTER_ENUM (Slide
);
149 REGISTER_ENUM (Splice
);
150 REGISTER (_EditMode
);
152 REGISTER_ENUM (Start
);
154 REGISTER_ENUM (SyncPoint
);
155 REGISTER (_RegionPoint
);
157 REGISTER_ENUM (PreFader
);
158 REGISTER_ENUM (PostFader
);
159 REGISTER (_Placement
);
161 REGISTER_ENUM (HardwareMonitoring
);
162 REGISTER_ENUM (SoftwareMonitoring
);
163 REGISTER_ENUM (ExternalMonitoring
);
164 REGISTER (_MonitorModel
);
166 REGISTER_ENUM (DenormalNone
);
167 REGISTER_ENUM (DenormalFTZ
);
168 REGISTER_ENUM (DenormalDAZ
);
169 REGISTER_ENUM (DenormalFTZDAZ
);
170 REGISTER (_DenormalModel
);
172 REGISTER_ENUM (UserOrdered
);
173 REGISTER_ENUM (MixerOrdered
);
174 REGISTER_ENUM (EditorOrdered
);
175 REGISTER (_RemoteModel
);
177 REGISTER_ENUM (FullCrossfade
);
178 REGISTER_ENUM (ShortCrossfade
);
179 REGISTER (_CrossfadeModel
);
181 REGISTER_ENUM (LaterHigher
);
182 REGISTER_ENUM (MoveAddHigher
);
183 REGISTER_ENUM (AddHigher
);
184 REGISTER (_LayerModel
);
186 REGISTER_ENUM (InverseMute
);
187 REGISTER_ENUM (SoloBus
);
188 REGISTER (_SoloModel
);
190 REGISTER_ENUM (AutoConnectPhysical
);
191 REGISTER_ENUM (AutoConnectMaster
);
192 REGISTER_BITS (_AutoConnectOption
);
194 REGISTER_ENUM (FormatFloat
);
195 REGISTER_ENUM (FormatInt24
);
196 REGISTER_ENUM (FormatInt16
);
197 REGISTER (_SampleFormat
);
200 REGISTER_ENUM (WAVE
);
201 REGISTER_ENUM (WAVE64
);
203 REGISTER_ENUM (AIFF
);
204 REGISTER_ENUM (iXML
);
205 REGISTER_ENUM (RF64
);
206 REGISTER (_HeaderFormat
);
208 REGISTER_ENUM (AudioUnit
);
209 REGISTER_ENUM (LADSPA
);
211 REGISTER (_PluginType
);
213 REGISTER_ENUM (None
);
215 REGISTER_ENUM (JACK
);
216 REGISTER (_SlaveSource
);
218 REGISTER_ENUM (Sprung
);
219 REGISTER_ENUM (Wheel
);
220 REGISTER (_ShuttleBehaviour
);
222 REGISTER_ENUM (Percentage
);
223 REGISTER_ENUM (Semitones
);
224 REGISTER (_ShuttleUnits
);
226 REGISTER_CLASS_ENUM (Session
, Disabled
);
227 REGISTER_CLASS_ENUM (Session
, Enabled
);
228 REGISTER_CLASS_ENUM (Session
, Recording
);
229 REGISTER (_Session_RecordState
);
231 REGISTER_CLASS_ENUM (Session::Event
, SetTransportSpeed
);
232 REGISTER_CLASS_ENUM (Session::Event
, SetDiskstreamSpeed
);
233 REGISTER_CLASS_ENUM (Session::Event
, Locate
);
234 REGISTER_CLASS_ENUM (Session::Event
, LocateRoll
);
235 REGISTER_CLASS_ENUM (Session::Event
, LocateRollLocate
);
236 REGISTER_CLASS_ENUM (Session::Event
, SetLoop
);
237 REGISTER_CLASS_ENUM (Session::Event
, PunchIn
);
238 REGISTER_CLASS_ENUM (Session::Event
, PunchOut
);
239 REGISTER_CLASS_ENUM (Session::Event
, RangeStop
);
240 REGISTER_CLASS_ENUM (Session::Event
, RangeLocate
);
241 REGISTER_CLASS_ENUM (Session::Event
, Overwrite
);
242 REGISTER_CLASS_ENUM (Session::Event
, SetSlaveSource
);
243 REGISTER_CLASS_ENUM (Session::Event
, Audition
);
244 REGISTER_CLASS_ENUM (Session::Event
, InputConfigurationChange
);
245 REGISTER_CLASS_ENUM (Session::Event
, SetAudioRange
);
246 REGISTER_CLASS_ENUM (Session::Event
, SetPlayRange
);
247 REGISTER_CLASS_ENUM (Session::Event
, StopOnce
);
248 REGISTER_CLASS_ENUM (Session::Event
, AutoLoop
);
249 REGISTER (_Session_Event_Type
);
251 REGISTER_CLASS_ENUM (Session
, Clean
);
252 REGISTER_CLASS_ENUM (Session
, Dirty
);
253 REGISTER_CLASS_ENUM (Session
, CannotSave
);
254 REGISTER_CLASS_ENUM (Session
, Deletion
);
255 REGISTER_CLASS_ENUM (Session
, InitialConnecting
);
256 REGISTER_CLASS_ENUM (Session
, Loading
);
257 REGISTER_CLASS_ENUM (Session
, InCleanup
);
258 REGISTER_BITS (_Session_StateOfTheState
);
260 REGISTER_ENUM (smpte_23976
);
261 REGISTER_ENUM (smpte_24
);
262 REGISTER_ENUM (smpte_24976
);
263 REGISTER_ENUM (smpte_25
);
264 REGISTER_ENUM (smpte_2997
);
265 REGISTER_ENUM (smpte_2997drop
);
266 REGISTER_ENUM (smpte_30
);
267 REGISTER_ENUM (smpte_30drop
);
268 REGISTER_ENUM (smpte_5994
);
269 REGISTER_ENUM (smpte_60
);
270 REGISTER (_Session_SmpteFormat
);
272 REGISTER_CLASS_ENUM (Session
, pullup_Plus4Plus1
);
273 REGISTER_CLASS_ENUM (Session
, pullup_Plus4
);
274 REGISTER_CLASS_ENUM (Session
, pullup_Plus4Minus1
);
275 REGISTER_CLASS_ENUM (Session
, pullup_Plus1
);
276 REGISTER_CLASS_ENUM (Session
, pullup_None
);
277 REGISTER_CLASS_ENUM (Session
, pullup_Minus1
);
278 REGISTER_CLASS_ENUM (Session
, pullup_Minus4Plus1
);
279 REGISTER_CLASS_ENUM (Session
, pullup_Minus4
);
280 REGISTER_CLASS_ENUM (Session
, pullup_Minus4Minus1
);
281 REGISTER (_Session_PullupFormat
);
283 REGISTER_ENUM (PRE_FADER
);
284 REGISTER_ENUM (POST_FADER
);
285 REGISTER_ENUM (CONTROL_OUTS
);
286 REGISTER_ENUM (MAIN_OUTS
);
287 REGISTER (_mute_type
);
289 REGISTER_CLASS_ENUM (Route
, Hidden
);
290 REGISTER_CLASS_ENUM (Route
, MasterOut
);
291 REGISTER_CLASS_ENUM (Route
, ControlOut
);
292 REGISTER_BITS (_Route_Flag
);
294 REGISTER_CLASS_ENUM (AudioFileSource
, Writable
);
295 REGISTER_CLASS_ENUM (AudioFileSource
, CanRename
);
296 REGISTER_CLASS_ENUM (AudioFileSource
, Broadcast
);
297 REGISTER_CLASS_ENUM (AudioFileSource
, Removable
);
298 REGISTER_CLASS_ENUM (AudioFileSource
, RemovableIfEmpty
);
299 REGISTER_CLASS_ENUM (AudioFileSource
, RemoveAtDestroy
);
300 REGISTER_CLASS_ENUM (AudioFileSource
, NoPeakFile
);
301 REGISTER_CLASS_ENUM (AudioFileSource
, Destructive
);
302 REGISTER_BITS (_AudioFileSource_Flag
);
304 REGISTER_CLASS_ENUM (AudioRegion
, Linear
);
305 REGISTER_CLASS_ENUM (AudioRegion
, Fast
);
306 REGISTER_CLASS_ENUM (AudioRegion
, Slow
);
307 REGISTER_CLASS_ENUM (AudioRegion
, LogA
);
308 REGISTER_CLASS_ENUM (AudioRegion
, LogB
);
309 REGISTER (_AudioRegion_FadeShape
);
311 REGISTER_CLASS_ENUM (Diskstream
, Recordable
);
312 REGISTER_CLASS_ENUM (Diskstream
, Hidden
);
313 REGISTER_CLASS_ENUM (Diskstream
, Destructive
);
314 REGISTER_BITS (_Diskstream_Flag
);
316 REGISTER_CLASS_ENUM (Location
, IsMark
);
317 REGISTER_CLASS_ENUM (Location
, IsAutoPunch
);
318 REGISTER_CLASS_ENUM (Location
, IsAutoLoop
);
319 REGISTER_CLASS_ENUM (Location
, IsHidden
);
320 REGISTER_CLASS_ENUM (Location
, IsCDMarker
);
321 REGISTER_CLASS_ENUM (Location
, IsEnd
);
322 REGISTER_CLASS_ENUM (Location
, IsRangeMarker
);
323 REGISTER_CLASS_ENUM (Location
, IsStart
);
324 REGISTER_BITS (_Location_Flags
);
327 REGISTER_CLASS_ENUM (RouteGroup
, Relative
);
328 REGISTER_CLASS_ENUM (RouteGroup
, Active
);
329 REGISTER_CLASS_ENUM (RouteGroup
, Hidden
);
330 REGISTER_BITS (_RouteGroup_Flag
);
332 REGISTER_CLASS_ENUM (Panner
, SameDirection
);
333 REGISTER_CLASS_ENUM (Panner
, OppositeDirection
);
334 REGISTER (_Panner_LinkDirection
);
336 REGISTER_CLASS_ENUM (Region
, Muted
);
337 REGISTER_CLASS_ENUM (Region
, Opaque
);
338 REGISTER_CLASS_ENUM (Region
, EnvelopeActive
);
339 REGISTER_CLASS_ENUM (Region
, DefaultFadeIn
);
340 REGISTER_CLASS_ENUM (Region
, DefaultFadeOut
);
341 REGISTER_CLASS_ENUM (Region
, Locked
);
342 REGISTER_CLASS_ENUM (Region
, Automatic
);
343 REGISTER_CLASS_ENUM (Region
, WholeFile
);
344 REGISTER_CLASS_ENUM (Region
, FadeIn
);
345 REGISTER_CLASS_ENUM (Region
, FadeOut
);
346 REGISTER_CLASS_ENUM (Region
, Copied
);
347 REGISTER_CLASS_ENUM (Region
, Import
);
348 REGISTER_CLASS_ENUM (Region
, External
);
349 REGISTER_CLASS_ENUM (Region
, SyncMarked
);
350 REGISTER_CLASS_ENUM (Region
, LeftOfSplit
);
351 REGISTER_CLASS_ENUM (Region
, RightOfSplit
);
352 REGISTER_CLASS_ENUM (Region
, Hidden
);
353 REGISTER_CLASS_ENUM (Region
, DoNotSaveState
);
354 REGISTER_BITS (_Region_Flag
);
356 REGISTER_CLASS_ENUM (Region
, AudioTime
);
357 REGISTER_CLASS_ENUM (Region
, MusicTime
);
358 REGISTER_BITS (_Region_PositionLockStyle
);
360 REGISTER_CLASS_ENUM (Track
, NoFreeze
);
361 REGISTER_CLASS_ENUM (Track
, Frozen
);
362 REGISTER_CLASS_ENUM (Track
, UnFrozen
);
363 REGISTER (_Track_FreezeState
);