Constification: make Stateful::get_state() const, with all other required const-ness added (libs)

This commit is contained in:
Paul Davis 2022-04-06 21:56:32 -06:00
parent 9e69c0d184
commit 7bf89ce109
233 changed files with 476 additions and 460 deletions

View file

@ -322,7 +322,7 @@ Amp::apply_simple_gain (AudioBuffer& buf, samplecnt_t nframes, gain_t target, sa
} }
XMLNode& XMLNode&
Amp::state () Amp::state () const
{ {
XMLNode& node (Processor::state ()); XMLNode& node (Processor::state ());
switch (_gain_control->parameter().type()) { switch (_gain_control->parameter().type()) {

View file

@ -54,7 +54,7 @@ public:
void setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, samplecnt_t nframes); void setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, samplecnt_t nframes);
XMLNode& state (); XMLNode& state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
static gain_t apply_gain (BufferSet& bufs, samplecnt_t sample_rate, samplecnt_t nframes, gain_t initial, gain_t target, bool midi_amp = true); static gain_t apply_gain (BufferSet& bufs, samplecnt_t sample_rate, samplecnt_t nframes, gain_t initial, gain_t target, bool midi_amp = true);

View file

@ -47,7 +47,7 @@ public:
float sample_rate () const; float sample_rate () const;
int setup_peakfile (); int setup_peakfile ();
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
bool can_truncate_peaks() const { return false; } bool can_truncate_peaks() const { return false; }

View file

@ -57,7 +57,7 @@ class LIBARDOUR_API AudioTrack : public Track
boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0); boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0);
protected: protected:
XMLNode& state (bool save_template); XMLNode& state (bool save_template) const;
private: private:
int deprecated_use_diskstream_connections (); int deprecated_use_diskstream_connections ();

View file

@ -66,7 +66,7 @@ public:
int setup_peakfile (); int setup_peakfile ();
void set_gain (float g, bool temporarily = false); void set_gain (float g, bool temporarily = false);
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
bool can_truncate_peaks() const { return true; } bool can_truncate_peaks() const { return true; }

View file

@ -127,8 +127,8 @@ class LIBARDOUR_API AudioRegion : public Region, public AudioReadable
samplecnt_t read_raw_internal (Sample*, samplepos_t, samplecnt_t, int channel) const; samplecnt_t read_raw_internal (Sample*, samplepos_t, samplecnt_t, int channel) const;
XMLNode& state (); XMLNode& state () const;
XMLNode& get_basic_state (); XMLNode& get_basic_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
void fade_range (samplepos_t, samplepos_t); void fade_range (samplepos_t, samplepos_t);

View file

@ -73,7 +73,7 @@ class LIBARDOUR_API AudioSource : virtual public Source, public ARDOUR::AudioRea
mutable PBD::Signal0<void> PeaksReady; mutable PBD::Signal0<void> PeaksReady;
mutable PBD::Signal2<void,samplepos_t,samplepos_t> PeakRangeReady; mutable PBD::Signal2<void,samplepos_t,samplepos_t> PeakRangeReady;
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
int rename_peakfile (std::string newpath); int rename_peakfile (std::string newpath);

View file

@ -110,7 +110,7 @@ public:
static const std::string xml_node_name; static const std::string xml_node_name;
int set_automation_xml_state (const XMLNode&, Evoral::Parameter default_param); int set_automation_xml_state (const XMLNode&, Evoral::Parameter default_param);
XMLNode& get_automation_xml_state(); XMLNode& get_automation_xml_state() const;
PBD::Signal0<void> AutomationStateChanged; PBD::Signal0<void> AutomationStateChanged;

View file

@ -113,7 +113,7 @@ public:
bool writing () const { return _state == Write; } bool writing () const { return _state == Write; }
bool touch_enabled () const { return _state & (Touch | Latch); } bool touch_enabled () const { return _state & (Touch | Latch); }
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode &, int version); int set_state (const XMLNode &, int version);
Command* memento_command (XMLNode* before, XMLNode* after); Command* memento_command (XMLNode* before, XMLNode* after);
@ -130,8 +130,8 @@ private:
void create_curve_if_necessary (); void create_curve_if_necessary ();
int deserialize_events (const XMLNode&); int deserialize_events (const XMLNode&);
XMLNode& state (bool save_auto_state, bool need_lock); XMLNode& state (bool save_auto_state, bool need_lock) const;
XMLNode& serialize_events (bool need_lock); XMLNode& serialize_events (bool need_lock) const;
void maybe_signal_changed (); void maybe_signal_changed ();

View file

@ -55,8 +55,8 @@ class BeatBox : public ARDOUR::Processor {
void silence (samplecnt_t nframes, samplepos_t start_frame); void silence (samplecnt_t nframes, samplepos_t start_frame);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out); bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
XMLNode& state(); XMLNode& state() const;
XMLNode& get_state(void); XMLNode& get_state () const;
bool fill_source (boost::shared_ptr<Source>); bool fill_source (boost::shared_ptr<Source>);

View file

@ -43,7 +43,7 @@ public: // Processor overrides
bool can_support_io_configuration (const ChanCount& in, ChanCount& out); bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
void realloc_buffers(); void realloc_buffers();

View file

@ -82,7 +82,7 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR
static const std::string state_node_name; static const std::string state_node_name;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
XMLNode& get_state (void); XMLNode& get_state () const;
PBD::Signal1<void,ControlProtocolInfo*> ProtocolStatusChange; PBD::Signal1<void,ControlProtocolInfo*> ProtocolStatusChange;
@ -93,7 +93,7 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR
ControlProtocolManager (); ControlProtocolManager ();
static ControlProtocolManager* _instance; static ControlProtocolManager* _instance;
Glib::Threads::RWLock protocols_lock; mutable Glib::Threads::RWLock protocols_lock;
std::list<ControlProtocol*> control_protocols; std::list<ControlProtocol*> control_protocols;
void session_going_away (); void session_going_away ();

View file

@ -51,7 +51,7 @@ public:
void flush (); void flush ();
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
void allocate_pending_buffers (samplecnt_t, ChanCount const&); void allocate_pending_buffers (samplecnt_t, ChanCount const&);

View file

@ -114,7 +114,7 @@ public:
virtual uint32_t pan_outs() const; virtual uint32_t pan_outs() const;
protected: protected:
XMLNode& state (); XMLNode& state () const;
Role _role; Role _role;
BufferSet* _output_buffers; BufferSet* _output_buffers;

View file

@ -146,7 +146,7 @@ protected:
bool initialized; bool initialized;
}; };
XMLNode& state (); XMLNode& state () const;
void resolve_tracker (Evoral::EventSink<samplepos_t>& buffer, samplepos_t time); void resolve_tracker (Evoral::EventSink<samplepos_t>& buffer, samplepos_t time);

View file

@ -136,7 +136,7 @@ protected:
void resize (samplecnt_t); void resize (samplecnt_t);
}; };
virtual XMLNode& state (); virtual XMLNode& state () const;
int use_playlist (DataType, boost::shared_ptr<Playlist>); int use_playlist (DataType, boost::shared_ptr<Playlist>);

View file

@ -48,7 +48,7 @@ class LIBARDOUR_API ExportChannelConfiguration : public boost::enable_shared_fro
bool operator== (ExportChannelConfiguration const & other) const { return channels == other.channels; } bool operator== (ExportChannelConfiguration const & other) const { return channels == other.channels; }
bool operator!= (ExportChannelConfiguration const & other) const { return channels != other.channels; } bool operator!= (ExportChannelConfiguration const & other) const { return channels != other.channels; }
XMLNode & get_state (); XMLNode & get_state () const;
int set_state (const XMLNode &); int set_state (const XMLNode &);
typedef std::list<ExportChannelPtr> ChannelList; typedef std::list<ExportChannelPtr> ChannelList;

View file

