[Xmltools-development] xmltools/src xml-advhandler.h
Status: Beta
Brought to you by:
nik_89
|
From: Eli G. <ego...@us...> - 2005-01-06 20:34:59
|
Update of /cvsroot/xmltools/xmltools/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3592 Modified Files: xml-advhandler.h Log Message: Added doxygen comments to struct names, enums, constants, and functions. Index: xml-advhandler.h =================================================================== RCS file: /cvsroot/xmltools/xmltools/src/xml-advhandler.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml-advhandler.h 26 Dec 2004 20:53:45 -0000 1.2 --- xml-advhandler.h 6 Jan 2005 20:34:46 -0000 1.3 *************** *** 3,7 **** * It provides an easy way to input and output configurations from/to xml files * and handlers to deal with small or big xml databases. ! * Copyright (C) 2004 Nicholas Niro * * This library is free software; you can redistribute it and/or --- 3,7 ---- * It provides an easy way to input and output configurations from/to xml files * and handlers to deal with small or big xml databases. ! * Copyright (C) 2004 Nicholas Niro and Eli Gottlieb * * This library is free software; you can redistribute it and/or *************** *** 29,35 **** * Made by Eli Gottlieb */ ! ! /* Node structure used to have nodes linked in the standard libxml way. */ enum simple_type { --- 29,38 ---- * Made by Eli Gottlieb */ + /*! \file xml-advhandler.h + * \brief The XMLTools advanced routines header.*/ ! /*! ! * Represents the simple types of data used in XML, currently always ST_CDATA. ! */ enum simple_type { *************** *** 45,48 **** --- 48,52 ---- ST_NONE = 9 }; + /*! Represents an attribute with a simple type, value, and name. */ struct attribute { *************** *** 53,57 **** unsigned long name_length; }; ! typedef struct Txmlnode { --- 57,61 ---- unsigned long name_length; }; ! /*! Represents a node in the XML tree. */ typedef struct Txmlnode { *************** *** 82,99 **** void* children; unsigned long num_children; ! }xmlnode; const xmlnode nil_node = {0,0,0,ST_NONE,0,0,0,0,0,0,0,0,0}; xmlnode get_node_by_type_attrib(char* filename,char* type,char* attribute_name,char* attribute_value); xmlnode get_node_by_index(char* filename,unsigned long index); xmlnode get_node_by_content(char* filename,int is_contents_complex,void* contents,unsigned long contents_size); xmlnode get_node_by_attribute(char* filename,char* attribute_name,char* attribute_value); xmlnode get_node_by_type(char* filename,char* type); xmlnode xmlNodePtr_to_xmlnode(void* pnode); void* xmlnode_to_xmlNodePtr(xmlnode* pnode); ! /*This returns the node's index, ! * which may be newly created. ! */ int write_xmlnode_to_tree(xmlnode node); #endif --- 86,109 ---- void* children; unsigned long num_children; ! } xmlnode; + /*! A constant representing the xmlnode equivalent of NULL */ const xmlnode nil_node = {0,0,0,ST_NONE,0,0,0,0,0,0,0,0,0}; + /*! Gets a node from the internal tree by its type (in the <>'s) and an attribute. */ xmlnode get_node_by_type_attrib(char* filename,char* type,char* attribute_name,char* attribute_value); + /*! Gets a node by its index. This is assigned just by counting in the order nodes are encountered in the tree, 1, 2, 3... */ xmlnode get_node_by_index(char* filename,unsigned long index); + /*! Gets a node by its content. */ xmlnode get_node_by_content(char* filename,int is_contents_complex,void* contents,unsigned long contents_size); + /*! Gets a node by a given attribute alone. */ xmlnode get_node_by_attribute(char* filename,char* attribute_name,char* attribute_value); + /*! Gets a node by its type alone. */ xmlnode get_node_by_type(char* filename,char* type); + /*! Converts a libxml2 xmlNodePtr into an xmlnode struct. */ xmlnode xmlNodePtr_to_xmlnode(void* pnode); + /*! Converts an xmlnode into its corresponding xmlNodePtr */ void* xmlnode_to_xmlNodePtr(xmlnode* pnode); ! /*! Writes the xmlnode to the internal node tree and returns the node's index, which may be newly created. */ int write_xmlnode_to_tree(xmlnode node); #endif |