Remove set_state / _set_state dance in Route hierarchy

that seems to have been a hangover from when _set_state
was called in constructors.


git-svn-id: svn://localhost/ardour2/branches/3.0@10654 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-16 22:26:49 +00:00
parent 63ed921cc6
commit 58dbe9ed13
8 changed files with 10 additions and 40 deletions

View File

@ -57,7 +57,7 @@ class AudioTrack : public Track
boost::shared_ptr<Region> bounce (InterThreadInfo&);
boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing);
int set_state(const XMLNode&, int version);
int set_state (const XMLNode&, int version);
boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0);
@ -67,8 +67,6 @@ class AudioTrack : public Track
boost::shared_ptr<AudioDiskstream> audio_diskstream () const;
XMLNode& state (bool full);
int _set_state (const XMLNode&, int);
private:
boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);

View File

@ -64,7 +64,7 @@ public:
framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing
);
int set_state(const XMLNode&, int version);
int set_state (const XMLNode&, int version);
void midi_panic(void);
bool write_immediate_event(size_t size, const uint8_t* buf);
@ -114,7 +114,6 @@ public:
protected:
XMLNode& state (bool full);
int _set_state (const XMLNode&, int);
bool should_monitor () const;
bool send_silence () const;

View File

@ -288,7 +288,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
/* stateful */
XMLNode& get_state();
int set_state (const XMLNode&, int version);
virtual int set_state (const XMLNode&, int version);
virtual XMLNode& get_template();
XMLNode& get_processor_state ();
@ -493,13 +493,11 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
virtual bool should_monitor () const;
virtual void maybe_declick (BufferSet&, framecnt_t, int);
virtual int _set_state (const XMLNode&, int);
boost::shared_ptr<Amp> _amp;
boost::shared_ptr<PeakMeter> _meter;
private:
int _set_state_2X (const XMLNode&, int);
int set_state_2X (const XMLNode&, int);
void set_processor_state_2X (XMLNodeList const &, int);
static uint32_t order_key_cnt;

View File

@ -90,7 +90,7 @@ class Track : public Route, public PublicDiskstream
XMLNode& get_state();
XMLNode& get_template();
int set_state (const XMLNode&, int version);
virtual int set_state (const XMLNode&, int version);
static void zero_diskstream_id_in_xml (XMLNode&);
boost::shared_ptr<PBD::Controllable> rec_enable_control() { return _rec_enable_control; }
@ -162,7 +162,6 @@ class Track : public Route, public PublicDiskstream
protected:
XMLNode& state (bool full);
int _set_state (const XMLNode&, int version);
boost::shared_ptr<Diskstream> _diskstream;
MeterPoint _saved_meter_point;

View File

@ -200,16 +200,10 @@ AudioTrack::deprecated_use_diskstream_connections ()
int
AudioTrack::set_state (const XMLNode& node, int version)
{
return _set_state (node, version);
}
int
AudioTrack::_set_state (const XMLNode& node, int version)
{
const XMLProperty *prop;
if (Track::_set_state (node, version)) {
if (Track::set_state (node, version)) {
return -1;
}

View File

@ -135,16 +135,10 @@ MidiTrack::midi_diskstream() const
int
MidiTrack::set_state (const XMLNode& node, int version)
{
return _set_state (node, version);
}
int
MidiTrack::_set_state (const XMLNode& node, int version)
{
const XMLProperty *prop;
if (Track::_set_state (node, version)) {
if (Track::set_state (node, version)) {
return -1;
}

View File

@ -1847,15 +1847,9 @@ Route::state(bool full_state)
int
Route::set_state (const XMLNode& node, int version)
{
return _set_state (node, version);
}
int
Route::_set_state (const XMLNode& node, int version)
{
if (version < 3000) {
return _set_state_2X (node, version);
return set_state_2X (node, version);
}
XMLNodeList nlist;
@ -2055,7 +2049,7 @@ Route::_set_state (const XMLNode& node, int version)
}
int
Route::_set_state_2X (const XMLNode& node, int version)
Route::set_state_2X (const XMLNode& node, int version)
{
XMLNodeList nlist;
XMLNodeConstIterator niter;

View File

@ -85,13 +85,7 @@ Track::state (bool full)
int
Track::set_state (const XMLNode& node, int version)
{
return _set_state (node, version);
}
int
Track::_set_state (const XMLNode& node, int version)
{
if (Route::_set_state (node, version)) {
if (Route::set_state (node, version)) {
return -1;
}