@ -58,7 +58,7 @@ class LIBARDOUR_API ExportFilename {
public: public:
/* Serialization */ /* Serialization */
XMLNode & get_state (); XMLNode & get_state () const;
int set_state (const XMLNode &); int set_state (const XMLNode &);
/* data access */ /* data access */
@ -122,9 +122,9 @@ class LIBARDOUR_API ExportFilename {
typedef std::pair<bool, std::string> FieldPair; typedef std::pair<bool, std::string> FieldPair;
void add_field (XMLNode * node, std::string const & name, bool enabled, std::string const & value = ""); static void add_field (XMLNode * node, std::string const & name, bool enabled, std::string const & value = "");
FieldPair get_field (XMLNode const & node, std::string const & name); FieldPair get_field (XMLNode const & node, std::string const & name);
FieldPair analyse_folder (); FieldPair analyse_folder () const;
}; };

View file

@ -55,7 +55,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
/* Serialization */ /* Serialization */
XMLNode & get_state (); XMLNode & get_state () const;
int set_state (const XMLNode & node); int set_state (const XMLNode & node);
private: private:
@ -201,7 +201,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
/* Serialization */ /* Serialization */
XMLNode & get_state (); XMLNode & get_state () const;
int set_state (const XMLNode & root); int set_state (const XMLNode & root);
@ -256,8 +256,8 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
/* serialization helpers */ /* serialization helpers */
void add_option (XMLNode * node, std::string const & name, std::string const & value); static void add_option (XMLNode * node, std::string const & name, std::string const & value);
std::string get_option (XMLNode const * node, std::string const & name); static std::string get_option (XMLNode const * node, std::string const & name);
}; };

View file

@ -46,7 +46,7 @@ public:
void set_playback_offset (samplecnt_t cnt); void set_playback_offset (samplecnt_t cnt);
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
/** sends that we are receiving data from */ /** sends that we are receiving data from */

View file

@ -64,7 +64,7 @@ public:
static PBD::Signal1<void, pframes_t> CycleStart; static PBD::Signal1<void, pframes_t> CycleStart;
protected: protected:
XMLNode& state(); XMLNode& state() const;
private: private:
BufferSet mixbufs; BufferSet mixbufs;

View file

@ -152,7 +152,7 @@ public:
*/ */
PBD::Signal2<void, IOChange, void *> changed; PBD::Signal2<void, IOChange, void *> changed;
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
int set_state_2X (const XMLNode&, int, bool); int set_state_2X (const XMLNode&, int, bool);
@ -198,7 +198,7 @@ public:
int set_ports (const std::string& str); int set_ports (const std::string& str);
protected: protected:
virtual XMLNode& state (); virtual XMLNode& state () const;
Direction _direction; Direction _direction;
DataType _default_type; DataType _default_type;

View file

@ -76,7 +76,7 @@ public:
PBD::Signal2<void,IOProcessor*,bool> AutomationPlaybackChanged; PBD::Signal2<void,IOProcessor*,bool> AutomationPlaybackChanged;
PBD::Signal2<void,IOProcessor*,uint32_t> AutomationChanged; PBD::Signal2<void,IOProcessor*,uint32_t> AutomationChanged;
XMLNode& state (); XMLNode& state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
static void prepare_for_reset (XMLNode& state, const std::string& name); static void prepare_for_reset (XMLNode& state, const std::string& name);

View file

@ -158,9 +158,9 @@ public:
/* CD Track / CD-Text info */ /* CD Track / CD-Text info */
std::map<std::string, std::string> cd_info; std::map<std::string, std::string> cd_info;
XMLNode& cd_info_node (const std::string &, const std::string &); static XMLNode& cd_info_node (const std::string &, const std::string &);
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
Temporal::TimeDomain position_time_domain() const { return _start.time_domain(); } Temporal::TimeDomain position_time_domain() const { return _start.time_domain(); }
@ -216,7 +216,7 @@ public:
void ripple (timepos_t const & at, timecnt_t const & distance, bool include_locked, bool notify); void ripple (timepos_t const & at, timecnt_t const & distance, bool include_locked, bool notify);
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
Location *get_location_by_id(PBD::ID); Location *get_location_by_id(PBD::ID);

View file

@ -89,7 +89,7 @@ public:
PBD::Signal1<void, MeterType> MeterTypeChanged; PBD::Signal1<void, MeterType> MeterTypeChanged;
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
friend class IO; friend class IO;

View file

@ -73,7 +73,7 @@ public:
virtual void undo () = 0; virtual void undo () = 0;
virtual int set_state (const XMLNode&, int version) = 0; virtual int set_state (const XMLNode&, int version) = 0;
virtual XMLNode & get_state () = 0; virtual XMLNode & get_state () const = 0;
boost::shared_ptr<MidiModel> model() const { return _model; } boost::shared_ptr<MidiModel> model() const { return _model; }
@ -101,7 +101,7 @@ public:
void undo (); void undo ();
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
XMLNode & get_state (); XMLNode & get_state () const;
void add (const NotePtr note); void add (const NotePtr note);
void remove (const NotePtr note); void remove (const NotePtr note);
@ -149,10 +149,10 @@ public:
std::set<NotePtr> side_effect_removals; std::set<NotePtr> side_effect_removals;
XMLNode &marshal_change(const NoteChange&); XMLNode &marshal_change(const NoteChange&) const;
NoteChange unmarshal_change(XMLNode *xml_note); NoteChange unmarshal_change(XMLNode *xml_note);
XMLNode &marshal_note(const NotePtr note); XMLNode &marshal_note(const NotePtr note) const;
NotePtr unmarshal_note(XMLNode *xml_note); NotePtr unmarshal_note(XMLNode *xml_note);
}; };
@ -166,7 +166,7 @@ public:
}; };
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
XMLNode & get_state (); XMLNode & get_state () const;
void remove (SysExPtr sysex); void remove (SysExPtr sysex);
void operator() (); void operator() ();
@ -189,7 +189,7 @@ public:
std::list<SysExPtr> _removed; std::list<SysExPtr> _removed;
XMLNode & marshal_change (const Change &); XMLNode & marshal_change (const Change &) const;
Change unmarshal_change (XMLNode *); Change unmarshal_change (XMLNode *);
}; };
@ -199,7 +199,7 @@ public:
PatchChangeDiffCommand (boost::shared_ptr<MidiModel>, const XMLNode &); PatchChangeDiffCommand (boost::shared_ptr<MidiModel>, const XMLNode &);
int set_state (const XMLNode &, int version); int set_state (const XMLNode &, int version);
XMLNode & get_state (); XMLNode & get_state () const;
void operator() (); void operator() ();
void undo (); void undo ();
@ -245,10 +245,10 @@ public:
std::list<PatchChangePtr> _added; std::list<PatchChangePtr> _added;
std::list<PatchChangePtr> _removed; std::list<PatchChangePtr> _removed;
XMLNode & marshal_change (const Change &); XMLNode & marshal_change (const Change &) const;
Change unmarshal_change (XMLNode *); Change unmarshal_change (XMLNode *);
XMLNode & marshal_patch_change (constPatchChangePtr); XMLNode & marshal_patch_change (constPatchChangePtr) const;
PatchChangePtr unmarshal_patch_change (XMLNode *); PatchChangePtr unmarshal_patch_change (XMLNode *);
}; };
@ -294,7 +294,7 @@ public:
// MidiModel doesn't use the normal AutomationList serialisation code // MidiModel doesn't use the normal AutomationList serialisation code
// since controller data is stored in the .mid // since controller data is stored in the .mid
XMLNode& get_state(); XMLNode& get_state() const;
int set_state(const XMLNode&) { return 0; } int set_state(const XMLNode&) { return 0; }
PBD::Signal0<void> ContentsChanged; PBD::Signal0<void> ContentsChanged;

View file

@ -82,7 +82,7 @@ class LIBARDOUR_API MidiRegion : public Region
uint32_t chan_n = 0, uint32_t chan_n = 0,
NoteMode mode = Sustained) const; NoteMode mode = Sustained) const;
XMLNode& state (); XMLNode& state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
int separate_by_channel (std::vector< boost::shared_ptr<Region> >&) const; int separate_by_channel (std::vector< boost::shared_ptr<Region> >&) const;

View file

