summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-05-03 02:07:40 +0200
committerRobin Gareus <robin@gareus.org>2016-05-03 03:03:00 +0200
commit255b5174c4f162006d564327fb54f48bbd7ddc09 (patch)
treeb8157265870f0ab5cccbd5b7b520ccf524f8a87c /libs/pbd/pbd
parentc2e4cd2c6a614718c8bc6a795d56fd4e6232bd84 (diff)
add a const method to check for existing key/value properties
handy to lookup up XMLNodes with "id" == ID w/o allocating memory.
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r--libs/pbd/pbd/xml++.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h
index 0e1bd09cc2..1f8b710f3f 100644
--- a/libs/pbd/pbd/xml++.h
+++ b/libs/pbd/pbd/xml++.h
@@ -119,8 +119,10 @@ public:
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); }
+ 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); }
+
+ bool has_property_with_value (const std::string&, const std::string&) const;
XMLProperty* add_property(const char* name, const std::string& value);
XMLProperty* add_property(const char* name, const char* value = "");