Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
xom_macros.h
1 #ifndef ELM_XOM_MACROS_H
2 #define ELM_XOM_MACROS_H
3 
4 #include <elm/xom/Node.h>
5 #include <libxml/tree.h>
6 
7 #define DOC(p) ((xmlDocPtr)(p))
8 #define NODE(p) ((xmlNodePtr)(p))
9 
10 namespace elm { namespace xom {
11 
17 inline Node *Node::get(void *xml_node) {
18  if(NODE(xml_node)->_private)
19  return (Node *)(NODE(xml_node)->_private);
20  else
21  return make(xml_node);
22 }
23 
24 } } // elm::xom
25 
26 #endif // ELM_XOM_MACROS_H
Node * get(void *node)
Definition: xom_macros.h:17
Node * make(void *node)
Definition: xom_Node.cpp:143
Definition: Node.h:40