Session XML style consistency (tag names are capitalized).

One thing left, this weird "end-marker-is-free" in <Config>.  Is this really a config option?  Anyone?


git-svn-id: svn://localhost/ardour2/branches/3.0@4577 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-02-15 03:21:30 +00:00
parent 74ff55f835
commit 9462374e29
15 changed files with 30 additions and 31 deletions

View file

@ -97,7 +97,7 @@ class LV2Plugin : public ARDOUR::Plugin
int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset);
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name() const { return "lv2"; }
std::string state_node_name() const { return "LV2"; }
void print_parameter (uint32_t, char*, uint32_t len) const;
bool parameter_is_audio(uint32_t) const;

View file

@ -319,7 +319,7 @@ AudioTrack::state(bool full_state)
/* Alignment: act as a proxy for the diskstream */
XMLNode* align_node = new XMLNode (X_("alignment"));
XMLNode* align_node = new XMLNode (X_("Alignment"));
AlignStyle as = _diskstream->alignment_style ();
align_node->add_property (X_("style"), enum_2_string (as));
root.add_child_nocopy (*align_node);
@ -402,7 +402,7 @@ AudioTrack::set_state_part_two ()
/* Alignment: act as a proxy for the diskstream */
if ((fnode = find_named_node (*pending_state, X_("alignment"))) != 0) {
if ((fnode = find_named_node (*pending_state, X_("Alignment"))) != 0) {
if ((prop = fnode->property (X_("style"))) != 0) {

View file

@ -90,18 +90,18 @@ AudioTrackImporter::AudioTrackImporter (XMLTree const & source,
throw failed_constructor();
}
XMLNodeList const & controllables = node.children ("controllable");
XMLNodeList const & controllables = node.children ("Controllable");
for (XMLNodeList::const_iterator it = controllables.begin(); it != controllables.end(); ++it) {
parse_controllable (**it);
}
XMLNode * remote_control = xml_track.child ("remote_control");
XMLNode * remote_control = xml_track.child ("RemoteControl");
if (remote_control && (prop = remote_control->property ("id"))) {
uint32_t control_id = session.ntracks() + session.nbusses() + 1;
prop->set_value (to_string (control_id, std::dec));
}
xml_track.remove_nodes_and_delete ("extra");
xml_track.remove_nodes_and_delete ("Extra");
}
AudioTrackImporter::~AudioTrackImporter ()
@ -196,7 +196,7 @@ AudioTrackImporter::parse_io ()
return false;
}
XMLNodeList const & controllables = io->children ("controllable");
XMLNodeList const & controllables = io->children ("Controllable");
for (XMLNodeList::const_iterator it = controllables.begin(); it != controllables.end(); ++it) {
parse_controllable (**it);
}

View file

@ -297,7 +297,7 @@ Configuration::set_state (const XMLNode& root)
set_variables (*node, ConfigVariableBase::Config);
} else if (node->name() == "extra") {
} else if (node->name() == "Extra") {
_extra_xml = new XMLNode (*node);
} else if (node->name() == ControlProtocolManager::state_node_name) {

View file

@ -1417,7 +1417,7 @@ IO::set_state (const XMLNode& node)
set_automation_state (*(*iter), Evoral::Parameter(GainAutomation));
}
if ((*iter)->name() == X_("controllable")) {
if ((*iter)->name() == X_("Controllable")) {
if ((prop = (*iter)->property("name")) != 0 && prop->value() == "gaincontrol") {
_gain_control->set_state (**iter);
}

View file

@ -349,7 +349,7 @@ LadspaPlugin::get_state()
if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) &&
LADSPA_IS_PORT_CONTROL(port_descriptor (i))){
child = new XMLNode("port");
child = new XMLNode("Port");
snprintf(buf, sizeof(buf), "%u", i);
child->add_property("number", string(buf));
snprintf(buf, sizeof(buf), "%+f", _shadow_data[i]);
@ -384,7 +384,7 @@ LadspaPlugin::set_state(const XMLNode& node)
return -1;
}
nodes = node.children ("port");
nodes = node.children ("Port");
for(iter = nodes.begin(); iter != nodes.end(); ++iter){

View file

@ -259,7 +259,7 @@ LV2Plugin::get_state()
for (uint32_t i = 0; i < parameter_count(); ++i){
if (parameter_is_input(i) && parameter_is_control(i)) {
child = new XMLNode("port");
child = new XMLNode("Port");
snprintf(buf, sizeof(buf), "%u", i);
child->add_property("number", string(buf));
child->add_property("symbol", port_symbol(i));
@ -345,7 +345,7 @@ LV2Plugin::set_state(const XMLNode& node)
return -1;
}
nodes = node.children ("port");
nodes = node.children ("Port");
for(iter = nodes.begin(); iter != nodes.end(); ++iter){

View file

@ -114,7 +114,7 @@ MidiModel::DeltaCommand::operator()()
// Store the current seek position so we can restore the read iterator
// after modifying the contents of the model
const double read_time = _model->read_time();
const TimeType read_time = _model->read_time();
for (NoteList::iterator i = _added_notes.begin(); i != _added_notes.end(); ++i)
_model->add_note_unlocked(*i);
@ -139,7 +139,7 @@ MidiModel::DeltaCommand::undo()
// Store the current seek position so we can restore the read iterator
// after modifying the contents of the model
const double read_time = _model->read_time();
const TimeType read_time = _model->read_time();
for (NoteList::iterator i = _added_notes.begin(); i != _added_notes.end(); ++i)
_model->remove_note_unlocked(*i);
@ -181,7 +181,7 @@ MidiModel::DeltaCommand::marshal_note(const boost::shared_ptr< Evoral::Note<Time
return *xml_note;
}
boost::shared_ptr< Evoral::Note<double> >
boost::shared_ptr< Evoral::Note<MidiModel::TimeType> >
MidiModel::DeltaCommand::unmarshal_note(XMLNode *xml_note)
{
unsigned int note;

View file

@ -246,7 +246,7 @@ MidiTrack::state(bool full_state)
/* Alignment: act as a proxy for the diskstream */
XMLNode* align_node = new XMLNode (X_("alignment"));
XMLNode* align_node = new XMLNode (X_("Alignment"));
AlignStyle as = _diskstream->alignment_style ();
align_node->add_property (X_("style"), enum_2_string (as));
root.add_child_nocopy (*align_node);
@ -329,7 +329,7 @@ MidiTrack::set_state_part_two ()
/* Alignment: act as a proxy for the diskstream */
if ((fnode = find_named_node (*pending_state, X_("alignment"))) != 0) {
if ((fnode = find_named_node (*pending_state, X_("Alignment"))) != 0) {
if ((prop = fnode->property (X_("style"))) != 0) {

View file

@ -498,7 +498,7 @@ EqualPowerStereoPanner::set_state (const XMLNode& node)
for (XMLNodeConstIterator iter = node.children().begin(); iter != node.children().end(); ++iter) {
if ((*iter)->name() == X_("controllable")) {
if ((*iter)->name() == X_("Controllable")) {
if ((prop = (*iter)->property("name")) != 0 && prop->value() == "panner") {
_control->set_state (**iter);
}

View file

@ -670,7 +670,7 @@ PluginInsert::state (bool full)
{
XMLNode& node = Processor::state (full);
node.add_property ("type", _plugins[0]->state_node_name());
node.add_property("type", _plugins[0]->state_node_name());
node.add_property("unique-id", _plugins[0]->unique_id());
node.add_property("count", string_compose("%1", _plugins.size()));
node.add_child_nocopy (_plugins[0]->get_state());
@ -791,7 +791,7 @@ PluginInsert::set_state(const XMLNode& node)
const char *port;
uint32_t port_id;
cnodes = (*niter)->children ("port");
cnodes = (*niter)->children ("Port");
for(iter = cnodes.begin(); iter != cnodes.end(); ++iter){

View file

@ -190,7 +190,7 @@ Processor::set_state (const XMLNode& node)
}
}
} else if ((*niter)->name() == "extra") {
} else if ((*niter)->name() == "Extra") {
_extra_xml = new XMLNode (*(*niter));
} else if ((*niter)->name() == "Redirect") {
if ( !(legacy_active = (*niter)->property("active"))) {

View file

@ -1347,7 +1347,7 @@ Region::set_live_state (const XMLNode& node, Change& what_changed, bool send)
child = (*niter);
if (child->name () == "extra") {
if (child->name () == "Extra") {
_extra_xml = new XMLNode (*child);
break;
}

View file

@ -1909,7 +1909,7 @@ Route::state(bool full_state)
node->add_child_nocopy (_solo_control->get_state ());
node->add_child_nocopy (_mute_control->get_state ());
XMLNode* remote_control_node = new XMLNode (X_("remote_control"));
XMLNode* remote_control_node = new XMLNode (X_("RemoteControl"));
snprintf (buf, sizeof (buf), "%d", _remote_control_id);
remote_control_node->add_property (X_("id"), buf);
node->add_child_nocopy (*remote_control_node);
@ -2270,22 +2270,21 @@ Route::_set_state (const XMLNode& node, bool call_base)
XMLNode *cmt = *(child->children().begin());
_comment = cmt->content();
} else if (child->name() == X_("extra")) {
} else if (child->name() == X_("Extra")) {
_extra_xml = new XMLNode (*child);
} else if (child->name() == X_("controllable") && (prop = child->property("name")) != 0) {
} else if (child->name() == X_("Controllable") && (prop = child->property("name")) != 0) {
if (prop->value() == "solo") {
_solo_control->set_state (*child);
_session.add_controllable (_solo_control);
}
else if (prop->value() == "mute") {
} else if (prop->value() == "mute") {
_mute_control->set_state (*child);
_session.add_controllable (_mute_control);
}
}
else if (child->name() == X_("remote_control")) {
else if (child->name() == X_("RemoteControl")) {
if ((prop = child->property (X_("id"))) != 0) {
int32_t x;
sscanf (prop->value().c_str(), "%d", &x);

View file

@ -1212,7 +1212,7 @@ Session::set_state (const XMLNode& node)
/* Object loading order:
Path
extra
Extra
Options/Config
MIDI Control // relies on data from Options/Config
Metadata
@ -1228,7 +1228,7 @@ Session::set_state (const XMLNode& node)
ControlProtocols
*/
if ((child = find_named_node (node, "extra")) != 0) {
if ((child = find_named_node (node, "Extra")) != 0) {
_extra_xml = new XMLNode (*child);
}