@ -49,7 +49,7 @@ class MIDISceneChange : public SceneChange
size_t get_bank_lsb_message (uint8_t* buf, size_t size) const; size_t get_bank_lsb_message (uint8_t* buf, size_t size) const;
size_t get_program_message (uint8_t* buf, size_t size) const; size_t get_program_message (uint8_t* buf, size_t size) const;
XMLNode& get_state(); XMLNode& get_state() const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
bool operator==(const MIDISceneChange& other) const; bool operator==(const MIDISceneChange& other) const;

View file

@ -163,7 +163,7 @@ class LIBARDOUR_API MidiSource : virtual public Source
virtual void session_saved(); virtual void session_saved();
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
bool length_mutable() const { return true; } bool length_mutable() const { return true; }

View file

@ -146,7 +146,7 @@ public:
protected: protected:
XMLNode& state (bool save_template); XMLNode& state (bool save_template) const;
void act_on_mute (); void act_on_mute ();
void monitoring_changed (bool, PBD::Controllable::GroupControlDisposition); void monitoring_changed (bool, PBD::Controllable::GroupControlDisposition);

View file

@ -43,7 +43,7 @@ class LIBARDOUR_API MonitorControl : public SlavableAutomationControl
MonitorState monitoring_state () const { return _monitorable.monitoring_state(); } MonitorState monitoring_state () const { return _monitorable.monitoring_state(); }
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
protected: protected:
void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override); void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override);

View file

@ -129,7 +129,7 @@ public:
void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/); void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/);
XMLNode& state (); XMLNode& state () const;
int set_state (const XMLNode&, int /* version */); int set_state (const XMLNode&, int /* version */);
bool configure_io (ChanCount in, ChanCount out); bool configure_io (ChanCount in, ChanCount out);

View file

@ -34,7 +34,7 @@ public:
void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool); void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool);
protected: protected:
XMLNode& state (); XMLNode& state () const;
uint32_t _nch; uint32_t _nch;
gain_t _gain; gain_t _gain;

View file

@ -77,7 +77,7 @@ public:
PBD::Signal0<void> MutePointChanged; PBD::Signal0<void> MutePointChanged;
XMLNode& get_state(); XMLNode& get_state() const;
int set_state(const XMLNode&, int version); int set_state(const XMLNode&, int version);
static const std::string xml_node_name; static const std::string xml_node_name;

View file

@ -72,13 +72,13 @@ public:
bool writing() const { return _auto_state == Write; } bool writing() const { return _auto_state == Write; }
bool touch_enabled() const { return _auto_state & (Touch | Latch); } bool touch_enabled() const { return _auto_state & (Touch | Latch); }
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
bool has_state() const { return _has_state; } bool has_state() const { return _has_state; }
protected: protected:
virtual XMLNode& state (); virtual XMLNode& state () const;
boost::weak_ptr<Panner> _panner; boost::weak_ptr<Panner> _panner;
AutoState _auto_state; AutoState _auto_state;

View file

@ -128,7 +128,7 @@ public:
pan_t** buffers); pan_t** buffers);
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
XMLNode& get_state (); XMLNode& get_state () const;
boost::shared_ptr<Pannable> pannable() const { return _pannable; } boost::shared_ptr<Pannable> pannable() const { return _pannable; }

View file

@ -62,7 +62,7 @@ public:
/// The fundamental Panner function /// The fundamental Panner function
void run (BufferSet& src, BufferSet& dest, samplepos_t start_sample, samplepos_t end_samples, pframes_t nframes); void run (BufferSet& src, BufferSet& dest, samplepos_t start_sample, samplepos_t end_samples, pframes_t nframes);
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
PBD::Signal0<void> PannableChanged; /* Pannable changed -- l*/ PBD::Signal0<void> PannableChanged; /* Pannable changed -- l*/

View file

@ -57,7 +57,7 @@ class LIBARDOUR_API PhaseControl : public AutomationControl
void resize (uint32_t); void resize (uint32_t);
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
protected: protected:
void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override); void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override);

View file

@ -241,7 +241,7 @@ public:
void foreach_region (boost::function<void(boost::shared_ptr<Region>)>); void foreach_region (boost::function<void(boost::shared_ptr<Region>)>);
XMLNode& get_state (); XMLNode& get_state () const;
virtual int set_state (const XMLNode&, int version); virtual int set_state (const XMLNode&, int version);
XMLNode& get_template (); XMLNode& get_template ();
@ -304,7 +304,7 @@ protected:
class RegionReadLock : public Glib::Threads::RWLock::ReaderLock class RegionReadLock : public Glib::Threads::RWLock::ReaderLock
{ {
public: public:
RegionReadLock (Playlist* pl) RegionReadLock (Playlist const * pl)
: Glib::Threads::RWLock::ReaderLock (pl->region_lock) : Glib::Threads::RWLock::ReaderLock (pl->region_lock)
{ {
} }
@ -424,7 +424,7 @@ protected:
virtual void remove_dependents (boost::shared_ptr<Region> /*region*/) {} virtual void remove_dependents (boost::shared_ptr<Region> /*region*/) {}
virtual void region_going_away (boost::weak_ptr<Region> /*region*/) {} virtual void region_going_away (boost::weak_ptr<Region> /*region*/) {}
virtual XMLNode& state (bool); virtual XMLNode& state (bool) const;
bool add_region_internal (boost::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist); bool add_region_internal (boost::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist);

View file

@ -52,7 +52,7 @@ protected:
timepos_t const & begin, timepos_t const & len, Source::Flag flags); timepos_t const & begin, timepos_t const & len, Source::Flag flags);
PlaylistSource (Session&, const XMLNode&); PlaylistSource (Session&, const XMLNode&);
void add_state (XMLNode&); void add_state (XMLNode&) const;
}; };
} /* namespace */ } /* namespace */

View file

@ -77,7 +77,7 @@ public:
Plugin (const Plugin&); Plugin (const Plugin&);
virtual ~Plugin (); virtual ~Plugin ();
XMLNode& get_state (); XMLNode& get_state () const;
virtual int set_state (const XMLNode&, int version); virtual int set_state (const XMLNode&, int version);
virtual void set_insert_id (PBD::ID id) {} virtual void set_insert_id (PBD::ID id) {}

View file

@ -211,7 +211,7 @@ public:
double get_value (void) const; double get_value (void) const;
void catch_up_with_external_value (double val); void catch_up_with_external_value (double val);
XMLNode& get_state(); XMLNode& get_state() const;
std::string get_user_string() const; std::string get_user_string() const;
private: private:
@ -228,7 +228,7 @@ public:
boost::shared_ptr<AutomationList> list=boost::shared_ptr<AutomationList>()); boost::shared_ptr<AutomationList> list=boost::shared_ptr<AutomationList>());
double get_value (void) const; double get_value (void) const;
XMLNode& get_state(); XMLNode& get_state() const;
protected: protected:
void actually_set_value (double value, PBD::Controllable::GroupControlDisposition); void actually_set_value (double value, PBD::Controllable::GroupControlDisposition);
@ -316,7 +316,7 @@ public:
}; };
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
/* disallow copy construction */ /* disallow copy construction */

View file

@ -41,7 +41,7 @@ public:
} }
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
boost::shared_ptr<PhaseControl> _control; boost::shared_ptr<PhaseControl> _control;

View file

@ -150,7 +150,7 @@ public:
_global_port_buffer_offset += n; _global_port_buffer_offset += n;
} }
virtual XMLNode& get_state (void) const; virtual XMLNode& get_state () const;
virtual int set_state (const XMLNode&, int version); virtual int set_state (const XMLNode&, int version);
static std::string state_node_name; static std::string state_node_name;

View file

@ -81,7 +81,7 @@ public:
static std::string name_and_id_new_insert (Session&, uint32_t&); static std::string name_and_id_new_insert (Session&, uint32_t&);
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
/* disallow copy construction */ /* disallow copy construction */
PortInsert (const PortInsert&); PortInsert (const PortInsert&);

View file

@ -235,7 +235,7 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful
} }
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
bool operator==(PresentationInfo const& other) { bool operator==(PresentationInfo const& other) {
return (_order == other.order()) && (_flags == other.flags()); return (_order == other.order()) && (_flags == other.flags());

View file

@ -131,7 +131,7 @@ class LIBARDOUR_API Processor : public SessionObject, public Automatable, public
smoothly. smoothly.
*/ */
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
virtual void set_pre_fader (bool); virtual void set_pre_fader (bool);
@ -158,7 +158,7 @@ class LIBARDOUR_API Processor : public SessionObject, public Automatable, public
SessionObject* owner() const; SessionObject* owner() const;
protected: protected:
virtual XMLNode& state (); virtual XMLNode& state () const;
virtual int set_state_2X (const XMLNode&, int version); virtual int set_state_2X (const XMLNode&, int version);
bool check_active () { return (_active = _pending_active); } bool check_active () { return (_active = _pending_active); }

View file

@ -45,8 +45,8 @@ class LIBARDOUR_API RCConfiguration : public PBD::Configuration
void map_parameters (boost::function<void (std::string)>&); void map_parameters (boost::function<void (std::string)>&);
int set_state (XMLNode const &, int version); int set_state (XMLNode const &, int version);
XMLNode& get_state (); XMLNode& get_state () const;
XMLNode& get_variables (); XMLNode& get_variables () const;
void set_variables (XMLNode const &); void set_variables (XMLNode const &);
int load_state (); int load_state ();

View file

@ -345,7 +345,7 @@ public:
/* serialization */ /* serialization */
XMLNode& get_state (); XMLNode& get_state () const;
virtual int set_state (const XMLNode&, int version); virtual int set_state (const XMLNode&, int version);
virtual bool do_export (std::string const&) const = 0; virtual bool do_export (std::string const&) const = 0;
@ -422,7 +422,7 @@ public:
void rename_cue_marker (CueMarker&, std::string const &); void rename_cue_marker (CueMarker&, std::string const &);
protected: protected:
virtual XMLNode& state (); virtual XMLNode& state () const;
friend class RegionFactory; friend class RegionFactory;

View file

@ -61,7 +61,7 @@ public:
static std::string name_and_id_new_return (Session&, uint32_t&); static std::string name_and_id_new_return (Session&, uint32_t&);
protected: protected:
XMLNode& state(); XMLNode& state() const;
bool _metering; bool _metering;
boost::shared_ptr<GainControl> _gain_control; boost::shared_ptr<GainControl> _gain_control;

View file

@ -221,9 +221,9 @@ public:
void flush_processors (); void flush_processors ();
void foreach_processor (boost::function<void(boost::weak_ptr<Processor>)> method) { void foreach_processor (boost::function<void(boost::weak_ptr<Processor>)> method) const {
Glib::Threads::RWLock::ReaderLock lm (_processor_lock); Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
method (boost::weak_ptr<Processor> (*i)); method (boost::weak_ptr<Processor> (*i));
} }
} }
@ -413,7 +413,7 @@ public:
PBD::Signal0<void> io_changed; PBD::Signal0<void> io_changed;
/* stateful */ /* stateful */
XMLNode& get_state(); XMLNode& get_state() const;
XMLNode& get_template(); XMLNode& get_template();
virtual int set_state (const XMLNode&, int version); virtual int set_state (const XMLNode&, int version);
@ -692,7 +692,7 @@ protected:
virtual ChanCount input_streams () const; virtual ChanCount input_streams () const;
virtual XMLNode& state (bool save_template); virtual XMLNode& state (bool save_template) const;
int configure_processors (ProcessorStreams*); int configure_processors (ProcessorStreams*);

View file

@ -146,7 +146,7 @@ public:
/** Emitted when a route has been removed from this group */ /** Emitted when a route has been removed from this group */
PBD::Signal2<void, RouteGroup *, boost::weak_ptr<ARDOUR::Route> > RouteRemoved; PBD::Signal2<void, RouteGroup *, boost::weak_ptr<ARDOUR::Route> > RouteRemoved;
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);

View file

@ -63,7 +63,7 @@ public:
/* Replicate the API of PBD::Stateful without the overhead */ /* Replicate the API of PBD::Stateful without the overhead */
XMLNode& get_state (void) const; XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
private: private:

View file

@ -76,7 +76,7 @@ class LIBARDOUR_API CoreSelection : public PBD::Stateful {
void get_stripables (StripableAutomationControls&) const; void get_stripables (StripableAutomationControls&) const;
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
protected: protected:

View file

@ -114,7 +114,7 @@ public:
static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&, bool); static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&, bool);
protected: protected:
XMLNode& state (); XMLNode& state () const;
bool _metering; bool _metering;
boost::shared_ptr<GainControl> _gain_control; boost::shared_ptr<GainControl> _gain_control;

View file

@ -1601,7 +1601,7 @@ private:
PBD::ReallocPool _mempool; PBD::ReallocPool _mempool;
LuaState lua; LuaState lua;
Glib::Threads::Mutex lua_lock; mutable Glib::Threads::Mutex lua_lock;
luabridge::LuaRef * _lua_run; luabridge::LuaRef * _lua_run;
luabridge::LuaRef * _lua_add; luabridge::LuaRef * _lua_add;
luabridge::LuaRef * _lua_del; luabridge::LuaRef * _lua_del;
@ -2097,12 +2097,14 @@ private:
XMLNode& state (bool save_template, XMLNode& state (bool save_template,
snapshot_t snapshot_type = NormalSave, snapshot_t snapshot_type = NormalSave,
bool only_used_assets = false); bool only_used_assets = false) const;
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode& node, int version); // not idempotent int set_state (const XMLNode& node, int version); // not idempotent
XMLNode& get_template (); XMLNode& get_template ();
void maybe_copy_midifiles (snapshot_t, boost::shared_ptr<Source> src, XMLNode*);
/* click track */ /* click track */
typedef std::list<Click*> Clicks; typedef std::list<Click*> Clicks;
Clicks clicks; Clicks clicks;
@ -2180,7 +2182,7 @@ private:
void config_changed (std::string, bool); void config_changed (std::string, bool);
XMLNode& get_control_protocol_state (); XMLNode& get_control_protocol_state () const;
void set_history_depth (uint32_t depth); void set_history_depth (uint32_t depth);
@ -2329,7 +2331,7 @@ private:
int tb_with_filled_slots; int tb_with_filled_slots;
void handle_slots_empty_status (boost::weak_ptr<Route> const &); void handle_slots_empty_status (boost::weak_ptr<Route> const &);
}; };
} // namespace ARDOUR } // namespace ARDOUR

View file

@ -32,8 +32,8 @@ public:
void map_parameters (boost::function<void (std::string)>&); void map_parameters (boost::function<void (std::string)>&);
int set_state (XMLNode const &, int version); int set_state (XMLNode const &, int version);
XMLNode& get_state (); XMLNode& get_state () const;
XMLNode& get_variables (); XMLNode& get_variables () const;
void set_variables (XMLNode const &); void set_variables (XMLNode const &);
bool load_state (); bool load_state ();

View file

@ -138,8 +138,8 @@ class LIBARDOUR_API SessionMetadata : public PBD::StatefulDestructible
void av_export_tag (MetaDataMap&) const; void av_export_tag (MetaDataMap&) const;
/*** Serialization ***/ /*** Serialization ***/
XMLNode & get_state (); //serializes stuff in the map, to be stored in session file XMLNode& get_state () const; //serializes stuff in the map, to be stored in session file
XMLNode & get_user_state (); //serializes stuff in the user_map, to be stored in user's config file XMLNode& get_user_state (); //serializes stuff in the user_map, to be stored in user's config file
int set_state (const XMLNode &, int version_num); int set_state (const XMLNode &, int version_num);
private: private:
@ -151,7 +151,7 @@ class LIBARDOUR_API SessionMetadata : public PBD::StatefulDestructible
PropertyMap map; PropertyMap map;
PropertyMap user_map; PropertyMap user_map;
XMLNode * get_xml (const std::string & name); XMLNode * get_xml (const std::string & name) const;
std::string get_value (const std::string & name) const; std::string get_value (const std::string & name) const;
uint32_t get_uint_value (const std::string & name) const; uint32_t get_uint_value (const std::string & name) const;

