diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-19 02:58:38 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:53 -0400 |
commit | b6ab7deb63d3e3e22ecd4d6c70c6249db2ba558c (patch) | |
tree | 6cfe58ee8e093d310aa7ea84de87db3190c576bf /src/node.h | |
parent | 2d8512af88eab26176089e53916f309f2d3b3be4 (diff) | |
download | fork-ledger-b6ab7deb63d3e3e22ecd4d6c70c6249db2ba558c.tar.gz fork-ledger-b6ab7deb63d3e3e22ecd4d6c70c6249db2ba558c.tar.bz2 fork-ledger-b6ab7deb63d3e3e22ecd4d6c70c6249db2ba558c.zip |
Completely revised the way XPath expressions are calculated.
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -87,12 +87,12 @@ public: parent_node_t& as_parent_node() { if (! is_parent_node()) throw_(std::logic_error, "Request to cast leaf node to a parent node"); - return *polymorphic_downcast<parent_node_t *>(this); + return downcast<parent_node_t>(*this); } const parent_node_t& as_parent_node() const { if (! is_parent_node()) throw_(std::logic_error, "Request to cast leaf node to a parent node"); - return *polymorphic_downcast<const parent_node_t *>(this); + return downcast<const parent_node_t>(*this); } virtual value_t to_value() const = 0; @@ -116,6 +116,7 @@ public: attributes = attributes_t(); attributes->push_back(attr_pair(_name_id, value)); } + optional<const string&> get_attr(const string& _name) const; optional<const string&> get_attr(const nameid_t _name_id) const { if (attributes) { typedef attributes_t::nth_index<1>::type attributes_by_name; |