summaryrefslogtreecommitdiff
path: root/src/xpath.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-14 23:20:34 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:51 -0400
commitb36d24481d37170195e3f92267b343b9489c6bba (patch)
treeaba26c44ae86729423569694e6d5b0bbc7d553dd /src/xpath.h
parentba86b7f4105535d0eb99189c8c198ffbff054b60 (diff)
downloadfork-ledger-b36d24481d37170195e3f92267b343b9489c6bba.tar.gz
fork-ledger-b36d24481d37170195e3f92267b343b9489c6bba.tar.bz2
fork-ledger-b36d24481d37170195e3f92267b343b9489c6bba.zip
Fixed a problem in the use of boost::variant<>.
Diffstat (limited to 'src/xpath.h')
-rw-r--r--src/xpath.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/xpath.h b/src/xpath.h
index 41dc36e4..9b0129ed 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -311,7 +311,7 @@ public:
value_t& as_value() {
assert(kind == VALUE);
- value_t * val = boost::get<scoped_ptr<value_t> >(data).get();
+ value_t * val = boost::get<shared_ptr<value_t> >(data).get();
assert(val);
return *val;
}
@@ -418,6 +418,7 @@ public:
static ptr_op_t defer_sequence(value_t::sequence_t& result_seq);
bool print(std::ostream& out,
+ document_t& document,
const bool relaxed = true,
const ptr_op_t& op_to_find = NULL,
unsigned long * start_pos = NULL,
@@ -510,12 +511,13 @@ public:
}
bool print(std::ostream& out,
+ document_t& document,
const bool relaxed,
const ptr_op_t op_to_find,
unsigned long * start_pos,
unsigned long * end_pos) const {
if (ptr)
- ptr->print(out, relaxed, op_to_find, start_pos, end_pos);
+ ptr->print(out, document, relaxed, op_to_find, start_pos, end_pos);
return true;
}
@@ -613,8 +615,8 @@ public:
return temp.calc(top, scope);
}
- void print(std::ostream& out) const {
- print(out, true, NULL, NULL, NULL);
+ void print(std::ostream& out, xml::document_t& document) const {
+ print(out, document, true, NULL, NULL, NULL);
}
void dump(std::ostream& out) const {
if (ptr)
@@ -624,11 +626,6 @@ public:
friend class scope_t;
};
-inline std::ostream& operator<<(std::ostream& out, const xpath_t::op_t& op) {
- op.print(out);
- return out;
-}
-
inline void intrusive_ptr_add_ref(xpath_t::op_t * op) {
op->acquire();
}