ardour
enums.cc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2000-2007 Paul Davis
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #include "pbd/enumwriter.h"
21 #include "midi++/types.h"
22 
23 #include "evoral/Range.hpp" // shouldn't Evoral have its own enum registration?
24 
25 #include "ardour/delivery.h"
26 #include "ardour/diskstream.h"
27 #include "ardour/export_channel.h"
28 #include "ardour/export_filename.h"
31 #include "ardour/io.h"
32 #include "ardour/location.h"
33 #include "ardour/midi_model.h"
34 #include "ardour/mute_master.h"
35 #include "ardour/session.h"
36 #include "ardour/source.h"
37 #include "ardour/track.h"
38 #include "ardour/types.h"
39 
40 using namespace std;
41 using namespace PBD;
42 using namespace ARDOUR;
43 using namespace MIDI;
44 using namespace Timecode;
45 
46 namespace ARDOUR {
47 
48 void
50 {
51  EnumWriter& enum_writer (EnumWriter::instance());
52  vector<int> i;
53  vector<string> s;
54 
55  AlignStyle _AlignStyle;
56  AlignChoice _AlignChoice;
57  MeterPoint _MeterPoint;
58  MeterType _MeterType;
59  TrackMode _TrackMode;
60  NoteMode _NoteMode;
61  ChannelMode _ChannelMode;
62  ColorMode _ColorMode;
63  MeterFalloff _MeterFalloff;
64  MeterHold _MeterHold;
65  VUMeterStandard _VUMeterStandard;
66  MeterLineUp _MeterLineUp;
67  EditMode _EditMode;
68  RegionPoint _RegionPoint;
69  Placement _Placement;
70  MonitorModel _MonitorModel;
71  MonitorChoice _MonitorChoice;
72  MonitorState _MonitorState;
73  PFLPosition _PFLPosition;
74  AFLPosition _AFLPosition;
75  RemoteModel _RemoteModel;
76  DenormalModel _DenormalModel;
77  LayerModel _LayerModel;
78  InsertMergePolicy _InsertMergePolicy;
79  ListenPosition _ListenPosition;
80  SampleFormat _SampleFormat;
81  CDMarkerFormat _CDMarkerFormat;
82  HeaderFormat _HeaderFormat;
83  PluginType _PluginType;
84  SyncSource _SyncSource;
85  ShuttleBehaviour _ShuttleBehaviour;
86  ShuttleUnits _ShuttleUnits;
87  Session::RecordState _Session_RecordState;
88  SessionEvent::Type _SessionEvent_Type;
89  SessionEvent::Action _SessionEvent_Action;
90  TimecodeFormat _Session_TimecodeFormat;
91  Session::PullupFormat _Session_PullupFormat;
92  FadeShape _FadeShape;
93  RegionSelectionAfterSplit _RegionSelectionAfterSplit;
94  IOChange _IOChange;
95  AutomationType _AutomationType;
96  AutoState _AutoState;
97  AutoStyle _AutoStyle;
98  AutoConnectOption _AutoConnectOption;
99  Session::StateOfTheState _Session_StateOfTheState;
100  Route::Flag _Route_Flag;
101  Source::Flag _Source_Flag;
102  Diskstream::Flag _Diskstream_Flag;
103  Location::Flags _Location_Flags;
104  PositionLockStyle _PositionLockStyle;
105  Track::FreezeState _Track_FreezeState;
106  AutomationList::InterpolationStyle _AutomationList_InterpolationStyle;
107  AnyTime::Type _AnyTime_Type;
108  ExportFilename::TimeFormat _ExportFilename_TimeFormat;
109  ExportFilename::DateFormat _ExportFilename_DateFormat;
110  ExportFormatBase::Type _ExportFormatBase_Type;
111  ExportFormatBase::FormatId _ExportFormatBase_FormatId;
112  ExportFormatBase::Endianness _ExportFormatBase_Endianness;
113  ExportFormatBase::SampleFormat _ExportFormatBase_SampleFormat;
114  ExportFormatBase::DitherType _ExportFormatBase_DitherType;
115  ExportFormatBase::Quality _ExportFormatBase_Quality;
116  ExportFormatBase::SampleRate _ExportFormatBase_SampleRate;
117  ExportFormatBase::SRCQuality _ExportFormatBase_SRCQuality;
118  ExportProfileManager::TimeFormat _ExportProfileManager_TimeFormat;
119  RegionExportChannelFactory::Type _RegionExportChannelFactory_Type;
120  Delivery::Role _Delivery_Role;
121  IO::Direction _IO_Direction;
122  MuteMaster::MutePoint _MuteMaster_MutePoint;
123  MidiModel::NoteDiffCommand::Property _MidiModel_NoteDiffCommand_Property;
124  MidiModel::SysExDiffCommand::Property _MidiModel_SysExDiffCommand_Property;
125  MidiModel::PatchChangeDiffCommand::Property _MidiModel_PatchChangeDiffCommand_Property;
126  WaveformScale _WaveformScale;
127  WaveformShape _WaveformShape;
128  Session::PostTransportWork _Session_PostTransportWork;
129  Session::SlaveState _Session_SlaveState;
130  MTC_Status _MIDI_MTC_Status;
131  Evoral::OverlapType _OverlapType;
132 
133 #define REGISTER(e) enum_writer.register_distinct (typeid(e).name(), i, s); i.clear(); s.clear()
134 #define REGISTER_BITS(e) enum_writer.register_bits (typeid(e).name(), i, s); i.clear(); s.clear()
135 #define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e)
136 #define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e)
137 
151  REGISTER_BITS (_AutomationType);
152 
153  REGISTER_ENUM (Off);
157  REGISTER_BITS (_AutoState);
158 
161  REGISTER_BITS (_AutoStyle);
162 
165  REGISTER (_AlignStyle);
166 
170  REGISTER (_AlignChoice);
171 
177  REGISTER (_MeterPoint);
178 
192  REGISTER (_MeterType);
193 
197  REGISTER (_TrackMode);
198 
201  REGISTER (_NoteMode);
202 
206  REGISTER (_ChannelMode);
207 
211  REGISTER (_ColorMode);
212 
222  REGISTER (_MeterFalloff);
223 
228  REGISTER (_MeterHold);
229 
234  REGISTER (_VUMeterStandard);
235 
240  REGISTER (_MeterLineUp);
241 
244  REGISTER_ENUM (Ripple); // XXX do the old enum values have to stay in order?
246  REGISTER (_EditMode);
247  /*
248  * Splice mode is undefined, undocumented, and basically fubar'ed
249  * perhaps someday we will make it work. but for now, avoid it
250  */
251  enum_writer.add_to_hack_table ("Splice", "Slide");
252 
254  REGISTER_ENUM (End);
256  REGISTER (_RegionPoint);
257 
260  REGISTER (_Placement);
261 
265  REGISTER (_MonitorModel);
266 
271  REGISTER_BITS (_MonitorChoice);
272 
276  REGISTER_BITS (_MonitorState);
277 
280  REGISTER (_PFLPosition);
281 
284  REGISTER (_AFLPosition);
285 
290  REGISTER (_DenormalModel);
291 
294  REGISTER (_RemoteModel);
295  /*
296  * EditorOrdered has been deprecated
297  * since the removal of independent
298  * editor / mixer ordering.
299  */
300  enum_writer.add_to_hack_table ("EditorOrdered", "MixerOrdered");
301 
304  REGISTER (_LayerModel);
305 
312  REGISTER (_InsertMergePolicy);
313 
316  REGISTER (_ListenPosition);
317 
320  REGISTER_BITS (_AutoConnectOption);
321 
325  REGISTER (_SampleFormat);
326 
330  REGISTER (_CDMarkerFormat);
331 
332  REGISTER_ENUM (BWF);
335  REGISTER_ENUM (CAF);
339  REGISTER (_HeaderFormat);
340 
345  REGISTER (_PluginType);
346 
347  REGISTER_ENUM (MTC);
351  REGISTER_ENUM (LTC);
352  REGISTER (_SyncSource);
353 
356  REGISTER (_ShuttleBehaviour);
357 
360  REGISTER (_ShuttleUnits);
361 
362  REGISTER_CLASS_ENUM (Session, Disabled);
363  REGISTER_CLASS_ENUM (Session, Enabled);
364  REGISTER_CLASS_ENUM (Session, Recording);
365  REGISTER (_Session_RecordState);
366 
367  REGISTER_CLASS_ENUM (SessionEvent, SetTransportSpeed);
368  REGISTER_CLASS_ENUM (SessionEvent, SetTrackSpeed);
370  REGISTER_CLASS_ENUM (SessionEvent, LocateRoll);
371  REGISTER_CLASS_ENUM (SessionEvent, LocateRollLocate);
374  REGISTER_CLASS_ENUM (SessionEvent, PunchOut);
375  REGISTER_CLASS_ENUM (SessionEvent, RangeStop);
376  REGISTER_CLASS_ENUM (SessionEvent, RangeLocate);
377  REGISTER_CLASS_ENUM (SessionEvent, Overwrite);
378  REGISTER_CLASS_ENUM (SessionEvent, SetSyncSource);
379  REGISTER_CLASS_ENUM (SessionEvent, Audition);
380  REGISTER_CLASS_ENUM (SessionEvent, InputConfigurationChange);
381  REGISTER_CLASS_ENUM (SessionEvent, SetPlayAudioRange);
382  REGISTER_CLASS_ENUM (SessionEvent, CancelPlayAudioRange);
383  REGISTER_CLASS_ENUM (SessionEvent, RealTimeOperation);
384  REGISTER_CLASS_ENUM (SessionEvent, AdjustPlaybackBuffering);
385  REGISTER_CLASS_ENUM (SessionEvent, AdjustCaptureBuffering);
386  REGISTER_CLASS_ENUM (SessionEvent, SetTimecodeTransmission);
388  REGISTER_CLASS_ENUM (SessionEvent, StopOnce);
389  REGISTER_CLASS_ENUM (SessionEvent, AutoLoop);
390  REGISTER_CLASS_ENUM (SessionEvent, AutoLoopDeclick);
391  REGISTER (_SessionEvent_Type);
392 
397  REGISTER (_SessionEvent_Action);
398 
399  REGISTER_CLASS_ENUM (Session, Stopped);
400  REGISTER_CLASS_ENUM (Session, Waiting);
401  REGISTER_CLASS_ENUM (Session, Running);
402  REGISTER (_Session_SlaveState);
403 
404  REGISTER_ENUM (MTC_Stopped);
405  REGISTER_ENUM (MTC_Forward);
406  REGISTER_ENUM (MTC_Backward);
407  REGISTER (_MIDI_MTC_Status);
408 
409  REGISTER_CLASS_ENUM (Session, PostTransportStop);
410  REGISTER_CLASS_ENUM (Session, PostTransportDuration);
411  REGISTER_CLASS_ENUM (Session, PostTransportLocate);
412  REGISTER_CLASS_ENUM (Session, PostTransportRoll);
413  REGISTER_CLASS_ENUM (Session, PostTransportAbort);
414  REGISTER_CLASS_ENUM (Session, PostTransportOverWrite);
415  REGISTER_CLASS_ENUM (Session, PostTransportSpeed);
416  REGISTER_CLASS_ENUM (Session, PostTransportAudition);
417  REGISTER_CLASS_ENUM (Session, PostTransportReverse);
418  REGISTER_CLASS_ENUM (Session, PostTransportInputChange);
419  REGISTER_CLASS_ENUM (Session, PostTransportCurveRealloc);
420  REGISTER_CLASS_ENUM (Session, PostTransportClearSubstate);
421  REGISTER_BITS (_Session_PostTransportWork);
422 
423  REGISTER_CLASS_ENUM (Session, Clean);
424  REGISTER_CLASS_ENUM (Session, Dirty);
425  REGISTER_CLASS_ENUM (Session, CannotSave);
426  REGISTER_CLASS_ENUM (Session, Deletion);
427  REGISTER_CLASS_ENUM (Session, InitialConnecting);
428  REGISTER_CLASS_ENUM (Session, Loading);
429  REGISTER_CLASS_ENUM (Session, InCleanup);
430  REGISTER_BITS (_Session_StateOfTheState);
431 
432  REGISTER_ENUM (timecode_23976);
433  REGISTER_ENUM (timecode_24);
434  REGISTER_ENUM (timecode_24976);
435  REGISTER_ENUM (timecode_25);
436  REGISTER_ENUM (timecode_2997);
437  REGISTER_ENUM (timecode_2997drop);
438  REGISTER_ENUM (timecode_30);
439  REGISTER_ENUM (timecode_30drop);
440  REGISTER_ENUM (timecode_5994);
441  REGISTER_ENUM (timecode_60);
442  REGISTER (_Session_TimecodeFormat);
443 
444  REGISTER_CLASS_ENUM (Session, pullup_Plus4Plus1);
445  REGISTER_CLASS_ENUM (Session, pullup_Plus4);
446  REGISTER_CLASS_ENUM (Session, pullup_Plus4Minus1);
447  REGISTER_CLASS_ENUM (Session, pullup_Plus1);
448  REGISTER_CLASS_ENUM (Session, pullup_None);
449  REGISTER_CLASS_ENUM (Session, pullup_Minus1);
450  REGISTER_CLASS_ENUM (Session, pullup_Minus4Plus1);
451  REGISTER_CLASS_ENUM (Session, pullup_Minus4);
452  REGISTER_CLASS_ENUM (Session, pullup_Minus4Minus1);
453  REGISTER (_Session_PullupFormat);
454 
456  REGISTER_CLASS_ENUM (Route, MasterOut);
457  REGISTER_CLASS_ENUM (Route, MonitorOut);
458  REGISTER_BITS (_Route_Flag);
459 
461  REGISTER_CLASS_ENUM (Source, CanRename);
462  REGISTER_CLASS_ENUM (Source, Broadcast);
463  REGISTER_CLASS_ENUM (Source, Removable);
464  REGISTER_CLASS_ENUM (Source, RemovableIfEmpty);
465  REGISTER_CLASS_ENUM (Source, RemoveAtDestroy);
466  REGISTER_CLASS_ENUM (Source, NoPeakFile);
468  REGISTER_CLASS_ENUM (Source, Empty);
469  REGISTER_BITS (_Source_Flag);
470 
476  REGISTER (_FadeShape);
477 
486  REGISTER (_RegionSelectionAfterSplit);
487 
488  REGISTER_CLASS_ENUM (Diskstream, Recordable);
491  REGISTER_BITS (_Diskstream_Flag);
492 
493  REGISTER_CLASS_ENUM (Location, IsMark);
494  REGISTER_CLASS_ENUM (Location, IsAutoPunch);
495  REGISTER_CLASS_ENUM (Location, IsAutoLoop);
496  REGISTER_CLASS_ENUM (Location, IsHidden);
497  REGISTER_CLASS_ENUM (Location, IsCDMarker);
498  REGISTER_CLASS_ENUM (Location, IsSessionRange);
499  REGISTER_CLASS_ENUM (Location, IsRangeMarker);
500  REGISTER_CLASS_ENUM (Location, IsSkip);
501  REGISTER_BITS (_Location_Flags);
502 
503  REGISTER_CLASS_ENUM (Track, NoFreeze);
504  REGISTER_CLASS_ENUM (Track, Frozen);
505  REGISTER_CLASS_ENUM (Track, UnFrozen);
506  REGISTER (_Track_FreezeState);
507 
511  REGISTER (_AutomationList_InterpolationStyle);
512 
515  REGISTER_CLASS_ENUM (AnyTime, Frames);
516  REGISTER_CLASS_ENUM (AnyTime, Seconds);
517  REGISTER (_AnyTime_Type);
518 
521  REGISTER_CLASS_ENUM (ExportFilename, D_ISOShortY);
523  REGISTER_CLASS_ENUM (ExportFilename, D_BEShortY);
524  REGISTER (_ExportFilename_DateFormat);
525 
527  REGISTER_CLASS_ENUM (ExportFilename, T_NoDelim);
529  REGISTER (_ExportFilename_TimeFormat);
530 
533  REGISTER (_ExportFormatBase_Type);
534 
545  REGISTER (_ExportFormatBase_FormatId);
546 
547  REGISTER_CLASS_ENUM (ExportFormatBase, E_FileDefault);
551  REGISTER (_ExportFormatBase_Endianness);
552 
562  REGISTER (_ExportFormatBase_SampleFormat);
563 
568  REGISTER (_ExportFormatBase_DitherType);
569 
572  REGISTER_CLASS_ENUM (ExportFormatBase, Q_LosslessLinear);
573  REGISTER_CLASS_ENUM (ExportFormatBase, Q_LosslessCompression);
574  REGISTER_CLASS_ENUM (ExportFormatBase, Q_LossyCompression);
575  REGISTER (_ExportFormatBase_Quality);
576 
586  REGISTER (_ExportFormatBase_SampleRate);
587 
588  REGISTER_CLASS_ENUM (ExportFormatBase, SRC_SincBest);
589  REGISTER_CLASS_ENUM (ExportFormatBase, SRC_SincMedium);
590  REGISTER_CLASS_ENUM (ExportFormatBase, SRC_SincFast);
591  REGISTER_CLASS_ENUM (ExportFormatBase, SRC_ZeroOrderHold);
593  REGISTER (_ExportFormatBase_SRCQuality);
594 
599  REGISTER (_ExportProfileManager_TimeFormat);
600 
605  REGISTER (_RegionExportChannelFactory_Type);
606 
607  REGISTER_CLASS_ENUM (Delivery, Insert);
609  REGISTER_CLASS_ENUM (Delivery, Listen);
612  REGISTER_BITS (_Delivery_Role);
613 
618  REGISTER_BITS (_MuteMaster_MutePoint);
619 
620  REGISTER_CLASS_ENUM (IO, Input);
621  REGISTER_CLASS_ENUM (IO, Output);
622  REGISTER (_IO_Direction);
623 
629  REGISTER (_MidiModel_NoteDiffCommand_Property);
630 
632  REGISTER (_MidiModel_SysExDiffCommand_Property);
633 
637  REGISTER (_MidiModel_PatchChangeDiffCommand_Property);
638 
641  REGISTER(_WaveformScale);
642 
645  REGISTER(_WaveformShape);
646 
649  REGISTER(_PositionLockStyle);
650 
656  REGISTER(_OverlapType);
657 }
658 
659 } /* namespace ARDOUR */
660 
661 /* deserializing types from ardour/types.h */
662 
663 std::istream& operator>>(std::istream& o, HeaderFormat& var)
664 {
665  std::string s;
666  o >> s;
667  var = (HeaderFormat) string_2_enum (s, var);
668  return o;
669 }
670 
671 std::ostream& operator<<(std::ostream& o, const HeaderFormat& var)
672 {
673  std::string s = enum_2_string (var);
674  return o << s;
675 }
676 
677 std::istream& operator>>(std::istream& o, SampleFormat& var)
678 {
679  std::string s;
680  o >> s;
681  var = (SampleFormat) string_2_enum (s, var);
682  return o;
683 }
684 
685 std::ostream& operator<<(std::ostream& o, const SampleFormat& var)
686 {
687  std::string s = enum_2_string (var);
688  return o << s;
689 }
690 std::istream& operator>>(std::istream& o, AutoConnectOption& var)
691 {
692  std::string s;
693  o >> s;
694  var = (AutoConnectOption) string_2_enum (s, var);
695  return o;
696 }
697 
698 std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var)
699 {
700  std::string s = enum_2_string (var);
701  return o << s;
702 }
703 
704 std::istream& operator>>(std::istream& o, MonitorModel& var)
705 {
706  std::string s;
707  o >> s;
708  var = (MonitorModel) string_2_enum (s, var);
709  return o;
710 }
711 
712 std::ostream& operator<<(std::ostream& o, const MonitorModel& var)
713 {
714  std::string s = enum_2_string (var);
715  return o << s;
716 }
717 
718 std::istream& operator>>(std::istream& o, VUMeterStandard& var)
719 {
720  std::string s;
721  o >> s;
722  var = (VUMeterStandard) string_2_enum (s, var);
723  return o;
724 }
725 
726 std::ostream& operator<<(std::ostream& o, const VUMeterStandard& var)
727 {
728  std::string s = enum_2_string (var);
729  return o << s;
730 }
731 
732 std::istream& operator>>(std::istream& o, MeterLineUp& var)
733 {
734  std::string s;
735  o >> s;
736  var = (MeterLineUp) string_2_enum (s, var);
737  return o;
738 }
739 
740 std::ostream& operator<<(std::ostream& o, const MeterLineUp& var)
741 {
742  std::string s = enum_2_string (var);
743  return o << s;
744 }
745 
746 std::istream& operator>>(std::istream& o, PFLPosition& var)
747 {
748  std::string s;
749  o >> s;
750  var = (PFLPosition) string_2_enum (s, var);
751  return o;
752 }
753 
754 std::ostream& operator<<(std::ostream& o, const PFLPosition& var)
755 {
756  std::string s = enum_2_string (var);
757  return o << s;
758 }
759 
760 std::istream& operator>>(std::istream& o, AFLPosition& var)
761 {
762  std::string s;
763  o >> s;
764  var = (AFLPosition) string_2_enum (s, var);
765  return o;
766 }
767 
768 std::ostream& operator<<(std::ostream& o, const AFLPosition& var)
769 {
770  std::string s = enum_2_string (var);
771  return o << s;
772 }
773 
774 std::istream& operator>>(std::istream& o, RemoteModel& var)
775 {
776  std::string s;
777  o >> s;
778  var = (RemoteModel) string_2_enum (s, var);
779  return o;
780 }
781 
782 std::ostream& operator<<(std::ostream& o, const RemoteModel& var)
783 {
784  std::string s = enum_2_string (var);
785  return o << s;
786 }
787 std::istream& operator>>(std::istream& o, EditMode& var)
788 {
789  std::string s;
790  o >> s;
791  var = (EditMode) string_2_enum (s, var);
792  return o;
793 }
794 
795 std::ostream& operator<<(std::ostream& o, const EditMode& var)
796 {
797  std::string s = enum_2_string (var);
798  return o << s;
799 }
800 std::istream& operator>>(std::istream& o, ListenPosition& var)
801 {
802  std::string s;
803  o >> s;
804  var = (ListenPosition) string_2_enum (s, var);
805  return o;
806 }
807 
808 std::ostream& operator<<(std::ostream& o, const ListenPosition& var)
809 {
810  std::string s = enum_2_string (var);
811  return o << s;
812 }
813 std::istream& operator>>(std::istream& o, LayerModel& var)
814 {
815  std::string s;
816  o >> s;
817  var = (LayerModel) string_2_enum (s, var);
818  return o;
819 }
820 
821 std::ostream& operator<<(std::ostream& o, const LayerModel& var)
822 {
823  std::string s = enum_2_string (var);
824  return o << s;
825 }
826 
827 std::istream& operator>>(std::istream& o, InsertMergePolicy& var)
828 {
829  std::string s;
830  o >> s;
831  var = (InsertMergePolicy) string_2_enum (s, var);
832  return o;
833 }
834 std::ostream& operator<<(std::ostream& o, const InsertMergePolicy& var)
835 {
836  std::string s = enum_2_string (var);
837  return o << s;
838 }
839 
840 std::istream& operator>>(std::istream& o, SyncSource& var)
841 {
842  std::string s;
843  o >> s;
844  var = (SyncSource) string_2_enum (s, var);
845  return o;
846 }
847 
848 std::ostream& operator<<(std::ostream& o, const SyncSource& var)
849 {
850  std::string s = enum_2_string (var);
851  return o << s;
852 }
853 std::istream& operator>>(std::istream& o, ShuttleBehaviour& var)
854 {
855  std::string s;
856  o >> s;
857  var = (ShuttleBehaviour) string_2_enum (s, var);
858  return o;
859 }
860 
861 std::ostream& operator<<(std::ostream& o, const ShuttleBehaviour& var)
862 {
863  std::string s = enum_2_string (var);
864  return o << s;
865 }
866 std::istream& operator>>(std::istream& o, ShuttleUnits& var)
867 {
868  std::string s;
869  o >> s;
870  var = (ShuttleUnits) string_2_enum (s, var);
871  return o;
872 }
873 
874 std::ostream& operator<<(std::ostream& o, const ShuttleUnits& var)
875 {
876  std::string s = enum_2_string (var);
877  return o << s;
878 }
879 std::istream& operator>>(std::istream& o, TimecodeFormat& var)
880 {
881  std::string s;
882  o >> s;
883  var = (TimecodeFormat) string_2_enum (s, var);
884  return o;
885 }
886 
887 std::ostream& operator<<(std::ostream& o, const TimecodeFormat& var)
888 {
889  std::string s = enum_2_string (var);
890  return o << s;
891 }
892 std::istream& operator>>(std::istream& o, DenormalModel& var)
893 {
894  std::string s;
895  o >> s;
896  var = (DenormalModel) string_2_enum (s, var);
897  return o;
898 }
899 
900 std::ostream& operator<<(std::ostream& o, const DenormalModel& var)
901 {
902  std::string s = enum_2_string (var);
903  return o << s;
904 }
905 std::istream& operator>>(std::istream& o, WaveformScale& var)
906 {
907  std::string s;
908  o >> s;
909  var = (WaveformScale) string_2_enum (s, var);
910  return o;
911 }
912 
913 std::ostream& operator<<(std::ostream& o, const WaveformScale& var)
914 {
915  std::string s = enum_2_string (var);
916  return o << s;
917 }
918 std::istream& operator>>(std::istream& o, WaveformShape& var)
919 {
920  std::string s;
921  o >> s;
922  var = (WaveformShape) string_2_enum (s, var);
923  return o;
924 }
925 
926 std::ostream& operator<<(std::ostream& o, const WaveformShape& var)
927 {
928  std::string s = enum_2_string (var);
929  return o << s;
930 }
931 
932 std::istream& operator>>(std::istream& o, PositionLockStyle& var)
933 {
934  std::string s;
935  o >> s;
936  var = (PositionLockStyle) string_2_enum (s, var);
937  return o;
938 }
939 
940 std::ostream& operator<<(std::ostream& o, const PositionLockStyle& var)
941 {
942  std::string s = enum_2_string (var);
943  return o << s;
944 }
945 
946 std::istream& operator>>(std::istream& o, Evoral::OverlapType& var)
947 {
948  std::string s;
949  o >> s;
950  var = (Evoral::OverlapType) string_2_enum (s, var);
951  return o;
952 }
953 
954 std::ostream& operator<<(std::ostream& o, const Evoral::OverlapType& var)
955 {
956  std::string s = enum_2_string (var);
957  return o << s;
958 }
959 
960 std::istream& operator>>(std::istream& o, FadeShape& var)
961 {
962  std::string s;
963  o >> s;
964  var = (FadeShape) string_2_enum (s, var);
965  return o;
966 }
967 
968 std::ostream& operator<<(std::ostream& o, const FadeShape& var)
969 {
970  std::string s = enum_2_string (var);
971  return o << s;
972 }
973 
974 std::istream& operator>>(std::istream& o, RegionSelectionAfterSplit& var)
975 {
976  std::string s;
977  o >> s;
978  var = (RegionSelectionAfterSplit) string_2_enum (s, var);
979  return o;
980 }
981 
982 std::ostream& operator<<(std::ostream& o, const RegionSelectionAfterSplit& var)
983 {
984  std::string s = enum_2_string (var);
985  return o << s;
986 }
Handles RegionExportChannels and does actual reading from region.
HeaderFormat
Definition: types.h:475
Force all events to a certain channel.
Definition: types.h:212
Direction
Definition: io.h:72
SyncSource
Definition: types.h:498
InsertMergePolicy
Definition: types.h:110
NoteMode
Definition: types.h:204
std::istream & operator>>(std::istream &o, HeaderFormat &var)
Definition: enums.cc:663
AlignStyle
Definition: types.h:163
#define enum_2_string(e)
Definition: enumwriter.h:97
#define REGISTER_CLASS_ENUM(t, e)
void setup_enum_writer()
Definition: enums.cc:49
WaveformScale
Definition: types.h:538
AFLPosition
Definition: types.h:425
ColorMode
Definition: types.h:215
#define REGISTER_BITS(e)
JACK does monitoring.
Definition: types.h:381
Definition: Beats.hpp:239
DenormalModel
Definition: types.h:432
MonitorChoice
Definition: types.h:386
ChannelMode
Definition: types.h:209
AutoStyle
Definition: types.h:155
LayerModel
Definition: types.h:444
WaveformShape
Definition: types.h:543
TrackMode
Definition: types.h:198
we leave monitoring to the audio hardware
Definition: types.h:383
#define string_2_enum(str, e)
Definition: enumwriter.h:98
#define REGISTER_ENUM(e)
RemoteModel
Definition: types.h:439
MeterType
Definition: types.h:182
#define REGISTER(e)
void add_to_hack_table(std::string str, std::string hacked_str)
Definition: enumwriter.cc:323
Definition: amp.h:29
MonitorState
Definition: types.h:393
ListenPosition
Definition: types.h:449
Manages (de)serialization of export profiles and related classes.
AutomationType
Definition: types.h:121
MeterLineUp
Definition: types.h:411
EditMode
Definition: types.h:351
RegionSelectionAfterSplit
Definition: types.h:358
FadeShape
Definition: types.h:592
Ardour does monitoring.
Definition: types.h:382
ShuttleUnits
Definition: types.h:515
Writable
Definition: selectable.h:36
SampleFormat
Definition: types.h:460
PFLPosition
Definition: types.h:418
Definition: editor.h:86
OverlapType
Definition: Range.hpp:31
Definition: debug.h:30
Pass through all channel information unmodified.
Definition: types.h:210
LIBARDOUR_API uint64_t MTC
Definition: debug.cc:39
MeterHold
Definition: types.h:344
PositionLockStyle
Definition: types.h:553
std::ostream & operator<<(std::ostream &o, const HeaderFormat &var)
Definition: enums.cc:671
Off
Definition: widget_state.h:13
MeterPoint
Definition: types.h:174
LIBARDOUR_API uint64_t LTC
Definition: debug.cc:40
AlignChoice
Definition: types.h:168
MonitorModel
Definition: types.h:380
RegionPoint
Definition: types.h:369
Placement
Definition: types.h:375
MeterFalloff
Definition: types.h:332
AutoConnectOption
Definition: types.h:454
CDMarkerFormat
Definition: types.h:468
Definition: ardour.h:41
VUMeterStandard
Definition: types.h:404
ShuttleBehaviour
Definition: types.h:510
Ignore events on certain channels.
Definition: types.h:211
Definition: io.h:67
AutoState
Definition: types.h:145