NCBI C++ ToolKit
|
Classes | |
struct | cbfo_node_compare |
struct | sort_callback |
class | ait_impl |
the class that does all the work behind xml::attributes::iterator and xml::attributes::const_iterator. More... | |
struct | phantom_attr |
struct | attr_instance |
struct | node_private_data |
struct | doc_impl |
struct | dtd_impl |
struct | epimpl |
struct | node_impl |
struct | node_cmp |
struct | nipimpl |
class | node_iterator |
struct | nset_impl |
class | pimpl_base |
struct | schema_impl |
class | xmlchar_helper |
struct | ns_util |
Functions | |
bool | operator== (const ait_impl &lhs, const ait_impl &rhs) |
void * | get_ptr_to_attr_instance (void *) |
node_private_data * | attach_node_private_data (void *) |
xmlAttrPtr | find_prop (xmlNodePtr xmlnode, const char *name, const ns *nspace) |
phantom_attr * | find_default_prop (xmlNodePtr xmlnode, const char *name, const ns *nspace) |
bool | operator!= (const ait_impl &lhs, const ait_impl &rhs) |
void | cleanup_node (xmlNodePtr xmlnode) |
void | invalidate_default_attr_iterators (xmlNodePtr xmlnode) |
void | register_https_input (void) |
void | clear_https_messages (void) |
void | collect_https_messages (xml::error_messages &append_to) |
void | append_https_message (const std::string &msg, error_message::message_type msg_type, long line, const std::string &fname) |
xmlNodePtr | node_insert (xmlNodePtr parent, xmlNodePtr before, xmlNodePtr to_add) |
Insert a node somewhere in the child list of a parent node. More... | |
xmlNodePtr | node_replace (xmlNodePtr old_node, xmlNodePtr new_node) |
Replace a node with another one. More... | |
xmlNodePtr | node_erase (xmlNodePtr to_erase) |
Erase a node from the child list, and then free it from memory. More... | |
void | set_children_default_ns (xmlNodePtr node, xmlNsPtr default_ns) |
Set the node and its children default namespace to the given. More... | |
bool | has_default_ns_definition (xmlNodePtr node) |
Check if the node holds default namespace definition. More... | |
bool | is_ns_used (xmlNodePtr node, xmlNsPtr ns) |
Check if the node, attributes and children use the namespace. More... | |
void | update_children_default_ns (xmlNodePtr node, xmlNsPtr newns) |
Replaces the node and its children default namespace with the given. More... | |
void | erase_ns_definition (xmlNodePtr node, xmlNsPtr definition) |
Erases namespace definition in the node. More... | |
xmlNsPtr | lookup_ns_definition (xmlNodePtr node, const char *prefix) |
Searches for a namspace definition in the given node. More... | |
xmlNsPtr | lookup_default_ns_above (xmlNodePtr node) |
Searches for a default namspace definition in the given node and above. More... | |
void | replace_ns (xmlNodePtr node, xmlNsPtr oldNs, xmlNsPtr newNs) |
Replaces old namspace with a new one in nodes and attributes all the way down in the hierarchy. More... | |
void | printf2string (std::string &s, const char *message, va_list ap) |
int | convert_to_libxml2_save_options (int options) |
int | save_to_stream_cb (void *ctx, const char *buf, int len) |
int | save_to_string_cb (void *ctx, const char *buf, int len) |
void xml::impl::append_https_message | ( | const std::string & | msg, |
error_message::message_type | msg_type, | ||
long | line, | ||
const std::string & | fname | ||
) |
Definition at line 143 of file https_input_impl.cpp.
node_private_data * xml::impl::attach_node_private_data | ( | void * | ) |
Definition at line 95 of file deref_impl.cpp.
References data, NCBI_LSAN_DISABLE_GUARD, and NULL.
Referenced by find_default_prop(), xml::impl::node_iterator::get(), get_ptr_to_attr_instance(), xml::impl::nset_impl::get_reference(), and xml::node::swap().
void xml::impl::cleanup_node | ( | xmlNodePtr | xmlnode | ) |
Definition at line 52 of file deref_impl.cpp.
References xml::impl::node_private_data::attr_instances_, next(), xml::impl::phantom_attr::next, xml::impl::attr_instance::next, NULL, and xml::impl::node_private_data::phantom_attrs_.
Referenced by xml::init::init_library().
void xml::impl::clear_https_messages | ( | void | ) |
Definition at line 119 of file https_input_impl.cpp.
References xml::error_messages::get_messages().
Referenced by xml::schema::construct(), xml::document::document(), xml::dtd::dtd(), xml::event_parser::parse_chunk(), and xml::document::validate().
void xml::impl::collect_https_messages | ( | xml::error_messages & | append_to | ) |
Definition at line 130 of file https_input_impl.cpp.
References xml::error_messages::append_messages(), and NULL.
Referenced by xml::schema::construct(), xml::document::document(), xml::dtd::dtd(), xml::event_parser::parse_chunk(), xml::event_parser::parse_finish(), and xml::document::validate().
Definition at line 142 of file utility.cpp.
References xml::save_op_as_html, xml::save_op_no_decl, xml::save_op_no_empty, xml::save_op_no_format, xml::save_op_no_xhtml, xml::save_op_not_as_xml, xml::save_op_with_non_significant_ws, and xml::save_op_xhtml.
Referenced by xml::node::append_to_string(), xml::operator<<(), xml::document::save_to_file(), xml::document::save_to_stream(), and xml::document::save_to_string().
void xml::impl::erase_ns_definition | ( | xmlNodePtr | node, |
xmlNsPtr | definition | ||
) |
Erases namespace definition in the node.
libxml2 namespace is freed. The function does not check whether the namespace is used.
node | The node to delete from. |
definition | The namespace to be erased |
Definition at line 170 of file node_manip.cpp.
References prev().
Referenced by xml::node::erase_duplicate_ns_defs_single_node(), xml::node::erase_namespace_definition(), and xml::node::erase_unused_ns_defs().
phantom_attr * xml::impl::find_default_prop | ( | xmlNodePtr | xmlnode, |
const char * | name, | ||
const ns * | nspace | ||
) |
Definition at line 567 of file ait_impl.cpp.
References attach_node_private_data(), xml::impl::phantom_attr::def_prop_, xml::ns::get_prefix(), xml::impl::phantom_attr::next, NULL, xml::impl::node_private_data::phantom_attrs_, and prefix.
Referenced by xml::attributes::find().
Definition at line 512 of file ait_impl.cpp.
References column, NULL, prefix, and string.
Referenced by xml::attributes::erase(), and xml::attributes::find().
void * xml::impl::get_ptr_to_attr_instance | ( | void * | ) |
Definition at line 119 of file deref_impl.cpp.
References attach_node_private_data(), xml::impl::attr_instance::attr_, xml::impl::node_private_data::attr_instances_, xml::attributes::attr::get_node(), xml::impl::attr_instance::next, and NULL.
Referenced by xml::attributes::iterator::operator*(), xml::attributes::const_iterator::operator*(), xml::attributes::iterator::operator->(), and xml::attributes::const_iterator::operator->().
bool xml::impl::has_default_ns_definition | ( | xmlNodePtr | node | ) |
Check if the node holds default namespace definition.
node | The node to be checked. |
Definition at line 129 of file node_manip.cpp.
Referenced by set_children_default_ns(), and update_children_default_ns().
void xml::impl::invalidate_default_attr_iterators | ( | xmlNodePtr | xmlnode | ) |
Definition at line 141 of file deref_impl.cpp.
References data, xml::impl::phantom_attr::def_prop_, xml::impl::phantom_attr::next, and NULL.
Referenced by xml::node::swap().
bool xml::impl::is_ns_used | ( | xmlNodePtr | node, |
xmlNsPtr | ns | ||
) |
Check if the node, attributes and children use the namespace.
node | The node to be checked. |
ns | The namespace to match (pointer comparison is used) |
Definition at line 139 of file node_manip.cpp.
Referenced by xml::node::erase_namespace_definition(), and xml::node::erase_unused_ns_defs().
xmlNsPtr xml::impl::lookup_default_ns_above | ( | xmlNodePtr | node | ) |
Searches for a default namspace definition in the given node and above.
node | The node to start the search from. |
Definition at line 198 of file node_manip.cpp.
References NULL, and xml::node::parent().
Referenced by xml::node::erase_namespace_definition().
xmlNsPtr xml::impl::lookup_ns_definition | ( | xmlNodePtr | node, |
const char * | prefix | ||
) |
Searches for a namspace definition in the given node.
node | The node to search in. |
prefix | The namespace definition prefix |
Definition at line 185 of file node_manip.cpp.
Referenced by xml::node::erase_namespace_definition().
xmlNodePtr xml::impl::node_erase | ( | xmlNodePtr | to_erase | ) |
Erase a node from the child list, and then free it from memory.
to_erase | The node to remove and free. |
Definition at line 108 of file node_manip.cpp.
Referenced by xml::node::erase(), and xml::document::erase().
xmlNodePtr xml::impl::node_insert | ( | xmlNodePtr | parent, |
xmlNodePtr | before, | ||
xmlNodePtr | to_add | ||
) |
Insert a node somewhere in the child list of a parent node.
parent | The parent who's child list will be inserted into. |
before | Insert to_add before this node, or, if this node is 0 (null), insert at the end of the child list. |
to_add | The node to be copied and then inserted into the child list. |
Definition at line 54 of file node_manip.cpp.
References NULL, and set_children_default_ns().
Referenced by xml::document::insert(), xml::node::insert(), xml::document::push_back(), and xml::node::push_back().
xmlNodePtr xml::impl::node_replace | ( | xmlNodePtr | old_node, |
xmlNodePtr | new_node | ||
) |
Replace a node with another one.
The node being replaced will be freed from memory.
old_node | The old node to remove and free. |
new_node | The new node to copy and insert where old node was. |
Definition at line 75 of file node_manip.cpp.
References NULL, and set_children_default_ns().
Referenced by xml::node::replace(), and xml::document::replace().
Definition at line 656 of file ait_impl.cpp.
Definition at line 651 of file ait_impl.cpp.
References xml::impl::ait_impl::attr_, xml::attributes::attr::normalize(), and xml::attributes::attr::xmlnode_.
void xml::impl::printf2string | ( | std::string & | s, |
const char * | message, | ||
va_list | ap | ||
) |
Definition at line 79 of file utility.cpp.
References buffer, ncbi::grid::netcache::search::fields::size, and vsnprintf.
Referenced by cb_error(), cb_fatal_error(), and cb_warning().
void xml::impl::register_https_input | ( | void | ) |
Definition at line 110 of file https_input_impl.cpp.
Referenced by xml::init::init_library().
void xml::impl::replace_ns | ( | xmlNodePtr | node, |
xmlNsPtr | oldNs, | ||
xmlNsPtr | newNs | ||
) |
Replaces old namspace with a new one in nodes and attributes all the way down in the hierarchy.
node | The node to start with. |
oldNs | The old namespace |
newNs | The new namespace |
Definition at line 211 of file node_manip.cpp.
References NULL.
Referenced by xml::node::erase_duplicate_ns_defs_single_node(), and xml::node::erase_namespace_definition().
Definition at line 177 of file utility.cpp.
Referenced by xml::operator<<(), and xml::document::save_to_stream().
Definition at line 183 of file utility.cpp.
References buf, ctx, len, and string.
Referenced by xml::node::append_to_string(), and xml::document::save_to_string().
void xml::impl::set_children_default_ns | ( | xmlNodePtr | node, |
xmlNsPtr | default_ns | ||
) |
Set the node and its children default namespace to the given.
It is necessary to do when a node is inserted into a document which has a default namespace declared.
node | The node to start from. |
default_ns | The pointer to the document default namespace |
Definition at line 117 of file node_manip.cpp.
References has_default_ns_definition().
Referenced by node_insert(), and node_replace().
void xml::impl::update_children_default_ns | ( | xmlNodePtr | node, |
xmlNsPtr | newns | ||
) |
Replaces the node and its children default namespace with the given.
It is required when a default namespace definition is added to the node.
node | The node to start from. |
newns | The namespace to be set |
Definition at line 157 of file node_manip.cpp.
References has_default_ns_definition().
Referenced by xml::node::add_namespace_def().