dcmsr/include/dcmtk/dcmsr/dsrxmlc.h

00001 /*
00002  *
00003  *  Copyright (C) 2003-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module: dcmsr
00015  *
00016  *  Author: Joerg Riesmeier
00017  *
00018  *  Purpose:
00019  *    classes: DSRXMLCursor
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:16:33 $
00023  *  CVS/RCS Revision: $Revision: 1.7 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 
00031 #ifndef DSRXMLC_H
00032 #define DSRXMLC_H
00033 
00034 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
00035 
00036 #include "dcmtk/ofstd/oftypes.h"    /* for definition of OFBool */
00037 
00038 #define INCLUDE_CSTDLIB
00039 #define INCLUDE_CSTDDEF
00040 #include "dcmtk/ofstd/ofstdinc.h"
00041 
00042 #ifdef WITH_LIBXML
00043 #include <libxml/parser.h>
00044 #endif
00045 
00046 
00047 /*--------------------*
00048  *  type definitions  *
00049  *--------------------*/
00050 
00051 #ifndef WITH_LIBXML
00052 // define pointer type if 'libxml' absent
00053 typedef void (*xmlNodePtr);
00054 #endif
00055 
00056 
00057 /*-----------------------*
00058  *  forward declaration  *
00059  *-----------------------*/
00060 
00061 class DSRXMLDocument;
00062 
00063 
00064 /*---------------------*
00065  *  class declaration  *
00066  *---------------------*/
00067 
00073 class DSRXMLCursor
00074 {
00075 
00076     // allow DSRXMLDocument to access private member variable 'Node' directly
00077     friend class DSRXMLDocument;
00078 
00079 
00080   public:
00081 
00084     DSRXMLCursor();
00085 
00089     DSRXMLCursor(const DSRXMLCursor &cursor);
00090 
00093     virtual ~DSRXMLCursor();
00094 
00099     DSRXMLCursor &operator=(const DSRXMLCursor &cursor);
00100 
00105     inline OFBool valid() const
00106     {
00107         return (Node != NULL);
00108     }
00109 
00114     DSRXMLCursor &gotoNext();
00115 
00120     DSRXMLCursor &gotoChild();
00121 
00126     DSRXMLCursor getNext() const;
00127 
00132     DSRXMLCursor getChild() const;
00133 
00134 
00135   private:
00136 
00138     xmlNodePtr Node;
00139 };
00140 
00141 
00142 #endif
00143 
00144 
00145 /*
00146  *  CVS/RCS Log:
00147  *  $Log: dsrxmlc.h,v $
00148  *  Revision 1.7  2010-10-14 13:16:33  joergr
00149  *  Updated copyright header. Added reference to COPYRIGHT file.
00150  *
00151  *  Revision 1.6  2005-12-08 16:05:35  meichel
00152  *  Changed include path schema for all DCMTK header files
00153  *
00154  *  Revision 1.5  2003/10/06 09:51:43  joergr
00155  *  Replaced wrong newline character sequence.
00156  *
00157  *  Revision 1.4  2003/09/04 10:14:30  joergr
00158  *  Combined two #include "ofstdinc.h" statements.
00159  *
00160  *  Revision 1.3  2003/09/03 16:00:11  meichel
00161  *  Added standard includes needed on Win32
00162  *
00163  *  Revision 1.2  2003/08/29 12:52:02  joergr
00164  *  Replaced inclusion of unistd.h by cstddef/stddef.h to compile under Windows
00165  *  with libxml support (required for definition of NULL).
00166  *
00167  *  Revision 1.1  2003/08/07 12:16:37  joergr
00168  *  Added interface classes hiding the access to libxml (document and cursor
00169  *  class).
00170  *
00171  *
00172  */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1