Coin Logo http://www.sim.no/
http://www.coin3d.org/

document.h

00001 #ifndef COIN_XMLDOCUMENT_H
00002 #define COIN_XMLDOCUMENT_H
00003 
00004 /**************************************************************************\
00005  *
00006  *  This file is part of the Coin 3D visualization library.
00007  *  Copyright (C) 1998-2008 by Kongsberg SIM.  All rights reserved.
00008  *
00009  *  This library is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU General Public License
00011  *  ("GPL") version 2 as published by the Free Software Foundation.
00012  *  See the file LICENSE.GPL at the root directory of this source
00013  *  distribution for additional information about the GNU GPL.
00014  *
00015  *  For using Coin with software that can not be combined with the GNU
00016  *  GPL, and for taking advantage of the additional benefits of our
00017  *  support services, please contact Kongsberg SIM about acquiring
00018  *  a Coin Professional Edition License.
00019  *
00020  *  See http://www.coin3d.org/ for more information.
00021  *
00022  *  Kongsberg SIM, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
00023  *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
00024  *
00025 \**************************************************************************/
00026 
00027 #include <Inventor/C/XML/types.h>
00028 
00029 /* ********************************************************************** */
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif /* __cplusplus */
00034 
00035 /* basic construction */
00036 COIN_DLL_API cc_xml_doc * cc_xml_doc_new(void);
00037 COIN_DLL_API void cc_xml_doc_delete_x(cc_xml_doc * doc);
00038 
00039 /* parser configuration */
00040 COIN_DLL_API void cc_xml_doc_set_filter_cb_x(cc_xml_doc * doc, cc_xml_filter_cb * cb, void * userdata);
00041 COIN_DLL_API void cc_xml_doc_get_filter_cb(const cc_xml_doc * doc, cc_xml_filter_cb *& cb, void *& userdata);
00042 
00043 /* document io */
00044 COIN_DLL_API SbBool cc_xml_doc_read_file_x(cc_xml_doc * doc, const char * path);
00045 COIN_DLL_API SbBool cc_xml_doc_read_buffer_x(cc_xml_doc * doc, const char * buffer, size_t buflen);
00046 
00047 COIN_DLL_API SbBool cc_xml_doc_parse_buffer_partial_x(cc_xml_doc * doc, const char * buffer, size_t buflen);
00048 COIN_DLL_API SbBool cc_xml_doc_parse_buffer_partial_done_x(cc_xml_doc * doc, const char * buffer, size_t buflen);
00049 
00050 COIN_DLL_API SbBool cc_xml_doc_write_to_buffer(const cc_xml_doc * doc, char *& buffer, size_t & bytes);
00051 COIN_DLL_API SbBool cc_xml_doc_write_to_file(const cc_xml_doc * doc, const char * path);
00052 
00053 COIN_DLL_API cc_xml_path * cc_xml_doc_diff(const cc_xml_doc * doc, const cc_xml_doc * other);
00054 
00055 /* document attributes */
00056 COIN_DLL_API void cc_xml_doc_set_encoding_x(cc_xml_doc * doc, const char * encoding);
00057 COIN_DLL_API const char * cc_xml_doc_get_encoding(const cc_xml_doc * doc);
00058 
00059 COIN_DLL_API void cc_xml_doc_set_filename_x(cc_xml_doc * doc, const char * path);
00060 COIN_DLL_API const char * cc_xml_doc_get_filename(const cc_xml_doc * doc);
00061 
00062 /* misc... */
00063 
00064 COIN_DLL_API cc_xml_elt *   cc_xml_doc_get_root(const cc_xml_doc * doc);
00065 COIN_DLL_API void           cc_xml_doc_set_current_x(cc_xml_doc * doc, cc_xml_elt * elt);
00066 COIN_DLL_API cc_xml_elt *   cc_xml_doc_get_current(const cc_xml_doc * doc);
00067 COIN_DLL_API void           cc_xml_doc_strip_whitespace_x(cc_xml_doc * doc);
00068 
00069 COIN_DLL_API void           cc_xml_doc_set_root_x(cc_xml_doc * doc, cc_xml_elt * root);
00070 
00071 COIN_DLL_API const cc_xml_elt * cc_xml_doc_find_element(const cc_xml_doc * doc, cc_xml_path * path);
00072 COIN_DLL_API const cc_xml_elt * cc_xml_doc_find_next_element(const cc_xml_doc * doc, cc_xml_elt * elt, cc_xml_path * path);
00073 COIN_DLL_API cc_xml_elt *       cc_xml_doc_create_element_x(cc_xml_doc * doc, cc_xml_path * path);
00074 
00075 
00076 #ifdef __cplusplus
00077 } /* extern "C" */
00078 #endif /* __cplusplus */
00079 
00080 #endif /* !COIN_XML_DOCUMENT_H */

Copyright © 1998-2008 by Kongsberg SIM. All rights reserved.

Generated on Tue Oct 7 21:18:29 2008 for Coin by Doxygen 1.4.7.