(reinterpret_cast<xmlXPathObjectPtr>(obj)),
84xmlXPathFreeObject(
obj_);
133 if(
this!= &other) {
144other.pimpl_ =
NULL;
149 if(
this!= &other) {
153other.pimpl_ =
NULL;
161xmlXPathObjectPtr new_obj =
NULL;
163new_obj = xmlXPathNewString(
164 reinterpret_cast<constxmlChar*
>(
value));
166new_obj = xmlXPathNewString(
167 reinterpret_cast<constxmlChar*
>(
""));
169 if(new_obj ==
NULL)
175xmlXPathFreeObject(new_obj);
183xmlXPathObjectPtr new_obj = xmlXPathNewBoolean(
value);
184 if(new_obj ==
NULL)
190xmlXPathFreeObject(new_obj);
198xmlXPathObjectPtr new_obj = xmlXPathNewFloat(
value);
199 if(new_obj ==
NULL)
205xmlXPathFreeObject(new_obj);
213xmlXPathObjectPtr new_obj = xmlXPathNewFloat(
value);
214 if(new_obj ==
NULL)
220xmlXPathFreeObject(new_obj);
229xmlNodePtr new_node = xmlCopyNode(
230 reinterpret_cast<xmlNodePtr
>(
232 if(new_node ==
NULL)
235xmlXPathObjectPtr new_obj = xmlXPathNewNodeSet(new_node);
236 if(new_obj ==
NULL) {
237xmlFreeNode(new_node);
252new_obj->boolval = 1;
257xmlXPathFreeObject(new_obj);
265xmlNodeSetPtr new_node_set = xmlXPathNodeSetCreate(
NULL);
266 if(new_node_set ==
NULL)
270std::vector<xmlNodePtr> node_copies;
272 for( ; k != nset.
end(); ++k) {
274xmlNodePtr new_node = xmlCopyNode(
275 reinterpret_cast<xmlNodePtr
>(
277 if(new_node ==
NULL) {
278 for(std::vector<xmlNodePtr>::iterator j = node_copies.begin();
279j != node_copies.end(); ++j)
281xmlXPathFreeNodeSet(new_node_set);
284node_copies.push_back(new_node);
288 for(std::vector<xmlNodePtr>::iterator j = node_copies.begin();
289j != node_copies.end(); ++j) {
292xmlXPathNodeSetAdd(new_node_set, *j);
296xmlXPathObjectPtr new_obj = xmlXPathNewNodeSetList(new_node_set);
297xmlXPathFreeNodeSet(new_node_set);
298 if(new_obj ==
NULL) {
299 for(std::vector<xmlNodePtr>::iterator j = node_copies.begin();
300j != node_copies.end(); ++j)
309new_obj->boolval = 1;
314xmlXPathFreeObject(new_obj);
322xmlNodeSetPtr new_node_set = xmlXPathNodeSetCreate(
NULL);
323 if(new_node_set ==
NULL)
327std::vector<xmlNodePtr> node_copies;
328type_node_source::const_iterator k =
value.begin();
329 for( ; k !=
value.end(); ++k) {
330 void* raw_node = k->get_node_data();
331xmlNodePtr new_node = xmlCopyNode(
332 reinterpret_cast<xmlNodePtr
>(
334 if(new_node ==
NULL) {
335 for(std::vector<xmlNodePtr>::iterator j = node_copies.begin();
336j != node_copies.end(); ++j)
338xmlXPathFreeNodeSet(new_node_set);
341node_copies.push_back(new_node);
345 for(std::vector<xmlNodePtr>::iterator j = node_copies.begin();
346j != node_copies.end(); ++j) {
349xmlXPathNodeSetAdd(new_node_set, *j);
353xmlXPathObjectPtr new_obj = xmlXPathNewNodeSetList(new_node_set);
354xmlXPathFreeNodeSet(new_node_set);
355 if(new_obj ==
NULL) {
356 for(std::vector<xmlNodePtr>::iterator j = node_copies.begin();
357j != node_copies.end(); ++j)
367new_obj->boolval = 1;
372xmlXPathFreeObject(new_obj);
383 return reinterpret_cast<const char*
>(
pimpl_->
obj_->stringval);
389 copy= xmlXPathConvertString(
copy);
393 std::stringretval =
reinterpret_cast<const char*
>(
copy->stringval);
394xmlXPathFreeObject(
copy);
410 copy= xmlXPathConvertBoolean(
copy);
414 boolretval =
copy->boolval !=0;
415xmlXPathFreeObject(
copy);
426 return static_cast<int>(
pimpl_->
obj_->floatval);
433 copy= xmlXPathConvertNumber(
copy);
440xmlXPathFreeObject(
copy);
444 intretval =
static_cast<int>(
copy->floatval);
445xmlXPathFreeObject(
copy);
461 copy= xmlXPathConvertNumber(
copy);
465 doubleretval =
copy->floatval;
466xmlXPathFreeObject(
copy);
478 if(
pimpl_->
obj_->nodesetval->nodeNr <= 0)
486 return*nset.
begin();
516 #ifdef LIBXML_XPTR_LOCS_ENABLED 561pimpl_(new
impl::xpath_obj_impl(
562reinterpret_cast<xmlXPathObjectPtr>(raw_object)))
The xml::node_set::const_iterator class is used to iterate over nodes in a node set.
The xml::node_set class is used to store xpath query result set.
iterator begin()
Get an iterator that points to the beginning of the xpath query result node set.
iterator end()
Get an iterator that points one past the last node in the xpath query result node set.
The xml::node class is used to hold information about one XML node.
void * get_node_data(void) const
This exception class is thrown by xmlwrapp for all runtime XSLT-related errors.
static bool get_allow_extension_functions_leak(void)
Provides the current setting of the extension functions memory management.
The xslt::xpath_object class is used to store extension function arguments and return values.
xml::node & get_as_node(void) const
Provide the object value as a node.
bool get_from_xslt(void) const
std::vector< xml::node > type_node_source
Source of nodes to construct xpath_object of the nodeset type.
void * get_object(void) const
xpath_object_type get_type(void) const
Provides the object type.
xpath_object & operator=(const xpath_object &other)
Create a copy of the xslt::xpath_object object.
void test_int_convertability(double val) const
~xpath_object()
Destroy the object and clean up the memory.
void set_from_xslt(void) const
xml::node_set get_as_node_set(void) const
Provide the object value as a node set.
void revoke_ownership(void) const
std::string get_as_string(void) const
Provide the object value as a string.
impl::xpath_obj_impl * pimpl_
xpath_object()
Create a new xslt::xpath_object object.
int get_as_int(void) const
Provide the object value as an integer.
bool get_as_bool(void) const
Provide the object value as a boolean.
double get_as_float(void) const
Provide the object value as a float.
This file contains the definition of the xml::node class.
const GenericPointer< typename T::ValueType > T2 value
const char * kCouldNotCreateXpathNodeSet
xpath_object_type
Identifies what is stored in an xpath_object instance.
const char * kConverToNumberFailed
const char * kUnexpectedXpathObjectType
const char * kCouldNotCopyNode
const char * kCouldNotCreateNodeSet
const char * kCannotCopyXpathObject
const char * kUninitialisedObject
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
This file contains the definition of the xml::impl::nset_impl class.
void set_ownership(bool owe)
xpath_obj_impl(void *obj)
This file contains the definition of the xslt::exception class.
This file contains the definition of the xslt::init class.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4