ardour
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ARDOUR::MidiModel::NoteDiffCommand Class Reference

#include <midi_model.h>

Inheritance diagram for ARDOUR::MidiModel::NoteDiffCommand:
ARDOUR::MidiModel::DiffCommand Command PBD::StatefulDestructible PBD::ScopedConnectionList PBD::Stateful PBD::Destructible

Classes

struct  NoteChange
 

Public Types

enum  Property {
  NoteNumber, Velocity, StartTime, Length,
  Channel
}
 
typedef std::list< NoteChangeChangeList
 
typedef std::list
< boost::shared_ptr
< Evoral::Note< TimeType > > > 
NoteList
 

Public Member Functions

 NoteDiffCommand (boost::shared_ptr< MidiModel > m, const std::string &name)
 
 NoteDiffCommand (boost::shared_ptr< MidiModel > m, const XMLNode &node)
 
void operator() ()
 
void undo ()
 
int set_state (const XMLNode &, int version)
 
XMLNodeget_state ()
 
void add (const NotePtr note)
 
void remove (const NotePtr note)
 
void side_effect_remove (const NotePtr note)
 
void change (const NotePtr note, Property prop, uint8_t new_value)
 
void change (const NotePtr note, Property prop, TimeType new_time)
 
void change (const NotePtr note, Property prop, const Variant &new_value)
 
bool adds_or_removes () const
 
NoteDiffCommandoperator+= (const NoteDiffCommand &other)
 
const ChangeListchanges () const
 
const NoteListadded_notes () const
 
const NoteListremoved_notes () const
 
- Public Member Functions inherited from ARDOUR::MidiModel::DiffCommand
 DiffCommand (boost::shared_ptr< MidiModel > m, const std::string &name)
 
const std::string & name () const
 
boost::shared_ptr< MidiModelmodel () const
 
- Public Member Functions inherited from Command
virtual ~Command ()
 
void set_name (const std::string &str)
 
const std::string & name () const
 
virtual void redo ()
 
virtual bool empty () const
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_changes (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 (Command *) const
 
virtual void rdiff (std::vector< 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 Member Functions inherited from PBD::Destructible
 Destructible ()
 
virtual ~Destructible ()
 
void drop_references ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Static Public Member Functions

static Variant get_value (const NotePtr note, Property prop)
 
static Variant::Type value_type (Property prop)
 

Private Member Functions

XMLNodemarshal_change (const NoteChange &)
 
NoteChange unmarshal_change (XMLNode *xml_note)
 
XMLNodemarshal_note (const NotePtr note)
 
NotePtr unmarshal_note (XMLNode *xml_note)
 

Private Attributes

ChangeList _changes
 
NoteList _added_notes
 
NoteList _removed_notes
 
std::set< NotePtrside_effect_removals
 

Additional Inherited Members

- Public Attributes inherited from PBD::Stateful
PBD::Signal1< void, const
PropertyChange & > 
PropertyChanged
 
- Public Attributes inherited from PBD::Destructible
PBD::Signal0< void > Destroyed
 
PBD::Signal0< void > DropReferences
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version = 0
 
static int loading_state_version = 0
 
- Protected Member Functions inherited from Command
 Command ()
 
 Command (const std::string &name)
 
- Protected Member Functions inherited from PBD::Stateful
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 &)
 
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 inherited from ARDOUR::MidiModel::DiffCommand
boost::shared_ptr< MidiModel_model
 
const std::string _name
 
- Protected Attributes inherited from Command
std::string _name
 
- Protected Attributes inherited from PBD::Stateful
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
 

Detailed Description

Definition at line 85 of file midi_model.h.

Member Typedef Documentation

Definition at line 137 of file midi_model.h.

Definition at line 138 of file midi_model.h.

Member Enumeration Documentation

Enumerator
NoteNumber 
Velocity 
StartTime 
Length 
Channel 

Definition at line 91 of file midi_model.h.

Constructor & Destructor Documentation

ARDOUR::MidiModel::NoteDiffCommand::NoteDiffCommand ( boost::shared_ptr< MidiModel m,
const std::string &  name 
)
inline

Definition at line 88 of file midi_model.h.

MidiModel::NoteDiffCommand::NoteDiffCommand ( boost::shared_ptr< MidiModel m,
const XMLNode node 
)

Definition at line 140 of file midi_model.cc.

Member Function Documentation

void MidiModel::NoteDiffCommand::add ( const NotePtr  note)

Definition at line 148 of file midi_model.cc.

const NoteList& ARDOUR::MidiModel::NoteDiffCommand::added_notes ( ) const
inline

Definition at line 141 of file midi_model.h.

bool ARDOUR::MidiModel::NoteDiffCommand::adds_or_removes ( ) const
inline

Definition at line 119 of file midi_model.h.

void ARDOUR::MidiModel::NoteDiffCommand::change ( const NotePtr  note,
Property  prop,
uint8_t  new_value 
)
inline

Definition at line 109 of file midi_model.h.

void ARDOUR::MidiModel::NoteDiffCommand::change ( const NotePtr  note,
Property  prop,
TimeType  new_time 
)
inline

Definition at line 113 of file midi_model.h.

void MidiModel::NoteDiffCommand::change ( const NotePtr  note,
Property  prop,
const Variant new_value 
)

Definition at line 203 of file midi_model.cc.

const ChangeList& ARDOUR::MidiModel::NoteDiffCommand::changes ( ) const
inline

Definition at line 140 of file midi_model.h.

XMLNode & MidiModel::NoteDiffCommand::get_state ( void  )
virtual

Implements ARDOUR::MidiModel::DiffCommand.

Definition at line 723 of file midi_model.cc.

Variant MidiModel::NoteDiffCommand::get_value ( const NotePtr  note,
Property  prop 
)
static

Definition at line 168 of file midi_model.cc.

XMLNode & MidiModel::NoteDiffCommand::marshal_change ( const NoteChange change)
private

Definition at line 556 of file midi_model.cc.

XMLNode & MidiModel::NoteDiffCommand::marshal_note ( const NotePtr  note)
private

Definition at line 447 of file midi_model.cc.

void MidiModel::NoteDiffCommand::operator() ( )
virtual

Implements ARDOUR::MidiModel::DiffCommand.

Definition at line 240 of file midi_model.cc.

MidiModel::NoteDiffCommand & MidiModel::NoteDiffCommand::operator+= ( const NoteDiffCommand other)

Definition at line 221 of file midi_model.cc.

void MidiModel::NoteDiffCommand::remove ( const NotePtr  note)

Definition at line 155 of file midi_model.cc.

const NoteList& ARDOUR::MidiModel::NoteDiffCommand::removed_notes ( ) const
inline

Definition at line 142 of file midi_model.h.

int MidiModel::NoteDiffCommand::set_state ( const XMLNode diff_command,
int  version 
)
virtual

Implements ARDOUR::MidiModel::DiffCommand.

Definition at line 665 of file midi_model.cc.

void MidiModel::NoteDiffCommand::side_effect_remove ( const NotePtr  note)

Definition at line 162 of file midi_model.cc.

void MidiModel::NoteDiffCommand::undo ( )
virtual

Implements ARDOUR::MidiModel::DiffCommand.

Definition at line 337 of file midi_model.cc.

MidiModel::NoteDiffCommand::NoteChange MidiModel::NoteDiffCommand::unmarshal_change ( XMLNode xml_note)
private

Definition at line 600 of file midi_model.cc.

Evoral::Sequence< MidiModel::TimeType >::NotePtr MidiModel::NoteDiffCommand::unmarshal_note ( XMLNode xml_note)
private

Definition at line 491 of file midi_model.cc.

Variant::Type MidiModel::NoteDiffCommand::value_type ( Property  prop)
static

Definition at line 187 of file midi_model.cc.

Member Data Documentation

NoteList ARDOUR::MidiModel::NoteDiffCommand::_added_notes
private

Definition at line 146 of file midi_model.h.

ChangeList ARDOUR::MidiModel::NoteDiffCommand::_changes
private

Definition at line 145 of file midi_model.h.

NoteList ARDOUR::MidiModel::NoteDiffCommand::_removed_notes
private

Definition at line 147 of file midi_model.h.

std::set<NotePtr> ARDOUR::MidiModel::NoteDiffCommand::side_effect_removals
private

Definition at line 149 of file midi_model.h.


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