View file

@ -81,7 +81,7 @@ private:
void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result); void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result);
void update_after_tempo_map_change (); void update_after_tempo_map_change ();
void add_state (XMLNode*, bool save_template, bool include_unused); void add_state (XMLNode*, bool save_template, bool include_unused) const;
bool maybe_delete_unused (boost::function<int(boost::shared_ptr<Playlist>)>); bool maybe_delete_unused (boost::function<int(boost::shared_ptr<Playlist>)>);
int load (Session &, const XMLNode&); int load (Session &, const XMLNode&);
int load_unused (Session &, const XMLNode&); int load_unused (Session &, const XMLNode&);

View file

@ -41,7 +41,7 @@ public:
int set_state(const XMLNode&, int version); int set_state(const XMLNode&, int version);
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
/* disallow copy construction */ /* disallow copy construction */

View file

@ -74,7 +74,7 @@ public:
void use_saved_master_ratios (); void use_saved_master_ratios ();
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state(); XMLNode& get_state() const;
bool find_next_event (Temporal::timepos_t const & n, Temporal::timepos_t const & e, Evoral::ControlEvent& ev) const bool find_next_event (Temporal::timepos_t const & n, Temporal::timepos_t const & e, Evoral::ControlEvent& ev) const
{ {

View file

@ -64,7 +64,7 @@ public:
Evoral::Sequence<Temporal::Beats>::StuckNoteOption, Evoral::Sequence<Temporal::Beats>::StuckNoteOption,
Temporal::Beats when = Temporal::Beats()); Temporal::Beats when = Temporal::Beats());
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
void load_model (const WriterLock& lock, bool force_reload=false); void load_model (const WriterLock& lock, bool force_reload=false);

View file

@ -94,7 +94,7 @@ class LIBARDOUR_API SoloControl : public SlavableAutomationControl
void clear_all_solo_state (); void clear_all_solo_state ();
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
protected: protected:
void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override); void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override);

View file

@ -70,7 +70,7 @@ class LIBARDOUR_API SoloIsolateControl : public SlavableAutomationControl
bool solo_isolated() const { return self_solo_isolated() || solo_isolated_by_upstream(); } bool solo_isolated() const { return self_solo_isolated() || solo_isolated_by_upstream(); }
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
protected: protected:
void master_changed (bool from_self, PBD::Controllable::GroupControlDisposition gcd, boost::weak_ptr<AutomationControl>); void master_changed (bool from_self, PBD::Controllable::GroupControlDisposition gcd, boost::weak_ptr<AutomationControl>);

View file

@ -41,7 +41,7 @@ class LIBARDOUR_API SoloSafeControl : public SlavableAutomationControl
bool solo_safe() const { return _solo_safe; } bool solo_safe() const { return _solo_safe; }
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
protected: protected:
void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override); void actually_set_value (double, PBD::Controllable::GroupControlDisposition group_override);

View file

@ -91,7 +91,7 @@ public:
virtual void session_saved() {} virtual void session_saved() {}
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (XMLNode const &, int version); int set_state (XMLNode const &, int version);
bool writable () const; bool writable () const;

View file

@ -52,7 +52,7 @@ public:
void dump_speakers (std::ostream&); void dump_speakers (std::ostream&);
XMLNode& get_state (); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
PBD::Signal0<void> Changed; PBD::Signal0<void> Changed;

View file

@ -115,7 +115,7 @@ class Step : public PBD::Stateful {
int octave_shift() const { return _octave_shift; } int octave_shift() const { return _octave_shift; }
void set_octave_shift (int); void set_octave_shift (int);
XMLNode& get_state(); XMLNode& get_state() const;
int set_state (XMLNode const &, int); int set_state (XMLNode const &, int);
void dump (MusicTimeEvents&, Temporal::Beats const&) const; void dump (MusicTimeEvents&, Temporal::Beats const&) const;
@ -208,7 +208,7 @@ class StepSequence : public PBD::Stateful
StepSequencer& sequencer() const { return _sequencer; } StepSequencer& sequencer() const { return _sequencer; }
XMLNode& get_state(); XMLNode& get_state() const;
int set_state (XMLNode const &, int); int set_state (XMLNode const &, int);
void dump (MusicTimeEvents&, Temporal::Beats const &) const; void dump (MusicTimeEvents&, Temporal::Beats const &) const;
@ -257,7 +257,7 @@ class StepSequencer : public PBD::Stateful
TempoMap& tempo_map() const { return _tempo_map; } TempoMap& tempo_map() const { return _tempo_map; }
XMLNode& get_state(); XMLNode& get_state() const;
int set_state (XMLNode const &, int); int set_state (XMLNode const &, int);
void queue_note_off (Temporal::Beats const &, uint8_t note, uint8_t velocity, uint8_t channel); void queue_note_off (Temporal::Beats const &, uint8_t note, uint8_t velocity, uint8_t channel);

View file

@ -184,7 +184,7 @@ public:
PBD::Signal0<void> ChanCountChanged; PBD::Signal0<void> ChanCountChanged;
protected: protected:
XMLNode& state (bool save_template); XMLNode& state (bool save_template) const;
boost::shared_ptr<Playlist> _playlists[DataType::num_types]; boost::shared_ptr<Playlist> _playlists[DataType::num_types];

View file

@ -355,7 +355,7 @@ public:
void set_name (std::string const&); void set_name (std::string const&);
int set_state (XMLNode const&, int); int set_state (XMLNode const&, int);
XMLNode& get_state (); XMLNode& get_state () const;
static const std::string state_node_name; static const std::string state_node_name;
static void make_property_quarks (); static void make_property_quarks ();
@ -435,7 +435,7 @@ protected:
boost::shared_ptr<Port> _port; boost::shared_ptr<Port> _port;
XMLNode port_node; mutable XMLNode port_node;
virtual void connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1, boost::weak_ptr<ARDOUR::Port>, std::string name2, bool yn); virtual void connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1, boost::weak_ptr<ARDOUR::Port>, std::string name2, bool yn);

View file

@ -70,7 +70,7 @@ class LIBARDOUR_API TransportMasterManager : public boost::noncopyable
PBD::Signal2<void,boost::shared_ptr<TransportMaster>, boost::shared_ptr<TransportMaster> > CurrentChanged; PBD::Signal2<void,boost::shared_ptr<TransportMaster>, boost::shared_ptr<TransportMaster> > CurrentChanged;
int set_state (XMLNode const &, int); int set_state (XMLNode const &, int);
XMLNode& get_state(); XMLNode& get_state() const;
void set_session (Session*); void set_session (Session*);
Session* session() const { return _session; } Session* session() const { return _session; }

View file

@ -317,7 +317,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
samplepos_t transition_samples; samplepos_t transition_samples;
Temporal::Beats transition_beats; Temporal::Beats transition_beats;
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
void maybe_compute_next_transition (samplepos_t start_sample, Temporal::Beats const & start, Temporal::Beats const & end, pframes_t& nframes, pframes_t& dest_offset); void maybe_compute_next_transition (samplepos_t start_sample, Temporal::Beats const & start, Temporal::Beats const & end, pframes_t& nframes, pframes_t& dest_offset);
@ -503,7 +503,7 @@ class LIBARDOUR_API AudioTrigger : public Trigger {
void jump_start (); void jump_start ();
void jump_stop (BufferSet& bufs, pframes_t dest_offset); void jump_stop (BufferSet& bufs, pframes_t dest_offset);
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
RubberBand::RubberBandStretcher* stretcher() { return (_stretcher); } RubberBand::RubberBandStretcher* stretcher() { return (_stretcher); }
@ -579,7 +579,7 @@ class LIBARDOUR_API MIDITrigger : public Trigger {
void shutdown (BufferSet& bufs, pframes_t dest_offset); void shutdown (BufferSet& bufs, pframes_t dest_offset);
void jump_stop (BufferSet& bufs, pframes_t dest_offset); void jump_stop (BufferSet& bufs, pframes_t dest_offset);
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
SegmentDescriptor get_segment_descriptor () const; SegmentDescriptor get_segment_descriptor () const;
@ -726,7 +726,7 @@ class LIBARDOUR_API TriggerBox : public Processor
void set_pending (uint32_t slot, Trigger*); void set_pending (uint32_t slot, Trigger*);
XMLNode& get_state (void); XMLNode& get_state () const;
int set_state (const XMLNode&, int version); int set_state (const XMLNode&, int version);
void set_from_path (uint32_t slot, std::string const & path); void set_from_path (uint32_t slot, std::string const & path);
@ -813,7 +813,7 @@ class LIBARDOUR_API TriggerBox : public Processor
DataType _data_type; DataType _data_type;
int32_t _order; int32_t _order;
Glib::Threads::RWLock trigger_lock; /* protects all_triggers */ mutable Glib::Threads::RWLock trigger_lock; /* protects all_triggers */
Triggers all_triggers; Triggers all_triggers;
typedef std::vector<Trigger*> PendingTriggers; typedef std::vector<Trigger*> PendingTriggers;

View file

@ -52,7 +52,7 @@ public:
void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/); void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/);
protected: protected:
XMLNode& state (); XMLNode& state () const;
private: private:
XMLNode _state; XMLNode _state;

View file

