Ardour  9.0-pre0-582-g084a23a80d
PBD::Stateful Class Referenceabstract

#include <stateful.h>

Inheritance diagram for PBD::Stateful:
[legend]

Classes

struct  ForceIDRegeneration
 

Public Member Functions

 Stateful ()
 
virtual ~Stateful ()
 
virtual XMLNodeget_state () const =0
 
virtual int set_state (const XMLNode &, int version)=0
 
virtual bool apply_change (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (PBD::Command *) const
 
virtual void rdiff (std::vector< PBD::Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 

Public Attributes

PBD::Signal< void(const PropertyChange &)> PropertyChanged
 

Static Public Attributes

static int current_state_version
 
static int loading_state_version
 

Protected Member Functions

void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &) const
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
bool regenerate_xml_or_string_ids () const
 

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
 

Static Private Member Functions

static void set_regenerate_xml_and_string_ids_in_this_thread (bool yn)
 

Private Attributes

PBD::ID _id
 
std::atomic< int > _stateful_frozen
 

Static Private Attributes

static Glib::Threads::Private< bool > _regenerate_xml_or_string_ids
 

Friends

struct ForceIDRegeneration
 

Detailed Description

Base class for objects with saveable and undoable state

Definition at line 48 of file stateful.h.

Constructor & Destructor Documentation

◆ Stateful()

PBD::Stateful::Stateful ( )

◆ ~Stateful()

virtual PBD::Stateful::~Stateful ( )
virtual

Member Function Documentation

◆ add_extra_xml()

void PBD::Stateful::add_extra_xml ( XMLNode )

◆ add_instant_xml()

void PBD::Stateful::add_instant_xml ( XMLNode ,
const std::string &  directory_path 
)
protected

◆ add_properties()

void PBD::Stateful::add_properties ( XMLNode ) const
protected

◆ add_property()

void PBD::Stateful::add_property ( PropertyBase s)

◆ apply_change()

virtual bool PBD::Stateful::apply_change ( PropertyBase const &  )
virtual

◆ apply_changes()

PropertyChange PBD::Stateful::apply_changes ( PropertyList const &  )

◆ changed()

bool PBD::Stateful::changed ( ) const

◆ clear_changes()

void PBD::Stateful::clear_changes ( )

◆ clear_owned_changes()

virtual void PBD::Stateful::clear_owned_changes ( )
virtual

Reimplemented in ARDOUR::Playlist.

◆ extra_xml()

XMLNode* PBD::Stateful::extra_xml ( const std::string &  str,
bool  add_if_missing = false 
)

◆ get_changes_as_properties()

PropertyList* PBD::Stateful::get_changes_as_properties ( PBD::Command ) const

◆ get_state()

virtual XMLNode& PBD::Stateful::get_state ( ) const
pure virtual

Implemented in ARDOUR::RegionFxPlugin, ARDOUR::IOPlug, ArdourSurface::Console1, PBD::Configuration, ARDOUR::MidiModel::DiffCommand, ArdourWidgets::Tabbable, Temporal::TempoCommand, Temporal::TempoMap, WiimoteControlProtocol, ArdourSurface::US2400Protocol, ArdourSurface::Push2, OSCControllable, ArdourSurface::OSC, ArdourSurface::Maschine2, ArdourSurface::NS_MCU::MackieControlProtocol, ArdourSurface::LP_X::LaunchPadX, ArdourSurface::LaunchPadPro, ArdourSurface::LP_X::LaunchKey4, ArdourSurface::LaunchControlXL, MIDIFunction, MIDIControllable, MIDIAction, GenericMidiControlProtocol, ArdourSurface::FP8::FaderPort8, ArdourSurface::FaderPort, ArdourSurface::ContourDesignControlProtocol, ArdourSurface::CC121, PBD::UndoTransaction, PBD::StatefulDiffCommand, MementoCommand< obj_T >, PBD::Controllable, PBD::Command, ARDOUR::VBAPanner, ARDOUR::Pannerbalance, ARDOUR::Panner2in2out, ARDOUR::Panner1in2out, Gtkmm2ext::WindowProxy, Gtkmm2ext::Keyboard, MIDISurface, ARDOUR::ControlProtocol, ARDOUR::VCAManager, ARDOUR::VCA, ARDOUR::UserBundle, ARDOUR::TriggerBox, ARDOUR::MIDITrigger, ARDOUR::AudioTrigger, ARDOUR::Trigger, ARDOUR::TransportMaster, ARDOUR::SurroundPannable, ARDOUR::StepSequencer, ARDOUR::StepSequence, ARDOUR::Step, ARDOUR::Speakers, ARDOUR::Source, ARDOUR::SoloSafeControl, ARDOUR::SoloIsolateControl, ARDOUR::SoloControl, ARDOUR::SMFSource, ARDOUR::SlavableAutomationControl, ARDOUR::SessionMetadata, ARDOUR::SessionConfiguration, ARDOUR::Session, ARDOUR::CoreSelection, ARDOUR::RouteGroup, ARDOUR::Route, ARDOUR::Region, ARDOUR::RCConfiguration, ARDOUR::Processor, ARDOUR::PresentationInfo, ARDOUR::Plugin, ARDOUR::PlugInsertBase::PluginPropertyControl, ARDOUR::PlugInsertBase::PluginControl, ARDOUR::Playlist, ARDOUR::PhaseControl, ARDOUR::PannerShell, ARDOUR::Panner, ARDOUR::Pannable, ARDOUR::MuteMaster, ARDOUR::MonitorControl, ARDOUR::MixerScene, ARDOUR::MidiSource, ARDOUR::MIDISceneChange, ARDOUR::MidiModel::PatchChangeDiffCommand, ARDOUR::MidiModel::SysExDiffCommand, ARDOUR::MidiModel::NoteDiffCommand, ARDOUR::Locations, ARDOUR::Location, ARDOUR::IO, ARDOUR::ControlProtocolManager, ARDOUR::BeatBox, ARDOUR::AutomationList, ARDOUR::AudioSource, ARDOUR::AudioFileSource, ARDOUR::AudioPlaylistSource, VideoTimeLine, UIConfiguration, TriggerPage, SelectionMemento, RecorderUI, RCOptionEditor, ProcessorWindowProxy, PluginWindowProxy, Mixer_UI, ArdourKeyboard, Editor, and AutomationLine.

◆ id()

const PBD::ID& PBD::Stateful::id ( ) const
inline

Definition at line 71 of file stateful.h.

◆ instant_xml()

XMLNode* PBD::Stateful::instant_xml ( const std::string &  str,
const std::string &  directory_path 
)
protected

◆ mid_thaw()

virtual void PBD::Stateful::mid_thaw ( const PropertyChange )
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 135 of file stateful.h.

◆ post_set()

virtual void PBD::Stateful::post_set ( const PropertyChange )
inlineprotectedvirtual

Reimplemented in ARDOUR::RouteGroup, and ARDOUR::AudioRegion.

Definition at line 121 of file stateful.h.

◆ properties()

const OwnedPropertyList& PBD::Stateful::properties ( ) const
inline

Definition at line 59 of file stateful.h.

◆ property_changes_suspended()

bool PBD::Stateful::property_changes_suspended ( ) const
inline

Definition at line 107 of file stateful.h.

◆ property_factory()

virtual PropertyList* PBD::Stateful::property_factory ( const XMLNode ) const
virtual

◆ rdiff()

virtual void PBD::Stateful::rdiff ( std::vector< PBD::Command * > &  ) const
virtual

Reimplemented in ARDOUR::Playlist.

◆ regenerate_xml_or_string_ids()

bool PBD::Stateful::regenerate_xml_or_string_ids ( ) const
protected

◆ reset_id()

void PBD::Stateful::reset_id ( )

◆ resume_property_changes()

virtual void PBD::Stateful::resume_property_changes ( )
virtual

◆ save_extra_xml()

void PBD::Stateful::save_extra_xml ( const XMLNode )

◆ send_change()

virtual void PBD::Stateful::send_change ( const PropertyChange )
protectedvirtual

Reimplemented in ARDOUR::Region, and ARDOUR::AudioRegion.

◆ set_id() [1/2]

void PBD::Stateful::set_id ( const std::string &  )

◆ set_id() [2/2]

bool PBD::Stateful::set_id ( const XMLNode )

◆ set_regenerate_xml_and_string_ids_in_this_thread()

static void PBD::Stateful::set_regenerate_xml_and_string_ids_in_this_thread ( bool  yn)
staticprivate

◆ set_state()

virtual int PBD::Stateful::set_state ( const XMLNode ,
int  version 
)
pure virtual

Implemented in PBD::Configuration, ARDOUR::VSTPlugin, ARDOUR::TransportMaster, ARDOUR::Stripable, ARDOUR::StepSequencer, ARDOUR::StepSequence, ARDOUR::Step, ARDOUR::SoloSafeControl, ARDOUR::SoloIsolateControl, ARDOUR::SoloControl, ARDOUR::SlavableAutomationControl, ARDOUR::PresentationInfo, ARDOUR::PhaseControl, ARDOUR::MonitorControl, Temporal::TempoMap, ARDOUR::ControlProtocol, ARDOUR::VCAManager, ARDOUR::VCA, ARDOUR::UserBundle, ARDOUR::SurroundReturn, ARDOUR::Source, ARDOUR::SessionConfiguration, ARDOUR::RCConfiguration, ARDOUR::MixerScene, ARDOUR::AUPlugin, ArdourSurface::Push2, OSCControllable, ArdourSurface::Maschine2, ArdourSurface::LP_X::LaunchPadX, ArdourSurface::LaunchPadPro, ArdourSurface::LP_X::LaunchKey4, ArdourSurface::LaunchControlXL, MIDISurface, ARDOUR::Session, ARDOUR::LV2Plugin, ARDOUR::InternalSend, PBD::Command, ARDOUR::MonitorProcessor, ARDOUR::Auditioner, TriggerPage, RecorderUI, ProcessorWindowProxy, PluginWindowProxy, Mixer_UI, ARDOUR::SessionMetadata, ARDOUR::MidiModel::DiffCommand, ArdourSurface::Console1, ArdourWidgets::Tabbable, WiimoteControlProtocol, ArdourSurface::US2400Protocol, ArdourSurface::OSC, ArdourSurface::NS_MCU::MackieControlProtocol, MIDIFunction, MIDIControllable, MIDIAction, GenericMidiControlProtocol, ArdourSurface::FP8::FaderPort8, ArdourSurface::FaderPort, ArdourSurface::ContourDesignControlProtocol, ArdourSurface::CC121, PBD::Controllable, Gtkmm2ext::WindowProxy, Gtkmm2ext::Keyboard, ARDOUR::VST3Plugin, ARDOUR::TriggerBox, ARDOUR::MIDITrigger, ARDOUR::AudioTrigger, ARDOUR::Trigger, ARDOUR::Track, ARDOUR::SurroundSend, ARDOUR::SurroundPannable, ARDOUR::Speakers, ARDOUR::SMFSource, ARDOUR::SideChain, ARDOUR::Send, ARDOUR::CoreSelection, ARDOUR::RouteGroup, ARDOUR::Route, ARDOUR::Return, ARDOUR::RegionFxPlugin, ARDOUR::Region, ARDOUR::Processor, ARDOUR::PortInsert, ARDOUR::PluginInsert, ARDOUR::Plugin, ARDOUR::PlaylistSource, ARDOUR::Playlist, ARDOUR::PannerShell, ARDOUR::Panner, ARDOUR::Pannable, ARDOUR::MuteMaster, ARDOUR::MidiTrack, ARDOUR::MidiSource, ARDOUR::MIDISceneChange, ARDOUR::MidiRegion, ARDOUR::MidiPlaylist, ARDOUR::MidiModel::PatchChangeDiffCommand, ARDOUR::MidiModel::SysExDiffCommand, ARDOUR::MidiModel::NoteDiffCommand, ARDOUR::LuaProc, ARDOUR::Locations, ARDOUR::Location, ARDOUR::LadspaPlugin, ARDOUR::IOProcessor, ARDOUR::IOPlug, ARDOUR::IO, ARDOUR::FileSource, ARDOUR::DiskWriter, ARDOUR::DiskReader, ARDOUR::DiskIOProcessor, ARDOUR::Delivery, ARDOUR::ControlProtocolManager, ARDOUR::AutomationList, ARDOUR::AudioSource, ARDOUR::AudioRegion, ARDOUR::AudioPlaylist, ARDOUR::AudioFileSource, ARDOUR::AudioTrack, ARDOUR::AudioPlaylistSource, ARDOUR::Amp, VideoTimeLine, UIConfiguration, SelectionMemento, ArdourKeyboard, Editor, and AutomationLine.

◆ set_values()

PropertyChange PBD::Stateful::set_values ( XMLNode const &  )
protected

◆ suspend_property_changes()

virtual void PBD::Stateful::suspend_property_changes ( )
virtual

Reimplemented in ARDOUR::Region.

Friends And Related Function Documentation

◆ ForceIDRegeneration

friend struct ForceIDRegeneration
friend

Definition at line 140 of file stateful.h.

Member Data Documentation

◆ _extra_xml

XMLNode* PBD::Stateful::_extra_xml
protected

Definition at line 123 of file stateful.h.

◆ _id

PBD::ID PBD::Stateful::_id
private

Definition at line 143 of file stateful.h.

◆ _instant_xml

XMLNode* PBD::Stateful::_instant_xml
protected

Definition at line 124 of file stateful.h.

◆ _lock

Glib::Threads::Mutex PBD::Stateful::_lock
protected

Definition at line 126 of file stateful.h.

◆ _pending_changed

PBD::PropertyChange PBD::Stateful::_pending_changed
protected

Definition at line 125 of file stateful.h.

◆ _properties

OwnedPropertyList* PBD::Stateful::_properties
protected

Definition at line 129 of file stateful.h.

◆ _regenerate_xml_or_string_ids

Glib::Threads::Private<bool> PBD::Stateful::_regenerate_xml_or_string_ids
staticprivate

Definition at line 141 of file stateful.h.

◆ _stateful_frozen

std::atomic<int> PBD::Stateful::_stateful_frozen
private

Definition at line 144 of file stateful.h.

◆ _xml_node_name

std::string PBD::Stateful::_xml_node_name
protected

name of node to use for this object in XML

Definition at line 128 of file stateful.h.

◆ current_state_version

int PBD::Stateful::current_state_version
static

Definition at line 101 of file stateful.h.

◆ loading_state_version

int PBD::Stateful::loading_state_version
static

Definition at line 102 of file stateful.h.

◆ PropertyChanged

PBD::Signal<void(const PropertyChange&)> PBD::Stateful::PropertyChanged

Definition at line 99 of file stateful.h.


The documentation for this class was generated from the following file: