diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-03-20 18:01:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-03-20 18:01:07 +0000 |
commit | 71b3c8cfe12fad319af00ba03f7746761a90b568 (patch) | |
tree | 2baac377928e0ce08fb914f17ed2485daa7818a1 /libs/pbd/pbd/xml++.h | |
parent | 2b7d17e9041363e19d71d9a2dd9425d045536eb8 (diff) |
some deep changes to xml++ in which we retain a C-level xmlDocPtr as a member of an XMLTree objects. this allows us to do repeated XPATH searches (as in the midnam parser of libmidi++) without constantly rewriting an entire tree into memory to recreate a new xmlDocPtr with which we can search. Since XMLTree objects don't typically stay around for very long, just when serializing to/from disk, this is not anticipated to have much (if any) impact on memory consumption
git-svn-id: svn://localhost/ardour2/branches/3.0@11733 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/xml++.h')
-rw-r--r-- | libs/pbd/pbd/xml++.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index 6b6ba34f6d..9c3782e3c2 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -60,11 +60,14 @@ public: const std::string& write_buffer() const; + boost::shared_ptr<XMLSharedNodeList> find(const std::string xpath, XMLNode* = 0) const; + private: bool read_internal(bool validate); std::string _filename; XMLNode* _root; + xmlDocPtr _doc; int _compression; }; @@ -90,7 +93,6 @@ public: XMLNode* add_child_copy(const XMLNode&); void add_child_nocopy(XMLNode&); - boost::shared_ptr<XMLSharedNodeList> find(const std::string xpath) const; std::string attribute_value(); const XMLPropertyList& properties() const { return _proplist; } |