mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)
This commit is contained in:
parent
9b3b1d945f
commit
17ace643e4
94 changed files with 294 additions and 254 deletions
|
|
@ -741,7 +741,7 @@ ARDOUR_UI::configure_handler (GdkEventConfigure* /*conf*/)
|
|||
void
|
||||
ARDOUR_UI::set_transport_controllable_state (const XMLNode& node)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("roll")) != 0) {
|
||||
roll_controllable->set_id (prop->value());
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ ARDOUR_UI::setup_windows ()
|
|||
const XMLNode* mnode = main_window_settings ();
|
||||
|
||||
if (mnode) {
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
gint x = -1;
|
||||
gint y = -1;
|
||||
gint w = -1;
|
||||
|
|
|
|||
|
|
@ -1301,7 +1301,7 @@ AudioClock::set_session (Session *s)
|
|||
_session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_configuration_changed, this, _1), gui_context());
|
||||
_session->tempo_map().PropertyChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_property_changed, this, _1), gui_context());
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNode* node = _session->extra_xml (X_("ClockModes"));
|
||||
AudioClock::Mode amode;
|
||||
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ AutomationTimeAxisView::what_has_visible_automation (const boost::shared_ptr<Aut
|
|||
const XMLNode* gui_node = ac->extra_xml ("GUI");
|
||||
|
||||
if (gui_node) {
|
||||
const XMLProperty* prop = gui_node->property ("shown");
|
||||
XMLProperty const * prop = gui_node->property ("shown");
|
||||
if (prop) {
|
||||
if (string_is_affirmative (prop->value())) {
|
||||
visible.insert (i->first);
|
||||
|
|
|
|||
|
|
@ -2287,7 +2287,7 @@ Editor::set_edit_point_preference (EditPoint ep, bool force)
|
|||
int
|
||||
Editor::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
set_id (node);
|
||||
|
||||
Tabbable::set_state (node, version);
|
||||
|
|
@ -3873,7 +3873,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
|
|||
*/
|
||||
|
||||
int pos;
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
char buf[32];
|
||||
XMLNode* node = ARDOUR_UI::instance()->editor_settings();
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ Editor::store_ruler_visibility ()
|
|||
void
|
||||
Editor::restore_ruler_visibility ()
|
||||
{
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNode * node = _session->extra_xml (X_("RulerVisibility"));
|
||||
|
||||
no_ruler_shown_update = true;
|
||||
|
|
|
|||
|
|
@ -1970,9 +1970,9 @@ EngineControl::set_state (const XMLNode& root)
|
|||
{
|
||||
XMLNodeList clist, cclist;
|
||||
XMLNodeConstIterator citer, cciter;
|
||||
XMLNode* child;
|
||||
XMLNode* grandchild;
|
||||
XMLProperty* prop = NULL;
|
||||
XMLNode const * child;
|
||||
XMLNode const * grandchild;
|
||||
XMLProperty const * prop = NULL;
|
||||
|
||||
fprintf (stderr, "EngineControl::set_state\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ ExportVideoDialog::apply_state (TimeSelection &tme, bool range)
|
|||
|
||||
node = _session->extra_xml (X_("Videoexport"));
|
||||
if (node) {
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
prop = node->property (X_("ChangeGeometry"));
|
||||
if (prop) { scale_checkbox.set_active(atoi(prop->value())?true:false); }
|
||||
prop = node->property (X_("KeepAspect"));
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ GUIObjectState::get_string (const string& id, const string& prop_name, bool* emp
|
|||
return string ();
|
||||
}
|
||||
|
||||
const XMLProperty* p (i->second->property (prop_name));
|
||||
XMLProperty const * p (i->second->property (prop_name));
|
||||
if (!p) {
|
||||
if (empty) {
|
||||
*empty = true;
|
||||
|
|
@ -130,7 +130,7 @@ GUIObjectState::set_state (const XMLNode& node)
|
|||
if ((*i)->name() != X_("Object")) {
|
||||
continue;
|
||||
}
|
||||
const XMLProperty* prop = (*i)->property (X_("id"));
|
||||
XMLProperty const * prop = (*i)->property (X_("id"));
|
||||
if (!prop) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ ArdourKeyboard::get_state (void)
|
|||
int
|
||||
ArdourKeyboard::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("constraint-modifier")) != 0) {
|
||||
sscanf (prop->value().c_str(), "%d", &constraint_mod);
|
||||
|
|
|
|||
|
|
@ -1143,7 +1143,7 @@ LocationUI::clock_mode_from_session_instant_xml () const
|
|||
return AudioClock::Frames;
|
||||
}
|
||||
|
||||
XMLProperty* p = node->property (X_("clock-mode"));
|
||||
XMLProperty const * p = node->property (X_("clock-mode"));
|
||||
if (!p) {
|
||||
return ARDOUR_UI::instance()->secondary_clock->mode();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ Meterbridge::session_going_away ()
|
|||
int
|
||||
Meterbridge::set_state (const XMLNode& node)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNode* geometry;
|
||||
|
||||
m_width = default_width;
|
||||
|
|
@ -473,7 +473,7 @@ Meterbridge::set_state (const XMLNode& node)
|
|||
|
||||
if ((geometry = find_named_node (node, "geometry")) != 0) {
|
||||
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = geometry->property("x_size")) == 0) {
|
||||
prop = geometry->property ("x-size");
|
||||
|
|
|
|||
|
|
@ -1652,7 +1652,7 @@ private:
|
|||
int
|
||||
Mixer_UI::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
Tabbable::set_state (node, version);
|
||||
|
||||
|
|
@ -1754,7 +1754,7 @@ void
|
|||
Mixer_UI::pane_allocation_handler (Allocation&, Gtk::Paned* which)
|
||||
{
|
||||
int pos;
|
||||
XMLProperty* prop = 0;
|
||||
XMLProperty const * prop = 0;
|
||||
XMLNode* node = ARDOUR_UI::instance()->mixer_settings();
|
||||
XMLNode* geometry;
|
||||
int height;
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ ProcessorEntry::set_control_state (XMLNode const * node)
|
|||
|
||||
if (_plugin_display) {
|
||||
XMLNode* n = GUIObjectState::get_node (node, X_("InlineDisplay"));
|
||||
XMLProperty* p = n ? n->property (X_("visible")) : NULL;
|
||||
XMLProperty const * p = n ? n->property (X_("visible")) : NULL;
|
||||
if (p) {
|
||||
if (string_is_affirmative (p->value ())) {
|
||||
_plugin_display->show();
|
||||
|
|
@ -947,7 +947,7 @@ ProcessorEntry::Control::set_state (XMLNode const * node)
|
|||
{
|
||||
XMLNode* n = GUIObjectState::get_node (node, state_id ());
|
||||
if (n) {
|
||||
XMLProperty* p = n->property (X_("visible"));
|
||||
XMLProperty const * p = n->property (X_("visible"));
|
||||
set_visible (p && string_is_affirmative (p->value ()));
|
||||
} else {
|
||||
set_visible (false);
|
||||
|
|
@ -4160,7 +4160,7 @@ ProcessorWindowProxy::set_state (const XMLNode& node, int /*version*/)
|
|||
XMLNodeList children = node.children ();
|
||||
XMLNodeList::const_iterator i = children.begin ();
|
||||
while (i != children.end()) {
|
||||
XMLProperty* prop = (*i)->property (X_("name"));
|
||||
XMLProperty const * prop = (*i)->property (X_("name"));
|
||||
if ((*i)->name() == X_("Window") && prop && prop->value() == _name) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -4168,7 +4168,7 @@ ProcessorWindowProxy::set_state (const XMLNode& node, int /*version*/)
|
|||
}
|
||||
|
||||
if (i != children.end()) {
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
if ((prop = (*i)->property (X_("custom-ui"))) != 0) {
|
||||
want_custom = PBD::string_is_affirmative (prop->value ());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2646,7 +2646,7 @@ RouteTimeAxisView::set_underlay_state()
|
|||
continue;
|
||||
}
|
||||
|
||||
XMLProperty* prop = child_node->property ("id");
|
||||
XMLProperty const * prop = child_node->property ("id");
|
||||
if (prop) {
|
||||
PBD::ID id (prop->value());
|
||||
|
||||
|
|
@ -2688,7 +2688,7 @@ RouteTimeAxisView::add_underlay (StreamView* v, bool /*update_xml*/)
|
|||
}
|
||||
|
||||
XMLNode* node = underlay_xml_node->add_child("Underlay");
|
||||
XMLProperty* prop = node->add_property("id");
|
||||
XMLProperty const * prop = node->add_property("id");
|
||||
prop->set_value(v->trackview().route()->id().to_s());
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1365,7 +1365,7 @@ Selection::set_state (XMLNode const & node, int)
|
|||
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
|
||||
if ((*i)->name() == X_("RouteView")) {
|
||||
|
||||
XMLProperty* prop_id = (*i)->property (X_("id"));
|
||||
XMLProperty const * prop_id = (*i)->property (X_("id"));
|
||||
assert (prop_id);
|
||||
PBD::ID id (prop_id->value ());
|
||||
RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
|
||||
|
|
@ -1374,7 +1374,7 @@ Selection::set_state (XMLNode const & node, int)
|
|||
}
|
||||
|
||||
} else if ((*i)->name() == X_("Region")) {
|
||||
XMLProperty* prop_id = (*i)->property (X_("id"));
|
||||
XMLProperty const * prop_id = (*i)->property (X_("id"));
|
||||
assert (prop_id);
|
||||
PBD::ID id (prop_id->value ());
|
||||
|
||||
|
|
@ -1392,7 +1392,7 @@ Selection::set_state (XMLNode const & node, int)
|
|||
}
|
||||
|
||||
} else if ((*i)->name() == X_("MIDINote")) {
|
||||
XMLProperty* prop_region_id = (*i)->property (X_("region-id"));
|
||||
XMLProperty const * prop_region_id = (*i)->property (X_("region-id"));
|
||||
|
||||
assert (prop_region_id);
|
||||
|
||||
|
|
@ -1405,12 +1405,12 @@ Selection::set_state (XMLNode const & node, int)
|
|||
XMLNodeList children = (*i)->children ();
|
||||
|
||||
for (XMLNodeList::const_iterator ci = children.begin(); ci != children.end(); ++ci) {
|
||||
XMLProperty* prop_channel = (*ci)->property (X_("channel"));
|
||||
XMLProperty* prop_time = (*ci)->property (X_("time"));
|
||||
XMLProperty* prop_note = (*ci)->property (X_("note"));
|
||||
XMLProperty* prop_length = (*ci)->property (X_("length"));
|
||||
XMLProperty* prop_velocity = (*ci)->property (X_("velocity"));
|
||||
XMLProperty* prop_off_velocity = (*ci)->property (X_("off-velocity"));
|
||||
XMLProperty const * prop_channel = (*ci)->property (X_("channel"));
|
||||
XMLProperty const * prop_time = (*ci)->property (X_("time"));
|
||||
XMLProperty const * prop_note = (*ci)->property (X_("note"));
|
||||
XMLProperty const * prop_length = (*ci)->property (X_("length"));
|
||||
XMLProperty const * prop_velocity = (*ci)->property (X_("velocity"));
|
||||
XMLProperty const * prop_off_velocity = (*ci)->property (X_("off-velocity"));
|
||||
|
||||
assert (prop_channel);
|
||||
assert (prop_time);
|
||||
|
|
@ -1445,16 +1445,16 @@ Selection::set_state (XMLNode const & node, int)
|
|||
}
|
||||
|
||||
} else if ((*i)->name() == X_("ControlPoint")) {
|
||||
XMLProperty* prop_type = (*i)->property (X_("type"));
|
||||
XMLProperty const * prop_type = (*i)->property (X_("type"));
|
||||
|
||||
assert(prop_type);
|
||||
|
||||
if (prop_type->value () == "track") {
|
||||
|
||||
XMLProperty* prop_route_id = (*i)->property (X_("route-id"));
|
||||
XMLProperty* prop_alist_id = (*i)->property (X_("automation-list-id"));
|
||||
XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
|
||||
XMLProperty* prop_view_index = (*i)->property (X_("view-index"));
|
||||
XMLProperty const * prop_route_id = (*i)->property (X_("route-id"));
|
||||
XMLProperty const * prop_alist_id = (*i)->property (X_("automation-list-id"));
|
||||
XMLProperty const * prop_parameter = (*i)->property (X_("parameter"));
|
||||
XMLProperty const * prop_view_index = (*i)->property (X_("view-index"));
|
||||
|
||||
assert (prop_route_id);
|
||||
assert (prop_alist_id);
|
||||
|
|
@ -1484,8 +1484,8 @@ Selection::set_state (XMLNode const & node, int)
|
|||
add (cps);
|
||||
}
|
||||
} else if (prop_type->value () == "region") {
|
||||
XMLProperty* prop_region_id = (*i)->property (X_("region-id"));
|
||||
XMLProperty* prop_view_index = (*i)->property (X_("view-index"));
|
||||
XMLProperty const * prop_region_id = (*i)->property (X_("region-id"));
|
||||
XMLProperty const * prop_view_index = (*i)->property (X_("view-index"));
|
||||
|
||||
if (!prop_region_id || !prop_view_index) {
|
||||
continue;
|
||||
|
|
@ -1515,8 +1515,8 @@ Selection::set_state (XMLNode const & node, int)
|
|||
}
|
||||
|
||||
} else if ((*i)->name() == X_("AudioRange")) {
|
||||
XMLProperty* prop_start = (*i)->property (X_("start"));
|
||||
XMLProperty* prop_end = (*i)->property (X_("end"));
|
||||
XMLProperty const * prop_start = (*i)->property (X_("start"));
|
||||
XMLProperty const * prop_end = (*i)->property (X_("end"));
|
||||
|
||||
assert (prop_start);
|
||||
assert (prop_end);
|
||||
|
|
@ -1528,8 +1528,8 @@ Selection::set_state (XMLNode const & node, int)
|
|||
|
||||
} else if ((*i)->name() == X_("AutomationView")) {
|
||||
|
||||
XMLProperty* prop_id = (*i)->property (X_("id"));
|
||||
XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
|
||||
XMLProperty const * prop_id = (*i)->property (X_("id"));
|
||||
XMLProperty const * prop_parameter = (*i)->property (X_("parameter"));
|
||||
|
||||
assert (prop_id);
|
||||
assert (prop_parameter);
|
||||
|
|
@ -1552,8 +1552,8 @@ Selection::set_state (XMLNode const & node, int)
|
|||
|
||||
} else if ((*i)->name() == X_("Marker")) {
|
||||
|
||||
XMLProperty* prop_id = (*i)->property (X_("id"));
|
||||
XMLProperty* prop_start = (*i)->property (X_("start"));
|
||||
XMLProperty const * prop_id = (*i)->property (X_("id"));
|
||||
XMLProperty const * prop_start = (*i)->property (X_("start"));
|
||||
assert (prop_id);
|
||||
assert (prop_start);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ SelectionMemento::get_state () {
|
|||
int
|
||||
SelectionMemento::set_state (const XMLNode& node, int /*version*/) {
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
PublicEditor& editor = PublicEditor::instance();
|
||||
if (node.name() != X_("SelectionMemento")) {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -534,11 +534,12 @@ UIConfiguration::load_color_aliases (XMLNode const & node)
|
|||
color_aliases.clear ();
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() != X_("ColorAlias")) {
|
||||
XMLNode const * child = *niter;
|
||||
if (child->name() != X_("ColorAlias")) {
|
||||
continue;
|
||||
}
|
||||
name = (*niter)->property (X_("name"));
|
||||
alias = (*niter)->property (X_("alias"));
|
||||
name = child->property (X_("name"));
|
||||
alias = child->property (X_("alias"));
|
||||
|
||||
if (name && alias) {
|
||||
color_aliases.insert (make_pair (name->value(), alias->value()));
|
||||
|
|
@ -557,11 +558,12 @@ UIConfiguration::load_colors (XMLNode const & node)
|
|||
colors.clear ();
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() != X_("Color")) {
|
||||
XMLNode const * child = *niter;
|
||||
if (child->name() != X_("Color")) {
|
||||
continue;
|
||||
}
|
||||
name = (*niter)->property (X_("name"));
|
||||
color = (*niter)->property (X_("value"));
|
||||
name = child->property (X_("name"));
|
||||
color = child->property (X_("value"));
|
||||
|
||||
if (name && color) {
|
||||
ArdourCanvas::Color c;
|
||||
|
|
@ -583,12 +585,13 @@ UIConfiguration::load_modifiers (XMLNode const & node)
|
|||
modifiers.clear ();
|
||||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() != X_("Modifier")) {
|
||||
XMLNode const * child = *niter;
|
||||
if (child->name() != X_("Modifier")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
name = (*niter)->property (X_("name"));
|
||||
mod = (*niter)->property (X_("modifier"));
|
||||
name = child->property (X_("name"));
|
||||
mod = child->property (X_("modifier"));
|
||||
|
||||
if (name && mod) {
|
||||
SVAModifier svam (mod->value());
|
||||
|
|
|
|||
|
|
@ -155,38 +155,38 @@ VideoTimeLine::set_session (ARDOUR::Session *s)
|
|||
|
||||
set_id(*node);
|
||||
|
||||
const XMLProperty* proph = node->property (X_("Height"));
|
||||
XMLProperty const * proph = node->property (X_("Height"));
|
||||
if (proph) {
|
||||
editor->set_video_timeline_height(atoi(proph->value()));
|
||||
}
|
||||
#if 0 /* TODO THINK: set FPS first time only ?! */
|
||||
const XMLProperty* propasfps = node->property (X_("AutoFPS"));
|
||||
XMLProperty const * propasfps = node->property (X_("AutoFPS"));
|
||||
if (propasfps) {
|
||||
auto_set_session_fps = atoi(propasfps->value())?true:false;
|
||||
}
|
||||
#endif
|
||||
|
||||
const XMLProperty* propoffset = node->property (X_("VideoOffset"));
|
||||
XMLProperty const * propoffset = node->property (X_("VideoOffset"));
|
||||
if (propoffset) {
|
||||
video_offset = atoll(propoffset->value());
|
||||
video_offset_p = video_offset;
|
||||
}
|
||||
|
||||
const XMLProperty* proplock = node->property (X_("VideoOffsetLock"));
|
||||
XMLProperty const * proplock = node->property (X_("VideoOffsetLock"));
|
||||
if (proplock) {
|
||||
video_offset_lock = atoi(proplock->value())?true:false;
|
||||
}
|
||||
|
||||
const XMLProperty* localfile = node->property (X_("LocalFile"));
|
||||
XMLProperty const * localfile = node->property (X_("LocalFile"));
|
||||
if (localfile) {
|
||||
local_file = atoi(localfile->value())?true:false;
|
||||
}
|
||||
|
||||
const XMLProperty* propf = node->property (X_("Filename"));
|
||||
XMLProperty const * propf = node->property (X_("Filename"));
|
||||
video_file_info(propf->value(), local_file);
|
||||
|
||||
if ((node = _session->extra_xml (X_("Videomonitor")))) {
|
||||
const XMLProperty* prop = node->property (X_("active"));
|
||||
XMLProperty const * prop = node->property (X_("active"));
|
||||
if (prop && prop->value() == "yes" && found_xjadeo() && !video_filename.empty() && local_file) {
|
||||
open_video_monitor();
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ int
|
|||
VideoTimeLine::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
LocaleGuard lg (X_("C"));
|
||||
const XMLProperty* propoffset = node.property (X_("VideoOffset"));
|
||||
XMLProperty const * propoffset = node.property (X_("VideoOffset"));
|
||||
if (propoffset) {
|
||||
video_offset = atoll(propoffset->value());
|
||||
}
|
||||
|
|
@ -804,7 +804,7 @@ VideoTimeLine::open_video_monitor() {
|
|||
/* load mask from Session */
|
||||
XMLNode* node = _session->extra_xml (X_("XJRestoreSettings"));
|
||||
if (node) {
|
||||
const XMLProperty* prop = node->property (X_("mask"));
|
||||
XMLProperty const * prop = node->property (X_("mask"));
|
||||
if (prop) {
|
||||
xj_settings_mask = atoi(prop->value());
|
||||
}
|
||||
|
|
@ -825,7 +825,7 @@ VideoTimeLine::open_video_monitor() {
|
|||
if (_session) {
|
||||
XMLNode* node = _session->extra_xml (X_("Videomonitor"));
|
||||
if (node) {
|
||||
const XMLProperty* prop = node->property (X_("active"));
|
||||
XMLProperty const * prop = node->property (X_("active"));
|
||||
if (prop && prop->value() != "yes") _session->set_dirty ();
|
||||
} else {
|
||||
_session->set_dirty ();
|
||||
|
|
|
|||
|
|
@ -1932,7 +1932,7 @@ AudioDiskstream::get_state ()
|
|||
int
|
||||
AudioDiskstream::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
uint32_t nchans = 1;
|
||||
|
|
@ -2260,7 +2260,7 @@ AudioDiskstream::capture_buffer_load () const
|
|||
int
|
||||
AudioDiskstream::use_pending_capture_data (XMLNode& node)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
boost::shared_ptr<AudioFileSource> fs;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden
|
|||
: Playlist (session, node, DataType::AUDIO, hidden)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
const XMLProperty* prop = node.property("type");
|
||||
XMLProperty const * prop = node.property("type");
|
||||
assert(!prop || DataType(prop->value()) == DataType::AUDIO);
|
||||
#endif
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
|
|||
for (XMLNodeConstIterator i = children.begin(); i != children.end(); ++i) {
|
||||
if ((*i)->name() == X_("Crossfade")) {
|
||||
|
||||
XMLProperty* p = (*i)->property (X_("active"));
|
||||
XMLProperty const * p = (*i)->property (X_("active"));
|
||||
assert (p);
|
||||
|
||||
if (!string_is_affirmative (p->value())) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ AudioPlaylistImportHandler::AudioPlaylistImportHandler (XMLTree const & source,
|
|||
|
||||
XMLNodeList const & pl_children = playlists->children();
|
||||
for (XMLNodeList::const_iterator it = pl_children.begin(); it != pl_children.end(); ++it) {
|
||||
const XMLProperty* type = (*it)->property("type");
|
||||
XMLProperty const * type = (*it)->property("type");
|
||||
if ( !type || type->value() == "audio" ) {
|
||||
try {
|
||||
elements.push_back (ElementPtr ( new AudioPlaylistImporter (source, session, *this, **it)));
|
||||
|
|
@ -75,7 +75,7 @@ AudioPlaylistImportHandler::get_regions (XMLNode const & node, ElementList & lis
|
|||
}
|
||||
|
||||
void
|
||||
AudioPlaylistImportHandler::update_region_id (XMLProperty* id_prop)
|
||||
AudioPlaylistImportHandler::update_region_id (XMLProperty * id_prop)
|
||||
{
|
||||
PBD::ID old_id (id_prop->value());
|
||||
PBD::ID new_id (region_handler.get_new_id (old_id));
|
||||
|
|
@ -178,7 +178,7 @@ AudioPlaylistImporter::_prepare_move ()
|
|||
name = rename_pair.second;
|
||||
}
|
||||
|
||||
XMLProperty* p = xml_playlist.property ("name");
|
||||
XMLProperty * p = xml_playlist.property ("name");
|
||||
if (!p) {
|
||||
error << _("badly-formed XML in imported playlist") << endmsg;
|
||||
return false;
|
||||
|
|
@ -219,8 +219,8 @@ AudioPlaylistImporter::_move ()
|
|||
// Update region ids in crossfades
|
||||
XMLNodeList crossfades = xml_playlist.children("Crossfade");
|
||||
for (XMLNodeIterator it = crossfades.begin(); it != crossfades.end(); ++it) {
|
||||
XMLProperty* in = (*it)->property("in");
|
||||
XMLProperty* out = (*it)->property("out");
|
||||
XMLProperty * in = (*it)->property("in");
|
||||
XMLProperty * out = (*it)->property("out");
|
||||
if (!in || !out) {
|
||||
error << string_compose (X_("AudioPlaylistImporter (%1): did not find the \"in\" or \"out\" property from a crossfade"), name) << endmsg;
|
||||
continue; // or fatal?
|
||||
|
|
@ -230,12 +230,12 @@ AudioPlaylistImporter::_move ()
|
|||
handler.update_region_id (out);
|
||||
|
||||
// rate convert length and position
|
||||
XMLProperty* length = (*it)->property("length");
|
||||
XMLProperty * length = (*it)->property("length");
|
||||
if (length) {
|
||||
length->set_value (rate_convert_samples (length->value()));
|
||||
}
|
||||
|
||||
XMLProperty* position = (*it)->property("position");
|
||||
XMLProperty * position = (*it)->property("position");
|
||||
if (position) {
|
||||
position->set_value (rate_convert_samples (position->value()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_desc
|
|||
}
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
pair<framepos_t,framepos_t> extent = _playlist->get_extent();
|
||||
|
||||
AudioSource::_length = extent.second - extent.first;
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ AudioRegionImporter::parse_source_xml ()
|
|||
char buf[128];
|
||||
std::string source_dir(get_sound_dir (source));
|
||||
XMLNode * source_node;
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
// Get XML for sources
|
||||
if (!(source_node = source.root()->child (X_("Sources")))) {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ AudioTrack::deprecated_use_diskstream_connections ()
|
|||
return 0;
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNode& node (*diskstream->deprecated_io_node);
|
||||
|
||||
/* don't do this more than once. */
|
||||
|
|
@ -200,7 +200,7 @@ AudioTrack::deprecated_use_diskstream_connections ()
|
|||
int
|
||||
AudioTrack::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property (X_("mode"))) != 0) {
|
||||
_mode = TrackMode (string_2_enum (prop->value(), _mode));
|
||||
|
|
@ -266,7 +266,7 @@ void
|
|||
AudioTrack::set_state_part_two ()
|
||||
{
|
||||
XMLNode* fnode;
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
/* This is called after all session state has been restored but before
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ AudioTrackImportHandler::AudioTrackImportHandler (XMLTree const & source, Sessio
|
|||
|
||||
XMLNodeList const & route_list = routes->children();
|
||||
for (XMLNodeList::const_iterator it = route_list.begin(); it != route_list.end(); ++it) {
|
||||
const XMLProperty* type = (*it)->property("default-type");
|
||||
XMLProperty const * type = (*it)->property("default-type");
|
||||
if ( (!type || type->value() == "audio") && ((*it)->property ("diskstream") != 0 || (*it)->property ("diskstream-id") != 0)) {
|
||||
try {
|
||||
elements.push_back (ElementPtr ( new AudioTrackImporter (source, session, *this, **it, pl_handler)));
|
||||
|
|
@ -254,7 +254,7 @@ AudioTrackImporter::_prepare_move ()
|
|||
return false;
|
||||
}
|
||||
|
||||
XMLProperty* p = c->property ("name");
|
||||
XMLProperty * p = c->property ("name");
|
||||
if (!p) {
|
||||
error << _("badly-formed XML in imported track") << endmsg;
|
||||
return false;
|
||||
|
|
@ -289,7 +289,7 @@ AudioTrackImporter::_move ()
|
|||
}
|
||||
|
||||
boost::shared_ptr<XMLNode> ds_node = ds_node_list->front();
|
||||
XMLProperty* p = ds_node->property (X_("id"));
|
||||
XMLProperty * p = ds_node->property (X_("id"));
|
||||
assert (p);
|
||||
p->set_value (new_ds_id.to_s());
|
||||
|
||||
|
|
|
|||
|
|
@ -3165,7 +3165,7 @@ AUPluginInfo::load_cached_info ()
|
|||
}
|
||||
|
||||
//initial version has incorrectly stored i/o info, and/or garbage chars.
|
||||
const XMLProperty* version = root->property(X_("version"));
|
||||
XMLProperty const * version = root->property(X_("version"));
|
||||
if (! ((version != NULL) && (version->value() == X_(AU_CACHE_VERSION)))) {
|
||||
error << "au_cache is not correct version. AU plugins will be re-scanned" << endmsg;
|
||||
return -1;
|
||||
|
|
@ -3183,7 +3183,7 @@ AUPluginInfo::load_cached_info ()
|
|||
|
||||
const XMLNode* gchild;
|
||||
const XMLNodeList gchildren = child->children();
|
||||
const XMLProperty* prop = child->property (X_("id"));
|
||||
XMLProperty const * prop = child->property (X_("id"));
|
||||
|
||||
if (!prop) {
|
||||
continue;
|
||||
|
|
@ -3221,8 +3221,8 @@ AUPluginInfo::load_cached_info ()
|
|||
|
||||
int in;
|
||||
int out;
|
||||
const XMLProperty* iprop;
|
||||
const XMLProperty* oprop;
|
||||
XMLProperty const * iprop;
|
||||
XMLProperty const * oprop;
|
||||
|
||||
if (((iprop = gchild->property (X_("in"))) != 0) &&
|
||||
((oprop = gchild->property (X_("out"))) != 0)) {
|
||||
|
|
|
|||
|
|
@ -840,7 +840,7 @@ int
|
|||
AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_changed, bool send)
|
||||
{
|
||||
const XMLNodeList& nlist = node.children();
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
LocaleGuard lg (X_("C"));
|
||||
boost::shared_ptr<Playlist> the_playlist (_playlist.lock());
|
||||
|
||||
|
|
@ -871,7 +871,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
|
|||
|
||||
for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
XMLNode *child;
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
child = (*niter);
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ AudioSource::get_state ()
|
|||
int
|
||||
AudioSource::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("captured-for")) != 0) {
|
||||
_captured_for = prop->value();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ Automatable::~Automatable ()
|
|||
int
|
||||
Automatable::old_set_automation_state (const XMLNode& node)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("path")) != 0) {
|
||||
load_automation (prop->value());
|
||||
|
|
@ -220,7 +220,7 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le
|
|||
|
||||
if ((*niter)->name() == "AutomationList") {
|
||||
|
||||
const XMLProperty* id_prop = (*niter)->property("automation-id");
|
||||
XMLProperty const * id_prop = (*niter)->property("automation-id");
|
||||
|
||||
Evoral::Parameter param = (id_prop
|
||||
? EventTypeMap::instance().from_symbol(id_prop->value())
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ AutomationList::set_state (const XMLNode& node, int version)
|
|||
XMLNodeList nlist = node.children();
|
||||
XMLNode* nsos;
|
||||
XMLNodeIterator niter;
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if (node.name() == X_("events")) {
|
||||
/* partial state setting*/
|
||||
|
|
@ -443,7 +443,7 @@ AutomationList::set_state (const XMLNode& node, int version)
|
|||
|
||||
const XMLNodeList& elist = node.children();
|
||||
XMLNodeConstIterator i;
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
pframes_t x;
|
||||
double y;
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ ControlProtocolManager::instantiate (ControlProtocolInfo& cpi)
|
|||
|
||||
cpi.descriptor = get_descriptor (cpi.path);
|
||||
|
||||
DEBUG_TRACE (DEBUG::ControlProtocols, string_compose ("instantiating %1\n", cpi.name));
|
||||
DEBUG_TRACE (DEBUG::ControlProtocols, string_compose ("instantiating %1\n", cpi.name));
|
||||
|
||||
if (cpi.descriptor == 0) {
|
||||
error << string_compose (_("control protocol name \"%1\" has no descriptor"), cpi.name) << endmsg;
|
||||
|
|
@ -410,22 +410,24 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/)
|
|||
{
|
||||
XMLNodeList clist;
|
||||
XMLNodeConstIterator citer;
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (protocols_lock);
|
||||
|
||||
clist = node.children();
|
||||
|
||||
for (citer = clist.begin(); citer != clist.end(); ++citer) {
|
||||
if ((*citer)->name() == X_("Protocol")) {
|
||||
XMLNode const * child = *citer;
|
||||
|
||||
if ((prop = (*citer)->property (X_("active"))) == 0) {
|
||||
if (child->name() == X_("Protocol")) {
|
||||
|
||||
if ((prop = child->property (X_("active"))) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bool active = string_is_affirmative (prop->value());
|
||||
|
||||
if ((prop = (*citer)->property (X_("name"))) == 0) {
|
||||
if ((prop = child->property (X_("name"))) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ Delivery::state (bool full_state)
|
|||
int
|
||||
Delivery::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if (IOProcessor::set_state (node, version)) {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ Diskstream::get_state ()
|
|||
int
|
||||
Diskstream::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("name")) != 0) {
|
||||
_name = prop->value();
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ ElementImporter::ElementImporter (XMLTree const & source, ARDOUR::Session & sess
|
|||
_broken (false)
|
||||
{
|
||||
// Get samplerate
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
prop = source.root()->property ("sample-rate");
|
||||
if (prop) {
|
||||
std::istringstream iss (prop->value());
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ EngineStateController::_deserialize_and_load_engine_states ()
|
|||
|
||||
XMLNode* state_node = *state_node_iter;
|
||||
StatePtr engine_state (new State);
|
||||
XMLProperty* prop = NULL;
|
||||
XMLProperty const * prop = NULL;
|
||||
|
||||
if ((prop = state_node->property ("backend-name")) == 0) {
|
||||
continue;
|
||||
|
|
@ -302,7 +302,7 @@ EngineStateController::_deserialize_and_load_midi_port_states ()
|
|||
for (; input_state_node_iter != input_state_nodes.end (); ++input_state_node_iter) {
|
||||
|
||||
XMLNode* input_state_node = *input_state_node_iter;
|
||||
XMLProperty* prop = NULL;
|
||||
XMLProperty const * prop = NULL;
|
||||
|
||||
if (input_state_node->name () != "input") {
|
||||
continue;
|
||||
|
|
@ -341,7 +341,7 @@ EngineStateController::_deserialize_and_load_midi_port_states ()
|
|||
for (; output_state_node_iter != output_state_nodes.end (); ++output_state_node_iter) {
|
||||
|
||||
XMLNode* output_state_node = *output_state_node_iter;
|
||||
XMLProperty* prop = NULL;
|
||||
XMLProperty const * prop = NULL;
|
||||
|
||||
if (output_state_node->name () != "output") {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ PortExportChannel::get_state (XMLNode * node) const
|
|||
void
|
||||
PortExportChannel::set_state (XMLNode * node, Session & session)
|
||||
{
|
||||
XMLProperty * prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeList xml_ports = node->children ("Port");
|
||||
for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) {
|
||||
if ((prop = (*it)->property ("name"))) {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ int
|
|||
ExportFilename::set_state (const XMLNode & node)
|
||||
{
|
||||
XMLNode * child;
|
||||
XMLProperty * prop;
|
||||
XMLProperty const * prop;
|
||||
FieldPair pair;
|
||||
|
||||
child = node.child ("Folder");
|
||||
|
|
@ -372,7 +372,7 @@ ExportFilename::get_field (XMLNode const & node, string const & name)
|
|||
XMLNodeList children = node.children();
|
||||
|
||||
for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) {
|
||||
XMLProperty * prop = (*it)->property ("name");
|
||||
XMLProperty const * prop = (*it)->property ("name");
|
||||
if (prop && !prop->value().compare (name)) {
|
||||
|
||||
prop = (*it)->property ("enabled");
|
||||
|
|
|
|||
|
|
@ -700,7 +700,7 @@ ExportFormatSpecification::get_option (XMLNode const * node, std::string const &
|
|||
XMLNodeList list (node->children ("Option"));
|
||||
|
||||
for (XMLNodeList::iterator it = list.begin(); it != list.end(); ++it) {
|
||||
XMLProperty * prop = (*it)->property ("name");
|
||||
XMLProperty const * prop = (*it)->property ("name");
|
||||
if (prop && !name.compare (prop->value())) {
|
||||
prop = (*it)->property ("value");
|
||||
if (prop) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ ExportPreset::ExportPreset (string filename, Session & s) :
|
|||
{
|
||||
XMLNode * root;
|
||||
if ((root = global.root())) {
|
||||
XMLProperty * prop;
|
||||
XMLProperty const * prop;
|
||||
if ((prop = root->property ("id"))) {
|
||||
set_id (prop->value());
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ ExportPreset::get_instant_xml () const
|
|||
if ((instant_xml = session.instant_xml ("ExportPresets"))) {
|
||||
XMLNodeList children = instant_xml->children ("ExportPreset");
|
||||
for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) {
|
||||
XMLProperty * prop;
|
||||
XMLProperty const * prop;
|
||||
if ((prop = (*it)->property ("id")) && _id == PBD::UUID(prop->value())) {
|
||||
return *it;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ ExportProfileManager::init_formats (XMLNodeList nodes)
|
|||
ExportProfileManager::FormatStatePtr
|
||||
ExportProfileManager::deserialize_format (XMLNode & root)
|
||||
{
|
||||
XMLProperty * prop;
|
||||
XMLProperty const * prop;
|
||||
PBD::UUID id;
|
||||
|
||||
if ((prop = root.property ("id"))) {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ FileSource::init (const string& pathstr, bool must_exist)
|
|||
int
|
||||
FileSource::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property (X_("channel"))) != 0) {
|
||||
_channel = atoi (prop->value());
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ InternalSend::get_state()
|
|||
int
|
||||
InternalSend::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
init_gain ();
|
||||
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ IO::set_state (const XMLNode& node, int version)
|
|||
*/
|
||||
assert (version >= 3000);
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeConstIterator iter;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
|
|
@ -656,7 +656,7 @@ IO::set_state (const XMLNode& node, int version)
|
|||
int
|
||||
IO::set_state_2X (const XMLNode& node, int version, bool in)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeConstIterator iter;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
|
|
@ -928,7 +928,7 @@ IO::make_connections (const XMLNode& node, int version, bool in)
|
|||
return make_connections_2X (node, version, in);
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
for (XMLNodeConstIterator i = node.children().begin(); i != node.children().end(); ++i) {
|
||||
|
||||
|
|
@ -989,7 +989,7 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name)
|
|||
the name of the thing we're applying it to.
|
||||
*/
|
||||
|
||||
XMLProperty* prop;
|
||||
XMLProperty * prop;
|
||||
XMLNodeList children = node.children();
|
||||
|
||||
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
|
||||
|
|
@ -1020,7 +1020,7 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name)
|
|||
int
|
||||
IO::make_connections_2X (const XMLNode& node, int /*version*/, bool in)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
/* XXX: bundles ("connections" as was) */
|
||||
|
||||
|
|
@ -1596,7 +1596,7 @@ IO::bundle_channel_name (uint32_t c, uint32_t n, DataType t) const
|
|||
string
|
||||
IO::name_from_state (const XMLNode& node)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("name")) != 0) {
|
||||
return prop->value();
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
|
|||
return set_state_2X (node, version);
|
||||
}
|
||||
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
const XMLNode *io_node = 0;
|
||||
|
||||
Processor::set_state(node, version);
|
||||
|
|
@ -170,7 +170,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
|
|||
|
||||
if (_own_input && _input) {
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
if ((prop = (*niter)->property ("name")) != 0) {
|
||||
if (_name == prop->value()) {
|
||||
if ((prop = (*niter)->property ("direction")) != 0) {
|
||||
|
|
@ -200,7 +200,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
|
|||
if (_own_output && _output) {
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() == "IO") {
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
if ((prop = (*niter)->property ("name")) != 0) {
|
||||
if (_name == prop->value()) {
|
||||
if ((prop = (*niter)->property ("direction")) != 0) {
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version)
|
|||
|
||||
#ifndef NO_PLUGIN_STATE
|
||||
XMLNodeList nodes;
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeConstIterator iter;
|
||||
XMLNode *child;
|
||||
const char *port;
|
||||
|
|
@ -424,7 +424,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */)
|
|||
{
|
||||
#ifndef NO_PLUGIN_STATE
|
||||
XMLNodeList nodes;
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeConstIterator iter;
|
||||
XMLNode *child;
|
||||
const char *port;
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ Location::get_state ()
|
|||
int
|
||||
Location::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
XMLNodeList cd_list = node.children();
|
||||
XMLNodeConstIterator cd_iter;
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ LuaProc::set_state (const XMLNode& node, int version)
|
|||
{
|
||||
#ifndef NO_PLUGIN_STATE
|
||||
XMLNodeList nodes;
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeConstIterator iter;
|
||||
XMLNode *child;
|
||||
const char *value;
|
||||
|
|
@ -1067,7 +1067,7 @@ LuaProc::load_preset (PresetRecord r)
|
|||
|
||||
XMLNode* root = t->root ();
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
assert (label);
|
||||
if (label->value() != r.label) {
|
||||
continue;
|
||||
|
|
@ -1075,8 +1075,8 @@ LuaProc::load_preset (PresetRecord r)
|
|||
|
||||
for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) {
|
||||
if ((*j)->name() == X_("Parameter")) {
|
||||
XMLProperty* index = (*j)->property (X_("index"));
|
||||
XMLProperty* value = (*j)->property (X_("value"));
|
||||
XMLProperty const * index = (*j)->property (X_("index"));
|
||||
XMLProperty const * value = (*j)->property (X_("value"));
|
||||
assert (index);
|
||||
assert (value);
|
||||
set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ()));
|
||||
|
|
@ -1139,8 +1139,8 @@ LuaProc::find_presets ()
|
|||
XMLNode* root = t->root ();
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
|
||||
XMLProperty* uri = (*i)->property (X_("uri"));
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * uri = (*i)->property (X_("uri"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
|
||||
assert (uri);
|
||||
assert (label);
|
||||
|
|
@ -1207,8 +1207,8 @@ LuaPluginInfo::get_presets (bool /*user_only*/) const
|
|||
if (t->read ()) {
|
||||
XMLNode* root = t->root ();
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
XMLProperty* uri = (*i)->property (X_("uri"));
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * uri = (*i)->property (X_("uri"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
p.push_back (Plugin::PresetRecord (uri->value(), label->value(), true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1800,7 +1800,7 @@ int
|
|||
LV2Plugin::set_state(const XMLNode& node, int version)
|
||||
{
|
||||
XMLNodeList nodes;
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNodeConstIterator iter;
|
||||
XMLNode* child;
|
||||
const char* sym;
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ LXVSTPluginInfo::get_presets (bool user_only) const
|
|||
if (t->read ()) { // TODO read names only. skip parsing the actual data
|
||||
XMLNode* root = t->root ();
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
XMLProperty* uri = (*i)->property (X_("uri"));
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * uri = (*i)->property (X_("uri"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
p.push_back (Plugin::PresetRecord (uri->value(), label->value(), true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ MidiAutomationListBinder::MidiAutomationListBinder (boost::shared_ptr<MidiSource
|
|||
MidiAutomationListBinder::MidiAutomationListBinder (XMLNode* node, Session::SourceMap const & sources)
|
||||
: _parameter (0, 0, 0)
|
||||
{
|
||||
XMLProperty* source = node->property ("source-id");
|
||||
XMLProperty const * source = node->property ("source-id");
|
||||
assert (source);
|
||||
|
||||
XMLProperty* parameter = node->property ("parameter");
|
||||
XMLProperty const * parameter = node->property ("parameter");
|
||||
assert (parameter);
|
||||
|
||||
Session::SourceMap::const_iterator i = sources.find (PBD::ID (source->value()));
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ Evoral::Sequence<MidiModel::TimeType>::NotePtr
|
|||
MidiModel::NoteDiffCommand::unmarshal_note (XMLNode *xml_note)
|
||||
{
|
||||
unsigned int note;
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
unsigned int channel;
|
||||
MidiModel::TimeType time;
|
||||
MidiModel::TimeType length;
|
||||
|
|
@ -599,7 +599,7 @@ MidiModel::NoteDiffCommand::marshal_change (const NoteChange& change)
|
|||
MidiModel::NoteDiffCommand::NoteChange
|
||||
MidiModel::NoteDiffCommand::unmarshal_change (XMLNode *xml_change)
|
||||
{
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
NoteChange change;
|
||||
change.note_id = 0;
|
||||
|
||||
|
|
@ -876,7 +876,7 @@ MidiModel::SysExDiffCommand::marshal_change (const Change& change)
|
|||
MidiModel::SysExDiffCommand::Change
|
||||
MidiModel::SysExDiffCommand::unmarshal_change (XMLNode *xml_change)
|
||||
{
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
Change change;
|
||||
|
||||
if ((prop = xml_change->property ("property")) != 0) {
|
||||
|
|
@ -1235,8 +1235,8 @@ MidiModel::PatchChangeDiffCommand::marshal_change (const Change& c)
|
|||
MidiModel::PatchChangePtr
|
||||
MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
|
||||
{
|
||||
XMLProperty* prop;
|
||||
XMLProperty* prop_id;
|
||||
XMLProperty const * prop;
|
||||
XMLProperty const * prop_id;
|
||||
Evoral::event_id_t id = 0;
|
||||
Evoral::Beats time = Evoral::Beats();
|
||||
int channel = 0;
|
||||
|
|
@ -1277,7 +1277,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
|
|||
MidiModel::PatchChangeDiffCommand::Change
|
||||
MidiModel::PatchChangeDiffCommand::unmarshal_change (XMLNode* n)
|
||||
{
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
Change c;
|
||||
int an_int;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden)
|
|||
, _read_end(0)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
const XMLProperty* prop = node.property("type");
|
||||
XMLProperty const * prop = node.property("type");
|
||||
assert(prop && DataType(prop->value()) == DataType::MIDI);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */)
|
|||
return -1;
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property (X_("program"))) == 0) {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ MidiSource::get_state ()
|
|||
int
|
||||
MidiSource::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
if ((prop = node.property ("captured-for")) != 0) {
|
||||
_captured_for = prop->value();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ MidiTrack::midi_diskstream() const
|
|||
int
|
||||
MidiTrack::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
/* This must happen before Track::set_state(), as there will be a buffer
|
||||
fill during that call, and we must fill buffers using the correct
|
||||
|
|
@ -272,7 +272,7 @@ void
|
|||
MidiTrack::set_state_part_two ()
|
||||
{
|
||||
XMLNode* fnode;
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
/* This is called after all session state has been restored but before
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ MidiPortManager::create_ports ()
|
|||
void
|
||||
MidiPortManager::set_midi_port_states (const XMLNodeList&nodes)
|
||||
{
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
typedef map<std::string,boost::shared_ptr<Port> > PortMap;
|
||||
PortMap ports;
|
||||
const int version = 0;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
|
|||
return ret;
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property (X_("type"))) == 0) {
|
||||
error << string_compose (X_("programming error: %1"), X_("MonitorProcessor XML settings have no type information"))
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ MuteMaster::set_mute_points (MutePoint mp)
|
|||
int
|
||||
MuteMaster::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("mute-point")) != 0) {
|
||||
_mute_point = (MutePoint) string_2_enum (prop->value(), _mute_point);
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ Pannable::set_state (const XMLNode& root, int version)
|
|||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((*niter)->name() == Controllable::xml_node_name) {
|
||||
const XMLProperty* prop = (*niter)->property (X_("name"));
|
||||
XMLProperty const * prop = (*niter)->property (X_("name"));
|
||||
|
||||
if (!prop) {
|
||||
continue;
|
||||
|
|
@ -235,7 +235,7 @@ Pannable::set_state (const XMLNode& root, int version)
|
|||
set_automation_xml_state (**niter, PanAzimuthAutomation);
|
||||
|
||||
} else {
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
/* old school (alpha1-6) XML info */
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ PannerShell::set_state (const XMLNode& node, int version)
|
|||
{
|
||||
XMLNodeList nlist = node.children ();
|
||||
XMLNodeConstIterator niter;
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
if ((prop = node.property (X_("bypassed"))) != 0) {
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide
|
|||
, _type(type)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
const XMLProperty* prop = node.property("type");
|
||||
XMLProperty const * prop = node.property("type");
|
||||
assert(!prop || DataType(prop->value()) == _type);
|
||||
#endif
|
||||
|
||||
|
|
@ -2156,7 +2156,7 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
|
|||
XMLNodeConstIterator niter;
|
||||
XMLPropertyList plist;
|
||||
XMLPropertyConstIterator piter;
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
boost::shared_ptr<Region> region;
|
||||
string region_name;
|
||||
bool seen_region_nodes = false;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ PBD::Signal2<void,boost::shared_ptr<Playlist>, bool> PlaylistFactory::PlaylistCr
|
|||
boost::shared_ptr<Playlist>
|
||||
PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden, bool unused)
|
||||
{
|
||||
const XMLProperty* type = node.property("type");
|
||||
XMLProperty const * type = node.property("type");
|
||||
|
||||
boost::shared_ptr<Playlist> pl;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ PlaylistSource::set_state (const XMLNode& node, int /*version*/)
|
|||
{
|
||||
/* check that we have a playlist ID */
|
||||
|
||||
const XMLProperty *prop = node.property (X_("playlist"));
|
||||
XMLProperty const * prop = node.property (X_("playlist"));
|
||||
|
||||
if (!prop) {
|
||||
error << _("No playlist ID in PlaylistSource XML!") << endmsg;
|
||||
|
|
|
|||
|
|
@ -2006,7 +2006,7 @@ PluginInsert::set_control_ids (const XMLNode& node, int version)
|
|||
|
||||
for (iter = nlist.begin(); iter != nlist.end(); ++iter) {
|
||||
if ((*iter)->name() == Controllable::xml_node_name) {
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
uint32_t p = (uint32_t)-1;
|
||||
#ifdef LV2_SUPPORT
|
||||
|
|
@ -2047,7 +2047,7 @@ PluginInsert::set_state(const XMLNode& node, int version)
|
|||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
XMLPropertyList plist;
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
ARDOUR::PluginType type;
|
||||
|
||||
if ((prop = node.property ("type")) == 0) {
|
||||
|
|
@ -2329,7 +2329,7 @@ PluginInsert::set_parameter_state_2X (const XMLNode& node, int version)
|
|||
}
|
||||
|
||||
XMLNodeList cnodes;
|
||||
XMLProperty *cprop;
|
||||
XMLProperty const * cprop;
|
||||
XMLNodeConstIterator iter;
|
||||
XMLNode *child;
|
||||
const char *port;
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ Port::get_state () const
|
|||
int
|
||||
Port::set_state (const XMLNode& node, int)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if (node.name() != state_node_name) {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ PortInsert::set_state (const XMLNode& node, int version)
|
|||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
XMLPropertyList plist;
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
const XMLNode* insert_node = &node;
|
||||
|
||||
|
|
|
|||
|
|
@ -180,8 +180,8 @@ Processor::set_state (const XMLNode& node, int version)
|
|||
return set_state_2X (node, version);
|
||||
}
|
||||
|
||||
const XMLProperty *prop;
|
||||
const XMLProperty *legacy_active = 0;
|
||||
XMLProperty const * prop;
|
||||
XMLProperty const * legacy_active = 0;
|
||||
bool leave_name_alone = (node.property ("ignore-name") != 0);
|
||||
|
||||
if (!leave_name_alone) {
|
||||
|
|
@ -205,7 +205,7 @@ Processor::set_state (const XMLNode& node, int version)
|
|||
|
||||
if ((*niter)->name() == X_("Automation")) {
|
||||
|
||||
XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = (*niter)->property ("path")) != 0) {
|
||||
old_set_automation_state (*(*niter));
|
||||
|
|
|
|||
|
|
@ -1260,7 +1260,7 @@ Region::set_state (const XMLNode& node, int version)
|
|||
int
|
||||
Region::_set_state (const XMLNode& node, int /*version*/, PropertyChange& what_changed, bool send)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
Stateful::save_extra_xml (node);
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ Return::set_state (const XMLNode& node, int version)
|
|||
{
|
||||
XMLNodeList nlist = node.children();
|
||||
XMLNodeIterator niter;
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
const XMLNode* insert_node = &node;
|
||||
|
||||
/* Return has regular IO automation (gain, pan) */
|
||||
|
|
|
|||
|
|
@ -1362,7 +1362,7 @@ Route::processor_selfdestruct (boost::weak_ptr<Processor> wp)
|
|||
bool
|
||||
Route::add_processor_from_xml_2X (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
try {
|
||||
boost::shared_ptr<Processor> processor;
|
||||
|
|
@ -2821,7 +2821,7 @@ Route::set_state (const XMLNode& node, int version)
|
|||
XMLNodeList nlist;
|
||||
XMLNodeConstIterator niter;
|
||||
XMLNode *child;
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if (node.name() != "Route"){
|
||||
error << string_compose(_("Bad node sent to Route::set_state() [%1]"), node.name()) << endmsg;
|
||||
|
|
@ -3044,7 +3044,7 @@ Route::set_state_2X (const XMLNode& node, int version)
|
|||
XMLNodeList nlist;
|
||||
XMLNodeConstIterator niter;
|
||||
XMLNode *child;
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
/* 2X things which still remain to be handled:
|
||||
* default-type
|
||||
|
|
@ -3330,7 +3330,7 @@ Route::set_processor_state (const XMLNode& node)
|
|||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
|
||||
XMLProperty* prop = (*niter)->property ("type");
|
||||
XMLProperty const * prop = (*niter)->property ("type");
|
||||
|
||||
if (prop->value() == "amp") {
|
||||
_amp->set_state (**niter, Stateful::current_state_version);
|
||||
|
|
@ -3367,7 +3367,7 @@ Route::set_processor_state (const XMLNode& node)
|
|||
ProcessorList::iterator o;
|
||||
|
||||
for (o = _processors.begin(); o != _processors.end(); ++o) {
|
||||
XMLProperty* id_prop = (*niter)->property(X_("id"));
|
||||
XMLProperty const * id_prop = (*niter)->property(X_("id"));
|
||||
if (id_prop && (*o)->id() == id_prop->value()) {
|
||||
(*o)->set_state (**niter, Stateful::current_state_version);
|
||||
new_order.push_back (*o);
|
||||
|
|
@ -4585,7 +4585,7 @@ Route::set_name_in_state (XMLNode& node, string const & name, bool rename_playli
|
|||
|
||||
} else if ((*i)->name() == X_("Processor")) {
|
||||
|
||||
XMLProperty* role = (*i)->property (X_("role"));
|
||||
XMLProperty const * role = (*i)->property (X_("role"));
|
||||
if (role && role->value() == X_("Main")) {
|
||||
(*i)->add_property (X_("name"), name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ RouteGroup::set_state (const XMLNode& node, int version)
|
|||
return set_state_2X (node, version);
|
||||
}
|
||||
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
set_id (node);
|
||||
set_values (node);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const uint32_t SceneChange::out_of_bound_color = 0x00000000; /* note: zero alpha
|
|||
boost::shared_ptr<SceneChange>
|
||||
SceneChange::factory (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop = node.property (X_("type"));
|
||||
XMLProperty const * prop = node.property (X_("type"));
|
||||
|
||||
if (prop->value() == X_("MIDI")) {
|
||||
return boost::shared_ptr<SceneChange> (new MIDISceneChange (node, version));
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ Send::set_state (const XMLNode& node, int version)
|
|||
return set_state_2X (node, version);
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
Delivery::set_state (node, version);
|
||||
|
||||
|
|
|
|||
|
|
@ -381,8 +381,9 @@ Session::Session (AudioEngine &eng,
|
|||
*/
|
||||
|
||||
if (state_tree) {
|
||||
const XMLProperty* prop;
|
||||
if ((prop = state_tree->root()->property (X_("sample-rate"))) != 0) {
|
||||
XMLProperty const * prop;
|
||||
XMLNode const * root (state_tree->root());
|
||||
if ((prop = root->property (X_("sample-rate"))) != 0) {
|
||||
sr = atoi (prop->value());
|
||||
}
|
||||
}
|
||||
|
|
@ -3221,13 +3222,13 @@ Session::new_route_from_template (uint32_t how_many, XMLNode& node, const std::s
|
|||
for (XMLNodeList::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
if ((*i)->name() == X_("Processor")) {
|
||||
/* ForceIDRegeneration does not catch the following */
|
||||
XMLProperty* role = (*i)->property (X_("role"));
|
||||
XMLProperty* type = (*i)->property (X_("type"));
|
||||
XMLProperty const * role = (*i)->property (X_("role"));
|
||||
XMLProperty const * type = (*i)->property (X_("type"));
|
||||
if (role && role->value() == X_("Aux")) {
|
||||
/* check if the target bus exists.
|
||||
* we should not save aux-sends in templates.
|
||||
*/
|
||||
XMLProperty* target = (*i)->property (X_("target"));
|
||||
XMLProperty const * target = (*i)->property (X_("target"));
|
||||
if (!target) {
|
||||
(*i)->add_property ("type", "dangling-aux-send");
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -949,7 +949,7 @@ Session::load_state (string snapshot_name)
|
|||
return -1;
|
||||
}
|
||||
|
||||
XMLNode& root (*state_tree->root());
|
||||
XMLNode const & root (*state_tree->root());
|
||||
|
||||
if (root.name() != X_("Session")) {
|
||||
error << string_compose (_("Session file %1 is not a session"), xmlpath) << endmsg;
|
||||
|
|
@ -958,7 +958,7 @@ Session::load_state (string snapshot_name)
|
|||
return -1;
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = root.property ("version")) == 0) {
|
||||
/* no version implies very old version of Ardour */
|
||||
|
|
@ -1298,7 +1298,7 @@ Session::set_state (const XMLNode& node, int version)
|
|||
{
|
||||
XMLNodeList nlist;
|
||||
XMLNode* child;
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
int ret = -1;
|
||||
|
||||
_state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave);
|
||||
|
|
@ -1581,7 +1581,7 @@ Session::XMLRouteFactory (const XMLNode& node, int version)
|
|||
XMLNode* ds_child = find_named_node (node, X_("Diskstream"));
|
||||
|
||||
DataType type = DataType::AUDIO;
|
||||
const XMLProperty* prop = node.property("default-type");
|
||||
XMLProperty const * prop = node.property("default-type");
|
||||
|
||||
if (prop) {
|
||||
type = DataType (prop->value());
|
||||
|
|
@ -1614,7 +1614,7 @@ Session::XMLRouteFactory (const XMLNode& node, int version)
|
|||
|
||||
} else {
|
||||
enum Route::Flag flags = Route::Flag(0);
|
||||
const XMLProperty* prop = node.property("flags");
|
||||
XMLProperty const * prop = node.property("flags");
|
||||
if (prop) {
|
||||
flags = Route::Flag (string_2_enum (prop->value(), flags));
|
||||
}
|
||||
|
|
@ -1647,7 +1647,7 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version)
|
|||
}
|
||||
|
||||
DataType type = DataType::AUDIO;
|
||||
const XMLProperty* prop = node.property("default-type");
|
||||
XMLProperty const * prop = node.property("default-type");
|
||||
|
||||
if (prop) {
|
||||
type = DataType (prop->value());
|
||||
|
|
@ -1692,7 +1692,7 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version)
|
|||
|
||||
} else {
|
||||
enum Route::Flag flags = Route::Flag(0);
|
||||
const XMLProperty* prop = node.property("flags");
|
||||
XMLProperty const * prop = node.property("flags");
|
||||
if (prop) {
|
||||
flags = Route::Flag (string_2_enum (prop->value(), flags));
|
||||
}
|
||||
|
|
@ -1724,7 +1724,7 @@ Session::load_regions (const XMLNode& node)
|
|||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
if ((region = XMLRegionFactory (**niter, false)) == 0) {
|
||||
error << _("Session: cannot create Region from XML description.");
|
||||
const XMLProperty *name = (**niter).property("name");
|
||||
XMLProperty const * name = (**niter).property("name");
|
||||
|
||||
if (name) {
|
||||
error << " " << string_compose (_("Can not load state for region '%1'"), name->value());
|
||||
|
|
@ -1742,7 +1742,7 @@ Session::load_compounds (const XMLNode& node)
|
|||
{
|
||||
XMLNodeList calist = node.children();
|
||||
XMLNodeConstIterator caiter;
|
||||
XMLProperty *caprop;
|
||||
XMLProperty const * caprop;
|
||||
|
||||
for (caiter = calist.begin(); caiter != calist.end(); ++caiter) {
|
||||
XMLNode* ca = *caiter;
|
||||
|
|
@ -1789,7 +1789,7 @@ Session::load_nested_sources (const XMLNode& node)
|
|||
/* it may already exist, so don't recreate it unnecessarily
|
||||
*/
|
||||
|
||||
XMLProperty* prop = (*niter)->property (X_("id"));
|
||||
XMLProperty const * prop = (*niter)->property (X_("id"));
|
||||
if (!prop) {
|
||||
error << _("Nested source has no ID info in session file! (ignored)") << endmsg;
|
||||
continue;
|
||||
|
|
@ -1813,7 +1813,7 @@ Session::load_nested_sources (const XMLNode& node)
|
|||
boost::shared_ptr<Region>
|
||||
Session::XMLRegionFactory (const XMLNode& node, bool full)
|
||||
{
|
||||
const XMLProperty* type = node.property("type");
|
||||
XMLProperty const * type = node.property("type");
|
||||
|
||||
try {
|
||||
|
||||
|
|
@ -1842,7 +1842,7 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
|
|||
boost::shared_ptr<AudioRegion>
|
||||
Session::XMLAudioRegionFactory (const XMLNode& node, bool /*full*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
boost::shared_ptr<Source> source;
|
||||
boost::shared_ptr<AudioSource> as;
|
||||
SourceList sources;
|
||||
|
|
@ -1961,7 +1961,7 @@ Session::XMLAudioRegionFactory (const XMLNode& node, bool /*full*/)
|
|||
boost::shared_ptr<MidiRegion>
|
||||
Session::XMLMidiRegionFactory (const XMLNode& node, bool /*full*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
boost::shared_ptr<Source> source;
|
||||
boost::shared_ptr<MidiSource> ms;
|
||||
SourceList sources;
|
||||
|
|
@ -2793,7 +2793,7 @@ Session::find_all_sources (string path, set<string>& result)
|
|||
|
||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = (*niter)->property (X_("type"))) == 0) {
|
||||
continue;
|
||||
|
|
@ -4230,27 +4230,29 @@ Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFo
|
|||
|
||||
/* sample rate */
|
||||
|
||||
const XMLProperty* prop;
|
||||
if ((prop = tree.root()->property (X_("sample-rate"))) != 0) {
|
||||
XMLProperty const * prop;
|
||||
XMLNode const * root (tree.root());
|
||||
|
||||
if ((prop = root->property (X_("sample-rate"))) != 0) {
|
||||
sample_rate = atoi (prop->value());
|
||||
found_sr = true;
|
||||
}
|
||||
|
||||
const XMLNodeList& children (tree.root()->children());
|
||||
const XMLNodeList& children (root->children());
|
||||
for (XMLNodeList::const_iterator c = children.begin(); c != children.end(); ++c) {
|
||||
const XMLNode* child = *c;
|
||||
if (child->name() == "Config") {
|
||||
const XMLNodeList& options (child->children());
|
||||
for (XMLNodeList::const_iterator oc = options.begin(); oc != options.end(); ++oc) {
|
||||
const XMLNode* option = *oc;
|
||||
const XMLProperty* name = option->property("name");
|
||||
XMLNode const * option = *oc;
|
||||
XMLProperty const * name = option->property("name");
|
||||
|
||||
if (!name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (name->value() == "native-file-data-format") {
|
||||
const XMLProperty* value = option->property ("value");
|
||||
XMLProperty const * value = option->property ("value");
|
||||
if (value) {
|
||||
SampleFormat fmt = (SampleFormat) string_2_enum (option->property ("value")->value(), fmt);
|
||||
data_format = fmt;
|
||||
|
|
@ -4282,7 +4284,7 @@ Session::get_snapshot_from_instant (const std::string& session_dir)
|
|||
return "";
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
XMLNode *last_used_snapshot = tree.root()->child("LastUsedSnapshot");
|
||||
if (last_used_snapshot && (prop = last_used_snapshot->property ("name")) != 0) {
|
||||
return prop->value();
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ Source::get_state ()
|
|||
int
|
||||
Source::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("name")) != 0) {
|
||||
_name = prop->value();
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ boost::shared_ptr<Source>
|
|||
SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
|
||||
{
|
||||
DataType type = DataType::AUDIO;
|
||||
const XMLProperty* prop = node.property("type");
|
||||
XMLProperty const * prop = node.property("type");
|
||||
|
||||
if (prop) {
|
||||
type = DataType (prop->value());
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ int
|
|||
Speakers::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
XMLNodeConstIterator i;
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
double a, e, d;
|
||||
LocaleGuard lg (X_("C"));
|
||||
int n = 0;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ const string TempoSection::xml_state_node_name = "Tempo";
|
|||
TempoSection::TempoSection (const XMLNode& node)
|
||||
: MetricSection (BBT_Time()), Tempo (TempoMap::default_tempo())
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
BBT_Time start;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ const string MeterSection::xml_state_node_name = "Meter";
|
|||
MeterSection::MeterSection (const XMLNode& node)
|
||||
: MetricSection (BBT_Time()), Meter (TempoMap::default_meter())
|
||||
{
|
||||
const XMLProperty *prop;
|
||||
XMLProperty const * prop;
|
||||
BBT_Time start;
|
||||
LocaleGuard lg (X_("C"));
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ Track::set_state (const XMLNode& node, int version)
|
|||
for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
child = *niter;
|
||||
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
if (child->name() == Controllable::xml_node_name && (prop = child->property ("name")) != 0) {
|
||||
if (prop->value() == X_("recenable")) {
|
||||
_rec_enable_control->set_state (*child, version);
|
||||
|
|
@ -142,7 +142,7 @@ Track::set_state (const XMLNode& node, int version)
|
|||
}
|
||||
}
|
||||
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property (X_("monitoring"))) != 0) {
|
||||
_monitoring = MonitorChoice (string_2_enum (prop->value(), _monitoring));
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ VSTPlugin::load_user_preset (PresetRecord r)
|
|||
XMLNode* root = t->root ();
|
||||
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
|
||||
assert (label);
|
||||
|
||||
|
|
@ -411,8 +411,8 @@ VSTPlugin::load_user_preset (PresetRecord r)
|
|||
|
||||
for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) {
|
||||
if ((*j)->name() == X_("Parameter")) {
|
||||
XMLProperty* index = (*j)->property (X_("index"));
|
||||
XMLProperty* value = (*j)->property (X_("value"));
|
||||
XMLProperty const * index = (*j)->property (X_("index"));
|
||||
XMLProperty const * value = (*j)->property (X_("value"));
|
||||
|
||||
assert (index);
|
||||
assert (value);
|
||||
|
|
@ -704,8 +704,8 @@ VSTPlugin::find_presets ()
|
|||
XMLNode* root = t->root ();
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
|
||||
XMLProperty* uri = (*i)->property (X_("uri"));
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * uri = (*i)->property (X_("uri"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
|
||||
assert (uri);
|
||||
assert (label);
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ WindowsVSTPluginInfo::get_presets (bool user_only) const
|
|||
if (t->read ()) {
|
||||
XMLNode* root = t->root ();
|
||||
for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
|
||||
XMLProperty* uri = (*i)->property (X_("uri"));
|
||||
XMLProperty* label = (*i)->property (X_("label"));
|
||||
XMLProperty const * uri = (*i)->property (X_("uri"));
|
||||
XMLProperty const * label = (*i)->property (X_("label"));
|
||||
p.push_back (Plugin::PresetRecord (uri->value(), label->value(), true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -709,13 +709,14 @@ Bindings::load_operation (XMLNode const& node)
|
|||
|
||||
for (XMLNodeList::const_iterator p = children.begin(); p != children.end(); ++p) {
|
||||
|
||||
XMLProperty* ap;
|
||||
XMLProperty* kp;
|
||||
XMLProperty* bp;
|
||||
XMLProperty const * ap;
|
||||
XMLProperty const * kp;
|
||||
XMLProperty const * bp;
|
||||
XMLNode const * child = *p;
|
||||
|
||||
ap = (*p)->property ("action");
|
||||
kp = (*p)->property ("key");
|
||||
bp = (*p)->property ("button");
|
||||
ap = child->property ("action");
|
||||
kp = child->property ("key");
|
||||
bp = child->property ("button");
|
||||
|
||||
if (!ap || (!kp && !bp)) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ Keyboard::get_state (void)
|
|||
int
|
||||
Keyboard::set_state (const XMLNode& node, int /*version*/)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property ("copy-modifier")) != 0) {
|
||||
sscanf (prop->value().c_str(), "%d", &CopyModifier);
|
||||
|
|
@ -702,8 +702,9 @@ Keyboard::read_keybindings (string const & path)
|
|||
XMLNodeList const& children = tree.root()->children();
|
||||
|
||||
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
|
||||
if ((*i)->name() == X_("Bindings")) {
|
||||
XMLProperty const* name = (*i)->property (X_("name"));
|
||||
XMLNode const * child = *i;
|
||||
if (child->name() == X_("Bindings")) {
|
||||
XMLProperty const* name = child->property (X_("name"));
|
||||
if (!name) {
|
||||
warning << _("Keyboard binding found without a name") << endmsg;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ Tabbable::set_state (const XMLNode& node, int version)
|
|||
XMLNode* window_node = node.child ("Window");
|
||||
|
||||
if (window_node) {
|
||||
const XMLProperty* prop = window_node->property (X_("tabbed"));
|
||||
XMLProperty const * prop = window_node->property (X_("tabbed"));
|
||||
if (prop) {
|
||||
tab_requested_by_state = PBD::string_is_affirmative (prop->value());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ void
|
|||
TearOff::set_state (const XMLNode& node)
|
||||
{
|
||||
Glib::RefPtr<Gdk::Window> win;
|
||||
const XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
if ((prop = node.property (X_("tornoff"))) == 0) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -84,12 +84,13 @@ int
|
|||
WindowProxy::set_state (const XMLNode& node, int /* version */)
|
||||
{
|
||||
XMLNodeList children = node.children ();
|
||||
|
||||
XMLNode const * child;
|
||||
XMLNodeList::const_iterator i = children.begin ();
|
||||
|
||||
while (i != children.end()) {
|
||||
XMLProperty* prop = (*i)->property (X_("name"));
|
||||
if ((*i)->name() == X_("Window") && prop && prop->value() == _name) {
|
||||
child = *i;
|
||||
XMLProperty const * prop = child->property (X_("name"));
|
||||
if (child->name() == X_("Window") && prop && prop->value() == _name) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -98,22 +99,23 @@ WindowProxy::set_state (const XMLNode& node, int /* version */)
|
|||
|
||||
if (i != children.end()) {
|
||||
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
child = *i;
|
||||
|
||||
if ((prop = (*i)->property (X_("visible"))) != 0) {
|
||||
if ((prop = child->property (X_("visible"))) != 0) {
|
||||
_visible = PBD::string_is_affirmative (prop->value ());
|
||||
}
|
||||
|
||||
if ((prop = (*i)->property (X_("x-off"))) != 0) {
|
||||
if ((prop = child->property (X_("x-off"))) != 0) {
|
||||
_x_off = atoi (prop->value());
|
||||
}
|
||||
if ((prop = (*i)->property (X_("y-off"))) != 0) {
|
||||
if ((prop = child->property (X_("y-off"))) != 0) {
|
||||
_y_off = atoi (prop->value());
|
||||
}
|
||||
if ((prop = (*i)->property (X_("x-size"))) != 0) {
|
||||
if ((prop = child->property (X_("x-size"))) != 0) {
|
||||
_width = atoi (prop->value());
|
||||
}
|
||||
if ((prop = (*i)->property (X_("y-size"))) != 0) {
|
||||
if ((prop = child->property (X_("y-size"))) != 0) {
|
||||
_height = atoi (prop->value());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ ConfigVariableBase::set_from_node (XMLNode const & node)
|
|||
const XMLProperty* prop;
|
||||
XMLNodeList nlist;
|
||||
XMLNodeConstIterator niter;
|
||||
XMLNode* child;
|
||||
XMLNode const * child;
|
||||
|
||||
nlist = node.children();
|
||||
|
||||
|
|
|
|||
|
|
@ -236,8 +236,8 @@ public:
|
|||
if (i == children.end()) {
|
||||
return 0;
|
||||
}
|
||||
XMLProperty* from = (*i)->property ("from");
|
||||
XMLProperty* to = (*i)->property ("to");
|
||||
XMLProperty const * from = (*i)->property ("from");
|
||||
XMLProperty const * to = (*i)->property ("to");
|
||||
|
||||
if (!from || !to) {
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -117,10 +117,10 @@ public:
|
|||
std::string attribute_value();
|
||||
|
||||
const XMLPropertyList& properties() const { return _proplist; }
|
||||
XMLProperty* property(const char*);
|
||||
XMLProperty* property(const std::string&);
|
||||
const XMLProperty* property(const char* n) const { return const_cast<XMLNode*>(this)->property(n); }
|
||||
const XMLProperty* property(const std::string& n) const { return const_cast<XMLNode*>(this)->property(n); }
|
||||
XMLProperty const * property(const char*) const;
|
||||
XMLProperty const * property(const std::string&) const;
|
||||
XMLProperty * property(const char*);
|
||||
XMLProperty * property(const std::string&);
|
||||
|
||||
bool has_property_with_value (const std::string&, const std::string&) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "pbd/stacktrace.h"
|
||||
#include "pbd/xml++.h"
|
||||
|
||||
#include <libxml/debugXML.h>
|
||||
#include <libxml/xpath.h>
|
||||
#include <libxml/xpathInternals.h>
|
||||
|
|
@ -404,7 +407,32 @@ XMLNode::add_content(const string& c)
|
|||
return add_child_copy(XMLNode (string(), c));
|
||||
}
|
||||
|
||||
XMLProperty*
|
||||
XMLProperty const *
|
||||
XMLNode::property(const char* n) const
|
||||
{
|
||||
string ns(n);
|
||||
map<string,XMLProperty*>::const_iterator iter;
|
||||
|
||||
if ((iter = _propmap.find(ns)) != _propmap.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
XMLProperty const *
|
||||
XMLNode::property(const string& ns) const
|
||||
{
|
||||
map<string,XMLProperty*>::const_iterator iter;
|
||||
|
||||
if ((iter = _propmap.find(ns)) != _propmap.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
XMLProperty *
|
||||
XMLNode::property(const char* n)
|
||||
{
|
||||
string ns(n);
|
||||
|
|
@ -417,7 +445,7 @@ XMLNode::property(const char* n)
|
|||
return 0;
|
||||
}
|
||||
|
||||
XMLProperty*
|
||||
XMLProperty *
|
||||
XMLNode::property(const string& ns)
|
||||
{
|
||||
map<string,XMLProperty*>::iterator iter;
|
||||
|
|
@ -534,7 +562,7 @@ void
|
|||
XMLNode::remove_nodes_and_delete(const string& propname, const string& val)
|
||||
{
|
||||
XMLNodeIterator i = _children.begin();
|
||||
XMLProperty* prop;
|
||||
XMLProperty const * prop;
|
||||
|
||||
while (i != _children.end()) {
|
||||
prop = (*i)->property(propname);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ GenericMidiControlProtocol::reload_maps ()
|
|||
|
||||
MapInfo mi;
|
||||
|
||||
XMLProperty* prop = tree.root()->property ("name");
|
||||
XMLProperty const * prop = tree.root()->property ("name");
|
||||
|
||||
if (!prop) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ MackieControlProtocol::create_surfaces ()
|
|||
XMLNode* this_device = 0;
|
||||
XMLNodeList const& devices = configuration_state->children();
|
||||
for (XMLNodeList::const_iterator d = devices.begin(); d != devices.end(); ++d) {
|
||||
XMLProperty* prop = (*d)->property (X_("name"));
|
||||
XMLProperty const * prop = (*d)->property (X_("name"));
|
||||
if (prop && prop->value() == _device_info.name()) {
|
||||
this_device = *d;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue