OFFIS DCMTK  Version 3.6.0
dsrxmlc.h
1 /*
2  *
3  * Copyright (C) 2003-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmsr
15  *
16  * Author: Joerg Riesmeier
17  *
18  * Purpose:
19  * classes: DSRXMLCursor
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:33 $
23  * CVS/RCS Revision: $Revision: 1.7 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DSRXMLC_H
32 #define DSRXMLC_H
33 
34 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
35 
36 #include "dcmtk/ofstd/oftypes.h" /* for definition of OFBool */
37 
38 #define INCLUDE_CSTDLIB
39 #define INCLUDE_CSTDDEF
40 #include "dcmtk/ofstd/ofstdinc.h"
41 
42 #ifdef WITH_LIBXML
43 #include <libxml/parser.h>
44 #endif
45 
46 
47 /*--------------------*
48  * type definitions *
49  *--------------------*/
50 
51 #ifndef WITH_LIBXML
52 // define pointer type if 'libxml' absent
53 typedef void (*xmlNodePtr);
54 #endif
55 
56 
57 /*-----------------------*
58  * forward declaration *
59  *-----------------------*/
60 
61 class DSRXMLDocument;
62 
63 
64 /*---------------------*
65  * class declaration *
66  *---------------------*/
67 
74 {
75 
76  // allow DSRXMLDocument to access private member variable 'Node' directly
77  friend class DSRXMLDocument;
78 
79 
80  public:
81 
84  DSRXMLCursor();
85 
89  DSRXMLCursor(const DSRXMLCursor &cursor);
90 
93  virtual ~DSRXMLCursor();
94 
99  DSRXMLCursor &operator=(const DSRXMLCursor &cursor);
100 
105  inline OFBool valid() const
106  {
107  return (Node != NULL);
108  }
109 
115 
121 
126  DSRXMLCursor getNext() const;
127 
132  DSRXMLCursor getChild() const;
133 
134 
135  private:
136 
138  xmlNodePtr Node;
139 };
140 
141 
142 #endif
143 
144 
145 /*
146  * CVS/RCS Log:
147  * $Log: dsrxmlc.h,v $
148  * Revision 1.7 2010-10-14 13:16:33 joergr
149  * Updated copyright header. Added reference to COPYRIGHT file.
150  *
151  * Revision 1.6 2005-12-08 16:05:35 meichel
152  * Changed include path schema for all DCMTK header files
153  *
154  * Revision 1.5 2003/10/06 09:51:43 joergr
155  * Replaced wrong newline character sequence.
156  *
157  * Revision 1.4 2003/09/04 10:14:30 joergr
158  * Combined two #include "ofstdinc.h" statements.
159  *
160  * Revision 1.3 2003/09/03 16:00:11 meichel
161  * Added standard includes needed on Win32
162  *
163  * Revision 1.2 2003/08/29 12:52:02 joergr
164  * Replaced inclusion of unistd.h by cstddef/stddef.h to compile under Windows
165  * with libxml support (required for definition of NULL).
166  *
167  * Revision 1.1 2003/08/07 12:16:37 joergr
168  * Added interface classes hiding the access to libxml (document and cursor
169  * class).
170  *
171  *
172  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2