00001 /* 00002 * 00003 * Copyright (C) 2003-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmsr 00019 * 00020 * Author: Joerg Riesmeier 00021 * 00022 * Purpose: 00023 * classes: DSRXMLCursor 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:05:35 $ 00027 * CVS/RCS Revision: $Revision: 1.6 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DSRXMLC_H 00036 #define DSRXMLC_H 00037 00038 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00039 00040 #include "dcmtk/ofstd/oftypes.h" /* for definition of OFBool */ 00041 00042 #define INCLUDE_CSTDLIB 00043 #define INCLUDE_CSTDDEF 00044 #include "dcmtk/ofstd/ofstdinc.h" 00045 00046 #ifdef WITH_LIBXML 00047 #include <libxml/parser.h> 00048 #endif 00049 00050 00051 /*--------------------* 00052 * type definitions * 00053 *--------------------*/ 00054 00055 #ifndef WITH_LIBXML 00056 // define pointer type if 'libxml' absent 00057 typedef void (*xmlNodePtr); 00058 #endif 00059 00060 00061 /*-----------------------* 00062 * forward declaration * 00063 *-----------------------*/ 00064 00065 class DSRXMLDocument; 00066 00067 00068 /*---------------------* 00069 * class declaration * 00070 *---------------------*/ 00071 00077 class DSRXMLCursor 00078 { 00079 00080 // allow DSRXMLDocument to access private member variable 'Node' directly 00081 friend class DSRXMLDocument; 00082 00083 00084 public: 00085 00088 DSRXMLCursor(); 00089 00093 DSRXMLCursor(const DSRXMLCursor &cursor); 00094 00097 virtual ~DSRXMLCursor(); 00098 00103 DSRXMLCursor &operator=(const DSRXMLCursor &cursor); 00104 00109 inline OFBool valid() const 00110 { 00111 return (Node != NULL); 00112 } 00113 00118 DSRXMLCursor &gotoNext(); 00119 00124 DSRXMLCursor &gotoChild(); 00125 00130 DSRXMLCursor getNext() const; 00131 00136 DSRXMLCursor getChild() const; 00137 00138 00139 private: 00140 00142 xmlNodePtr Node; 00143 }; 00144 00145 00146 #endif 00147 00148 00149 /* 00150 * CVS/RCS Log: 00151 * $Log: dsrxmlc.h,v $ 00152 * Revision 1.6 2005/12/08 16:05:35 meichel 00153 * Changed include path schema for all DCMTK header files 00154 * 00155 * Revision 1.5 2003/10/06 09:51:43 joergr 00156 * Replaced wrong newline character sequence. 00157 * 00158 * Revision 1.4 2003/09/04 10:14:30 joergr 00159 * Combined two #include "ofstdinc.h" statements. 00160 * 00161 * Revision 1.3 2003/09/03 16:00:11 meichel 00162 * Added standard includes needed on Win32 00163 * 00164 * Revision 1.2 2003/08/29 12:52:02 joergr 00165 * Replaced inclusion of unistd.h by cstddef/stddef.h to compile under Windows 00166 * with libxml support (required for definition of NULL). 00167 * 00168 * Revision 1.1 2003/08/07 12:16:37 joergr 00169 * Added interface classes hiding the access to libxml (document and cursor 00170 * class). 00171 * 00172 * 00173 */