@ -35,7 +35,7 @@ class LIBARDOUR_API UserBundle : public Bundle, public PBD::Stateful {
UserBundle (std::string const &); UserBundle (std::string const &);
UserBundle (XMLNode const &, bool); UserBundle (XMLNode const &, bool);
XMLNode& get_state (); XMLNode& get_state () const;
private: private:
int set_state (XMLNode const &, int version); int set_state (XMLNode const &, int version);

View file

@ -59,7 +59,7 @@ class LIBARDOUR_API VCA : public Stripable,
std::string full_name() const; std::string full_name() const;
int init (); int init ();
XMLNode& get_state(); XMLNode& get_state() const;
int set_state (XMLNode const&, int version); int set_state (XMLNode const&, int version);
PBD::Signal0<void> Drop; /* signal to slaves to drop control by this VCA */ PBD::Signal0<void> Drop; /* signal to slaves to drop control by this VCA */

View file

@ -56,7 +56,7 @@ public:
PBD::Signal1<void,VCAList&> VCAAdded; PBD::Signal1<void,VCAList&> VCAAdded;
PBD::Signal0<void> VCACreated; /*<< is not emitted during set_state */ PBD::Signal0<void> VCACreated; /*<< is not emitted during set_state */
XMLNode& get_state(); XMLNode& get_state() const;
int set_state (XMLNode const&, int version); int set_state (XMLNode const&, int version);
bool vcas_loaded() const { return _vcas_loaded; } bool vcas_loaded() const { return _vcas_loaded; }

View file

@ -78,7 +78,7 @@ AudioPlaylistSource::~AudioPlaylistSource ()
} }
XMLNode& XMLNode&
AudioPlaylistSource::get_state () AudioPlaylistSource::get_state () const
{ {
XMLNode& node (AudioSource::get_state ()); XMLNode& node (AudioSource::get_state ());

View file

@ -100,7 +100,7 @@ AudioTrack::set_state (const XMLNode& node, int version)
} }
XMLNode& XMLNode&
AudioTrack::state (bool save_template) AudioTrack::state (bool save_template) const
{ {
XMLNode& root (Track::state (save_template)); XMLNode& root (Track::state (save_template));
XMLNode* freeze_node; XMLNode* freeze_node;
@ -113,7 +113,7 @@ AudioTrack::state (bool save_template)
freeze_node->set_property ("playlist-id", _freeze_record.playlist->id().to_s ()); freeze_node->set_property ("playlist-id", _freeze_record.playlist->id().to_s ());
freeze_node->set_property ("state", _freeze_record.state); freeze_node->set_property ("state", _freeze_record.state);
for (vector<FreezeRecordProcessorInfo*>::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) { for (vector<FreezeRecordProcessorInfo*>::const_iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) {
inode = new XMLNode (X_("processor")); inode = new XMLNode (X_("processor"));
inode->set_property (X_ ("id"), (*i)->id.to_s ()); inode->set_property (X_ ("id"), (*i)->id.to_s ());
inode->add_child_copy ((*i)->state); inode->add_child_copy ((*i)->state);

View file

@ -221,7 +221,7 @@ AudioFileSource::get_soundfile_info (const string& path, SoundFileInfo& _info, s
} }
XMLNode& XMLNode&
AudioFileSource::get_state () AudioFileSource::get_state () const
{ {
XMLNode& root (AudioSource::get_state()); XMLNode& root (AudioSource::get_state());
root.set_property (X_("channel"), _channel); root.set_property (X_("channel"), _channel);

View file

@ -789,7 +789,7 @@ AudioRegion::read_from_sources (SourceList const & srcs, samplecnt_t limit, Samp
} }
XMLNode& XMLNode&
AudioRegion::get_basic_state () AudioRegion::get_basic_state () const
{ {
XMLNode& node (Region::state ()); XMLNode& node (Region::state ());
@ -799,7 +799,7 @@ AudioRegion::get_basic_state ()
} }
XMLNode& XMLNode&
AudioRegion::state () AudioRegion::state () const
{ {
XMLNode& node (get_basic_state()); XMLNode& node (get_basic_state());
XMLNode *child; XMLNode *child;

View file

@ -131,7 +131,7 @@ AudioSource::~AudioSource ()
} }
XMLNode& XMLNode&
AudioSource::get_state () AudioSource::get_state () const
{ {
XMLNode& node (Source::get_state()); XMLNode& node (Source::get_state());

View file

@ -308,7 +308,7 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le
} }
XMLNode& XMLNode&
Automatable::get_automation_xml_state () Automatable::get_automation_xml_state () const
{ {
Glib::Threads::Mutex::Lock lm (control_lock()); Glib::Threads::Mutex::Lock lm (control_lock());
XMLNode* node = new XMLNode (Automatable::xml_node_name); XMLNode* node = new XMLNode (Automatable::xml_node_name);
@ -317,7 +317,7 @@ Automatable::get_automation_xml_state ()
return *node; return *node;
} }
for (Controls::iterator li = controls().begin(); li != controls().end(); ++li) { for (Controls::const_iterator li = controls().begin(); li != controls().end(); ++li) {
boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(li->second->list()); boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(li->second->list());
if (l) { if (l) {
node->add_child_nocopy (l->get_state ()); node->add_child_nocopy (l->get_state ());

View file

@ -323,13 +323,13 @@ AutomationList::memento_command (XMLNode* before, XMLNode* after)
} }
XMLNode& XMLNode&
AutomationList::get_state () AutomationList::get_state () const
{ {
return state (true, true); return state (true, true);
} }
XMLNode& XMLNode&
AutomationList::state (bool save_auto_state, bool need_lock) AutomationList::state (bool save_auto_state, bool need_lock) const
{ {
XMLNode* root = new XMLNode (X_("AutomationList")); XMLNode* root = new XMLNode (X_("AutomationList"));
@ -364,7 +364,7 @@ AutomationList::state (bool save_auto_state, bool need_lock)
} }
XMLNode& XMLNode&
AutomationList::serialize_events (bool need_lock) AutomationList::serialize_events (bool need_lock) const
{ {
XMLNode* node = new XMLNode (X_("events")); XMLNode* node = new XMLNode (X_("events"));
stringstream str; stringstream str;
@ -373,7 +373,7 @@ AutomationList::serialize_events (bool need_lock)
if (need_lock) { if (need_lock) {
lm.acquire (); lm.acquire ();
} }
for (iterator xx = _events.begin(); xx != _events.end(); ++xx) { for (const_iterator xx = _events.begin(); xx != _events.end(); ++xx) {
str << PBD::to_string ((*xx)->when); str << PBD::to_string ((*xx)->when);
str << ' '; str << ' ';
str << PBD::to_string ((*xx)->value); str << PBD::to_string ((*xx)->value);

View file

@ -78,13 +78,13 @@ BeatBox::can_support_io_configuration (const ChanCount& in, ChanCount& out)
} }
XMLNode& XMLNode&
BeatBox::get_state(void) BeatBox::get_state () const
{ {
return state (); return state ();
} }
XMLNode& XMLNode&
BeatBox::state() BeatBox::state() const
{ {
XMLNode& node = Processor::state(); XMLNode& node = Processor::state();
node.set_property ("type", "beatbox"); node.set_property ("type", "beatbox");

View file

@ -84,7 +84,7 @@ CapturingProcessor::realloc_buffers()
} }
XMLNode & XMLNode &
CapturingProcessor::state () CapturingProcessor::state () const
{ {
XMLNode& node = Processor::state (); XMLNode& node = Processor::state ();

View file

@ -527,12 +527,12 @@ ControlProtocolManager::set_state (const XMLNode& node, int session_specific_sta
} }
XMLNode& XMLNode&
ControlProtocolManager::get_state () ControlProtocolManager::get_state () const
{ {
XMLNode* root = new XMLNode (state_node_name); XMLNode* root = new XMLNode (state_node_name);
Glib::Threads::RWLock::ReaderLock lm (protocols_lock); Glib::Threads::RWLock::ReaderLock lm (protocols_lock);
for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { for (list<ControlProtocolInfo*>::const_iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) {
if ((*i)->protocol) { if ((*i)->protocol) {
XMLNode& child_state ((*i)->protocol->get_state()); XMLNode& child_state ((*i)->protocol->get_state());

View file

@ -432,7 +432,7 @@ DelayLine::flush ()
} }
XMLNode& XMLNode&
DelayLine::state () DelayLine::state () const
{ {
XMLNode& node (Processor::state ()); XMLNode& node (Processor::state ());
node.set_property ("type", "delay"); node.set_property ("type", "delay");

View file

@ -356,7 +356,7 @@ Delivery::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample
} }
XMLNode& XMLNode&
Delivery::state () Delivery::state () const
{ {
XMLNode& node (IOProcessor::state ()); XMLNode& node (IOProcessor::state ());

View file

@ -166,7 +166,7 @@ DiskReader::set_name (string const& str)
} }
XMLNode& XMLNode&
DiskReader::state () DiskReader::state () const
{ {
XMLNode& node (DiskIOProcessor::state ()); XMLNode& node (DiskIOProcessor::state ());
node.set_property (X_("type"), X_("diskreader")); node.set_property (X_("type"), X_("diskreader"));

View file

@ -367,7 +367,7 @@ DiskWriter::set_align_style (AlignStyle a, bool force)
} }
XMLNode& XMLNode&
DiskWriter::state () DiskWriter::state () const
{ {
XMLNode& node (DiskIOProcessor::state ()); XMLNode& node (DiskIOProcessor::state ());
node.set_property (X_("type"), X_("diskwriter")); node.set_property (X_("type"), X_("diskwriter"));

View file

@ -40,7 +40,7 @@ ExportChannelConfiguration::ExportChannelConfiguration (Session & session)
} }
XMLNode & XMLNode &
ExportChannelConfiguration::get_state () ExportChannelConfiguration::get_state () const
{ {
XMLNode * root = new XMLNode ("ExportChannelConfiguration"); XMLNode * root = new XMLNode ("ExportChannelConfiguration");
XMLNode * channel; XMLNode * channel;

View file

@ -83,7 +83,7 @@ ExportFilename::ExportFilename (Session & session) :
} }
XMLNode & XMLNode &
ExportFilename::get_state () ExportFilename::get_state () const
{ {
XMLNode * node = new XMLNode ("ExportFilename"); XMLNode * node = new XMLNode ("ExportFilename");
XMLNode * child; XMLNode * child;
@ -399,7 +399,7 @@ ExportFilename::get_field (XMLNode const & node, string const & name)
} }
ExportFilename::FieldPair ExportFilename::FieldPair
ExportFilename::analyse_folder () ExportFilename::analyse_folder () const
{ {
FieldPair pair; FieldPair pair;

View file

@ -68,7 +68,7 @@ ExportFormatSpecification::Time::get_samples_at (samplepos_t position, samplecnt
} }
XMLNode & XMLNode &
ExportFormatSpecification::Time::get_state () ExportFormatSpecification::Time::get_state () const
{ {
XMLNode * node = new XMLNode ("Duration"); XMLNode * node = new XMLNode ("Duration");
@ -274,7 +274,7 @@ ExportFormatSpecification::~ExportFormatSpecification ()
} }
XMLNode & XMLNode &
ExportFormatSpecification::get_state () ExportFormatSpecification::get_state () const
{ {
XMLNode * node; XMLNode * node;
XMLNode * root = new XMLNode ("ExportFormatSpecification"); XMLNode * root = new XMLNode ("ExportFormatSpecification");

View file

@ -80,7 +80,7 @@ InternalReturn::set_playback_offset (samplecnt_t cnt)
} }
XMLNode& XMLNode&
InternalReturn::state () InternalReturn::state () const
{ {
XMLNode& node (Processor::state ()); XMLNode& node (Processor::state ());
/* override type */ /* override type */

View file

@ -380,7 +380,7 @@ InternalSend::feeds (boost::shared_ptr<Route> other) const
} }
XMLNode& XMLNode&
InternalSend::state () InternalSend::state () const
{ {
XMLNode& node (Send::state ()); XMLNode& node (Send::state ());

View file

@ -519,13 +519,13 @@ IO::ensure_io (ChanCount count, bool clear, void* src)
} }
XMLNode& XMLNode&
IO::get_state () IO::get_state () const
{ {
return state (); return state ();
} }
XMLNode& XMLNode&
IO::state () IO::state () const
{ {
XMLNode* node = new XMLNode (state_node_name); XMLNode* node = new XMLNode (state_node_name);
int n; int n;
@ -540,7 +540,7 @@ IO::state ()
node->set_property("pretty-name", _pretty_name_prefix); node->set_property("pretty-name", _pretty_name_prefix);
} }
for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) { for (PortSet::const_iterator i = _ports.begin(); i != _ports.end(); ++i) {
vector<string> connections; vector<string> connections;

View file

@ -116,7 +116,7 @@ IOProcessor::set_output (boost::shared_ptr<IO> io)
} }
XMLNode& XMLNode&
IOProcessor::state () IOProcessor::state () const
{ {
XMLNode& node (Processor::state ()); XMLNode& node (Processor::state ());

View file

@ -554,7 +554,7 @@ Location::cd_info_node(const string & name, const string & value)
XMLNode& XMLNode&
Location::get_state () Location::get_state () const
{ {
XMLNode *node = new XMLNode ("Location"); XMLNode *node = new XMLNode ("Location");
@ -1105,14 +1105,13 @@ Locations::remove (Location *loc)
} }
XMLNode& XMLNode&
Locations::get_state () Locations::get_state () const
{ {
XMLNode *node = new XMLNode ("Locations"); XMLNode *node = new XMLNode ("Locations");
LocationList::iterator iter;
Glib::Threads::RWLock::ReaderLock lm (_lock); Glib::Threads::RWLock::ReaderLock lm (_lock);
for (iter = locations.begin(); iter != locations.end(); ++iter) { for (auto const & l : locations) {
node->add_child_nocopy ((*iter)->get_state ()); node->add_child_nocopy (l->get_state ());
} }
return *node; return *node;

View file

@ -461,7 +461,7 @@ PeakMeter::set_meter_type (MeterType t)
} }
XMLNode& XMLNode&
PeakMeter::state () PeakMeter::state () const
{ {
XMLNode& node (Processor::state ()); XMLNode& node (Processor::state ());
node.set_property ("type", "meter"); node.set_property ("type", "meter");

View file

@ -437,7 +437,7 @@ MidiModel::NoteDiffCommand::undo ()
} }
XMLNode& XMLNode&
MidiModel::NoteDiffCommand::marshal_note(const NotePtr note) MidiModel::NoteDiffCommand::marshal_note(const NotePtr note) const
{ {
XMLNode* xml_note = new XMLNode("note"); XMLNode* xml_note = new XMLNode("note");
@ -491,7 +491,7 @@ MidiModel::NoteDiffCommand::unmarshal_note (XMLNode *xml_note)
} }
XMLNode& XMLNode&
MidiModel::NoteDiffCommand::marshal_change (const NoteChange& change) MidiModel::NoteDiffCommand::marshal_change (const NoteChange& change) const
{ {
XMLNode* xml_change = new XMLNode("Change"); XMLNode* xml_change = new XMLNode("Change");
@ -635,25 +635,25 @@ MidiModel::NoteDiffCommand::set_state (const XMLNode& diff_command, int /*versio
} }
XMLNode& XMLNode&
MidiModel::NoteDiffCommand::get_state () MidiModel::NoteDiffCommand::get_state () const
{ {
XMLNode* diff_command = new XMLNode (NOTE_DIFF_COMMAND_ELEMENT); XMLNode* diff_command = new XMLNode (NOTE_DIFF_COMMAND_ELEMENT);
diff_command->set_property("midi-source", _model->midi_source().id().to_s()); diff_command->set_property("midi-source", _model->midi_source().id().to_s());
XMLNode* changes = diff_command->add_child(DIFF_NOTES_ELEMENT); XMLNode* changes = diff_command->add_child(DIFF_NOTES_ELEMENT);
for_each(_changes.begin(), _changes.end(), for_each(_changes.cbegin(), _changes.cend(),
boost::bind ( boost::bind (
boost::bind (&XMLNode::add_child_nocopy, changes, _1), boost::bind (&XMLNode::add_child_nocopy, changes, _1),
boost::bind (&NoteDiffCommand::marshal_change, this, _1))); boost::bind (&NoteDiffCommand::marshal_change, this, _1)));
XMLNode* added_notes = diff_command->add_child(ADDED_NOTES_ELEMENT); XMLNode* added_notes = diff_command->add_child(ADDED_NOTES_ELEMENT);
for_each(_added_notes.begin(), _added_notes.end(), for_each(_added_notes.cbegin(), _added_notes.cend(),
boost::bind( boost::bind(
boost::bind (&XMLNode::add_child_nocopy, added_notes, _1), boost::bind (&XMLNode::add_child_nocopy, added_notes, _1),
boost::bind (&NoteDiffCommand::marshal_note, this, _1))); boost::bind (&NoteDiffCommand::marshal_note, this, _1)));
XMLNode* removed_notes = diff_command->add_child(REMOVED_NOTES_ELEMENT); XMLNode* removed_notes = diff_command->add_child(REMOVED_NOTES_ELEMENT);
for_each(_removed_notes.begin(), _removed_notes.end(), for_each(_removed_notes.cbegin(), _removed_notes.cend(),
boost::bind ( boost::bind (
boost::bind (&XMLNode::add_child_nocopy, removed_notes, _1), boost::bind (&XMLNode::add_child_nocopy, removed_notes, _1),
boost::bind (&NoteDiffCommand::marshal_note, this, _1))); boost::bind (&NoteDiffCommand::marshal_note, this, _1)));
@ -761,7 +761,7 @@ MidiModel::SysExDiffCommand::remove (SysExPtr sysex)
} }
XMLNode& XMLNode&
MidiModel::SysExDiffCommand::marshal_change (const Change& change) MidiModel::SysExDiffCommand::marshal_change (const Change& change) const
{ {
XMLNode* xml_change = new XMLNode ("Change"); XMLNode* xml_change = new XMLNode ("Change");
@ -835,7 +835,7 @@ MidiModel::SysExDiffCommand::set_state (const XMLNode& diff_command, int /*versi
} }
XMLNode& XMLNode&
MidiModel::SysExDiffCommand::get_state () MidiModel::SysExDiffCommand::get_state () const
{ {
XMLNode* diff_command = new XMLNode (SYSEX_DIFF_COMMAND_ELEMENT); XMLNode* diff_command = new XMLNode (SYSEX_DIFF_COMMAND_ELEMENT);
diff_command->set_property ("midi-source", _model->midi_source().id().to_s()); diff_command->set_property ("midi-source", _model->midi_source().id().to_s());
@ -1040,7 +1040,7 @@ MidiModel::PatchChangeDiffCommand::undo ()
} }
XMLNode & XMLNode &
MidiModel::PatchChangeDiffCommand::marshal_patch_change (constPatchChangePtr p) MidiModel::PatchChangeDiffCommand::marshal_patch_change (constPatchChangePtr p) const
{ {
XMLNode* n = new XMLNode ("patch-change"); XMLNode* n = new XMLNode ("patch-change");
@ -1054,7 +1054,7 @@ MidiModel::PatchChangeDiffCommand::marshal_patch_change (constPatchChangePtr p)
} }
XMLNode& XMLNode&
MidiModel::PatchChangeDiffCommand::marshal_change (const Change& c) MidiModel::PatchChangeDiffCommand::marshal_change (const Change& c) const
{ {
XMLNode* n = new XMLNode (X_("Change")); XMLNode* n = new XMLNode (X_("Change"));
@ -1180,13 +1180,13 @@ MidiModel::PatchChangeDiffCommand::set_state (const XMLNode& diff_command, int /
} }
XMLNode & XMLNode &
MidiModel::PatchChangeDiffCommand::get_state () MidiModel::PatchChangeDiffCommand::get_state () const
{ {
XMLNode* diff_command = new XMLNode (PATCH_CHANGE_DIFF_COMMAND_ELEMENT); XMLNode* diff_command = new XMLNode (PATCH_CHANGE_DIFF_COMMAND_ELEMENT);
diff_command->set_property("midi-source", _model->midi_source().id().to_s()); diff_command->set_property("midi-source", _model->midi_source().id().to_s());
XMLNode* added = diff_command->add_child (ADDED_PATCH_CHANGES_ELEMENT); XMLNode* added = diff_command->add_child (ADDED_PATCH_CHANGES_ELEMENT);
for_each (_added.begin(), _added.end(), for_each (_added.cbegin(), _added.cend(),
boost::bind ( boost::bind (
boost::bind (&XMLNode::add_child_nocopy, added, _1), boost::bind (&XMLNode::add_child_nocopy, added, _1),
boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1) boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1)
@ -1194,7 +1194,7 @@ MidiModel::PatchChangeDiffCommand::get_state ()
); );
XMLNode* removed = diff_command->add_child (REMOVED_PATCH_CHANGES_ELEMENT); XMLNode* removed = diff_command->add_child (REMOVED_PATCH_CHANGES_ELEMENT);
for_each (_removed.begin(), _removed.end(), for_each (_removed.cbegin(), _removed.cend(),
boost::bind ( boost::bind (
boost::bind (&XMLNode::add_child_nocopy, removed, _1), boost::bind (&XMLNode::add_child_nocopy, removed, _1),
boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1) boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1)
@ -1202,7 +1202,7 @@ MidiModel::PatchChangeDiffCommand::get_state ()
); );
XMLNode* changes = diff_command->add_child (DIFF_PATCH_CHANGES_ELEMENT); XMLNode* changes = diff_command->add_child (DIFF_PATCH_CHANGES_ELEMENT);
for_each (_changes.begin(), _changes.end(), for_each (_changes.cbegin(), _changes.cend(),
boost::bind ( boost::bind (
boost::bind (&XMLNode::add_child_nocopy, changes, _1), boost::bind (&XMLNode::add_child_nocopy, changes, _1),
boost::bind (&PatchChangeDiffCommand::marshal_change, this, _1) boost::bind (&PatchChangeDiffCommand::marshal_change, this, _1)
@ -1336,7 +1336,7 @@ MidiModel::write_section_to (boost::shared_ptr<MidiSource> source,
} }
XMLNode& XMLNode&
MidiModel::get_state() MidiModel::get_state() const
{ {
XMLNode *node = new XMLNode("MidiModel"); XMLNode *node = new XMLNode("MidiModel");
return *node; return *node;

Some files were not shown because too many files have changed in this diff Show more