ardour
|
#include <stateful.h>
Public Member Functions | |
Stateful () | |
virtual | ~Stateful () |
virtual XMLNode & | get_state (void)=0 |
virtual int | set_state (const XMLNode &, int version)=0 |
virtual bool | apply_changes (PropertyBase const &) |
PropertyChange | apply_changes (PropertyList const &) |
const OwnedPropertyList & | properties () const |
void | add_property (PropertyBase &s) |
void | add_extra_xml (XMLNode &) |
XMLNode * | extra_xml (const std::string &str, bool add_if_missing=false) |
void | save_extra_xml (const XMLNode &) |
const PBD::ID & | id () const |
bool | set_id (const XMLNode &) |
void | set_id (const std::string &) |
void | reset_id () |
void | clear_changes () |
virtual void | clear_owned_changes () |
PropertyList * | get_changes_as_properties (Command *) const |
virtual void | rdiff (std::vector< Command * > &) const |
bool | changed () const |
virtual PropertyList * | property_factory (const XMLNode &) const |
virtual void | suspend_property_changes () |
virtual void | resume_property_changes () |
bool | property_changes_suspended () const |
Public Attributes | |
PBD::Signal1< void, const PropertyChange & > | PropertyChanged |
Static Public Attributes | |
static int | current_state_version = 0 |
static int | loading_state_version = 0 |
Protected Member Functions | |
void | add_instant_xml (XMLNode &, const std::string &directory_path) |
XMLNode * | instant_xml (const std::string &str, const std::string &directory_path) |
void | add_properties (XMLNode &) |
PropertyChange | set_values (XMLNode const &) |
virtual void | post_set (const PropertyChange &) |
virtual void | send_change (const PropertyChange &) |
virtual void | mid_thaw (const PropertyChange &) |
Protected Attributes | |
XMLNode * | _extra_xml |
XMLNode * | _instant_xml |
PBD::PropertyChange | _pending_changed |
Glib::Threads::Mutex | _lock |
std::string | _xml_node_name |
name of node to use for this object in XML More... | |
OwnedPropertyList * | _properties |
Private Attributes | |
PBD::ID | _id |
gint | _stateful_frozen |
Base class for objects with saveable and undoable state
Definition at line 45 of file stateful.h.
PBD::Stateful::Stateful | ( | ) |
Definition at line 47 of file stateful.cc.
|
virtual |
Definition at line 55 of file stateful.cc.
void PBD::Stateful::add_extra_xml | ( | XMLNode & | node | ) |
Definition at line 66 of file stateful.cc.
|
protected |
Definition at line 111 of file stateful.cc.
|
protected |
Add property states to an XML node.
owner_state | Node. |
Definition at line 264 of file stateful.cc.
void PBD::Stateful::add_property | ( | PropertyBase & | s | ) |
Definition at line 272 of file stateful.cc.
|
virtual |
Definition at line 337 of file stateful.cc.
PropertyChange PBD::Stateful::apply_changes | ( | PropertyList const & | property_list | ) |
Definition at line 225 of file stateful.cc.
bool PBD::Stateful::changed | ( | ) | const |
Definition at line 325 of file stateful.cc.
void PBD::Stateful::clear_changes | ( | ) |
Forget about any changes to this object's properties
Definition at line 184 of file stateful.cc.
|
virtual |
Reimplemented in ARDOUR::Playlist.
Definition at line 373 of file stateful.cc.
XMLNode * PBD::Stateful::extra_xml | ( | const std::string & | str, |
bool | add_if_missing = false |
||
) |
Definition at line 77 of file stateful.cc.
PropertyList * PBD::Stateful::get_changes_as_properties | ( | Command * | cmd | ) | const |
Definition at line 192 of file stateful.cc.
|
pure virtual |
Implemented in ARDOUR::Session, ARDOUR::Route, ARDOUR::TempoMap, ARDOUR::Region, ARDOUR::MidiModel::PatchChangeDiffCommand, ARDOUR::Playlist, ARDOUR::Locations, Editor, ARDOUR::MidiModel::SysExDiffCommand, ARDOUR::Panner, ARDOUR::Diskstream, ARDOUR::MidiSource, ARDOUR::IO, MementoCommand< obj_T >, ARDOUR::Location, AutomationLine, ARDOUR::RouteGroup, ARDOUR::SessionMetadata, ARDOUR::PluginInsert::PluginPropertyControl, ARDOUR::AudioDiskstream, ARDOUR::Processor, ARDOUR::AutomationList, Fred, ARDOUR::MidiModel::NoteDiffCommand, ARDOUR::Track, ARDOUR::Plugin, ARDOUR::PluginInsert::PluginControl, PBD::Controllable, ARDOUR::MidiDiskstream, ARDOUR::AudioSource, ARDOUR::Pannable, ARDOUR::Source, ARDOUR::ControlProtocolManager, ARDOUR::MidiModel::DiffCommand, PBD::FunctorCommand< obj_type, arg_type >, ARDOUR::AudioFileSource, ARDOUR::MuteMaster, VideoTimeLine, ARDOUR::PannerShell, ARDOUR::SMFSource, UndoTransaction, ARDOUR::PluginInsert, ARDOUR::Return, ARDOUR::Speakers, ARDOUR::MIDISceneChange, ARDOUR::Send, UIConfiguration, ARDOUR::PortInsert, ARDOUR::AudioPlaylistSource, PBD::StatefulDiffCommand, Gtkmm2ext::Keyboard, ARDOUR::MidiPlaylistSource, ARDOUR::RCConfiguration, Command, PBD::Configuration, ARDOUR::InternalSend, ARDOUR::InternalReturn, ARDOUR::UserBundle, ARDOUR::SessionConfiguration, and SelectionMemento.
|
inline |
Definition at line 68 of file stateful.h.
|
protected |
Definition at line 151 of file stateful.cc.
|
inlineprotectedvirtual |
derived classes can implement this in order to process a property change within thaw() just before send_change() is called.
Reimplemented in ARDOUR::Region.
Definition at line 123 of file stateful.h.
|
inlineprotectedvirtual |
Reimplemented in ARDOUR::Region, ARDOUR::AudioRegion, and ARDOUR::MidiRegion.
Definition at line 109 of file stateful.h.
|
inline |
Definition at line 56 of file stateful.h.
|
inline |
Definition at line 95 of file stateful.h.
|
virtual |
Definition at line 349 of file stateful.cc.
|
virtual |
Reimplemented in ARDOUR::Playlist.
Definition at line 365 of file stateful.cc.
void PBD::Stateful::reset_id | ( | ) |
Definition at line 394 of file stateful.cc.
|
virtual |
Definition at line 302 of file stateful.cc.
void PBD::Stateful::save_extra_xml | ( | const XMLNode & | node | ) |
Definition at line 94 of file stateful.cc.
|
protectedvirtual |
Reimplemented in ARDOUR::Region.
Definition at line 278 of file stateful.cc.
bool PBD::Stateful::set_id | ( | const XMLNode & | node | ) |
Definition at line 381 of file stateful.cc.
void PBD::Stateful::set_id | ( | const std::string & | ) |
|
pure virtual |
Implemented in ARDOUR::Session, ARDOUR::Route, ARDOUR::TempoMap, ARDOUR::Region, ARDOUR::MidiModel::PatchChangeDiffCommand, ARDOUR::Playlist, ARDOUR::Locations, Editor, ARDOUR::MidiModel::SysExDiffCommand, ARDOUR::Panner, ARDOUR::Diskstream, ARDOUR::MidiSource, ARDOUR::IO, ARDOUR::Location, AutomationLine, ARDOUR::RouteGroup, ARDOUR::SessionMetadata, ARDOUR::MonitorProcessor, ARDOUR::LV2Plugin, ARDOUR::AudioDiskstream, ARDOUR::AudioRegion, Fred, ARDOUR::Processor, ARDOUR::AutomationList, ARDOUR::Track, ARDOUR::LadspaPlugin, ARDOUR::MidiModel::NoteDiffCommand, ARDOUR::Plugin, ARDOUR::AUPlugin, PBD::Controllable, ARDOUR::Auditioner, ARDOUR::Delivery, ARDOUR::MidiDiskstream, ARDOUR::MidiRegion, ARDOUR::MidiPlaylist, ARDOUR::AudioSource, ARDOUR::Pannable, ARDOUR::Source, ARDOUR::IOProcessor, ARDOUR::MidiTrack, ARDOUR::VSTPlugin, ARDOUR::ControlProtocolManager, ARDOUR::MidiModel::DiffCommand, ARDOUR::AudioFileSource, ARDOUR::MuteMaster, VideoTimeLine, ARDOUR::PannerShell, ARDOUR::SMFSource, ARDOUR::AudioTrack, ARDOUR::FileSource, ARDOUR::Amp, ARDOUR::AudioPlaylist, ARDOUR::PluginInsert, ARDOUR::Return, ARDOUR::Speakers, ARDOUR::MIDISceneChange, ARDOUR::Send, ARDOUR::PortInsert, UIConfiguration, ARDOUR::AudioPlaylistSource, Gtkmm2ext::Keyboard, ARDOUR::MidiPlaylistSource, Command, ARDOUR::RCConfiguration, ARDOUR::UserBundle, ARDOUR::InternalSend, PBD::Configuration, ARDOUR::PlaylistSource, ARDOUR::SessionConfiguration, and SelectionMemento.
|
protected |
Set our property values from an XML node. Derived types can call this from set_state() (or elsewhere) to get basic property setting done.
Definition at line 209 of file stateful.cc.
|
virtual |
Reimplemented in ARDOUR::Region.
Definition at line 296 of file stateful.cc.
|
protected |
Definition at line 109 of file stateful.h.
|
private |
Definition at line 126 of file stateful.h.
|
protected |
Definition at line 112 of file stateful.h.
|
protected |
Definition at line 114 of file stateful.h.
|
protected |
Definition at line 113 of file stateful.h.
|
protected |
Definition at line 117 of file stateful.h.
|
private |
Definition at line 127 of file stateful.h.
|
protected |
name of node to use for this object in XML
Definition at line 116 of file stateful.h.
|
static |
Definition at line 89 of file stateful.h.
|
static |
Definition at line 90 of file stateful.h.
PBD::Signal1<void,const PropertyChange&> PBD::Stateful::PropertyChanged |
Definition at line 87 of file stateful.h.