| 4678 | #endif |
| 4679 | |
| 4680 | PUGI__FN ptrdiff_t xml_node::offset_debug() const |
| 4681 | { |
| 4682 | xml_node_struct* r = root()._root; |
| 4683 | |
| 4684 | if (!r) return -1; |
| 4685 | |
| 4686 | const char_t* buffer = static_cast<impl::xml_document_struct*>(r)->buffer; |
| 4687 | |
| 4688 | if (!buffer) return -1; |
| 4689 | |
| 4690 | switch (type()) |
| 4691 | { |
| 4692 | case node_document: |
| 4693 | return 0; |
| 4694 | |
| 4695 | case node_element: |
| 4696 | case node_declaration: |
| 4697 | case node_pi: |
| 4698 | return (_root->header & impl::xml_memory_page_name_allocated_mask) ? -1 : _root->name - buffer; |
| 4699 | |
| 4700 | case node_pcdata: |
| 4701 | case node_cdata: |
| 4702 | case node_comment: |
| 4703 | case node_doctype: |
| 4704 | return (_root->header & impl::xml_memory_page_value_allocated_mask) ? -1 : _root->value - buffer; |
| 4705 | |
| 4706 | default: |
| 4707 | return -1; |
| 4708 | } |
| 4709 | } |
| 4710 | |
| 4711 | #ifdef __BORLANDC__ |
| 4712 | PUGI__FN bool operator&&(const xml_node& lhs, bool rhs) |
nothing calls this directly
no outgoing calls
no test coverage detected