dsrtncsr.h

00001 /*
00002  *
00003  *  Copyright (C) 2000-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: DSRTreeNodeCursor
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:05:28 $
00027  *  CVS/RCS Revision: $Revision: 1.12 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 
00035 #ifndef DSRTNCSR_H
00036 #define DSRTNCSR_H
00037 
00038 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
00039 
00040 #include "dcmtk/ofstd/ofstring.h"
00041 #include "dcmtk/ofstd/ofstack.h"
00042 #include "dcmtk/ofstd/oflist.h"
00043 
00044 
00045 /*-----------------------*
00046  *  forward declaration  *
00047  *-----------------------*/
00048 
00049 class DSRTreeNode;
00050 
00051 
00052 /*-------------------*
00053  *  type definition  *
00054  *-------------------*/
00055 
00056 // this typedef is needed to avoid a warning on Sun CC 2.0.1
00057 typedef DSRTreeNode *DSRTreeNodePointer;
00058 
00059 
00060 /*---------------------*
00061  *  class declaration  *
00062  *---------------------*/
00063 
00066 class DSRTreeNodeCursor
00067 {
00068 
00069   public:
00070 
00073     DSRTreeNodeCursor();
00074 
00078     DSRTreeNodeCursor(const DSRTreeNodeCursor &cursor);
00079 
00083     DSRTreeNodeCursor(DSRTreeNode *node);
00084 
00087     virtual ~DSRTreeNodeCursor();
00088 
00093     DSRTreeNodeCursor &operator=(const DSRTreeNodeCursor &cursor);
00094 
00099     DSRTreeNodeCursor &operator=(DSRTreeNode *node);
00100 
00103     virtual void clear();
00104 
00108     virtual OFBool isValid() const;
00109 
00113     inline DSRTreeNode *getNode() const
00114     {
00115         return NodeCursor;
00116     }
00117 
00122     const DSRTreeNode *getParentNode();
00123 
00128     const DSRTreeNode *getNextNode() const;
00129 
00133     size_t gotoPrevious();
00134 
00138     size_t gotoNext();
00139 
00143     size_t goUp();
00144 
00148     size_t goDown();
00149 
00155     size_t iterate(const OFBool searchIntoSub = OFTrue);
00156 
00161     size_t gotoNode(const size_t searchID);
00162 
00170     size_t gotoNode(const OFString &position,
00171                     const char separator = '.');
00172 
00178     size_t getNodeID() const;
00179 
00184     size_t getLevel() const;
00185 
00197     const OFString &getPosition(OFString &position,
00198                                 const char separator = '.') const;
00199 
00200 
00201   protected:
00202 
00205     void clearNodeCursorStack();
00206 
00212     size_t setCursor(DSRTreeNode *node);
00213 
00215     DSRTreeNode *NodeCursor;
00217     OFStack< DSRTreeNodePointer > NodeCursorStack;
00218 
00220     size_t Position;
00222     OFList<size_t> PositionList;
00223 };
00224 
00225 
00226 #endif
00227 
00228 
00229 /*
00230  *  CVS/RCS Log:
00231  *  $Log: dsrtncsr.h,v $
00232  *  Revision 1.12  2005/12/08 16:05:28  meichel
00233  *  Changed include path schema for all DCMTK header files
00234  *
00235  *  Revision 1.11  2005/07/27 16:36:14  joergr
00236  *  Added flag to iterate() method indicating whether to perform a "deep search".
00237  *
00238  *  Revision 1.10  2003/08/07 12:55:46  joergr
00239  *  Updated documentation to get rid of doxygen warnings.
00240  *
00241  *  Revision 1.9  2001/12/18 09:55:06  meichel
00242  *  Introduced typedef to avoid warning on Sun CC 2.0.1
00243  *
00244  *  Revision 1.8  2001/03/28 09:06:56  joergr
00245  *  Fixed bug in cycle/loop detection "algorithm".
00246  *
00247  *  Revision 1.7  2000/11/09 20:32:08  joergr
00248  *  Added support for non-ASCII characters in HTML 3.2 (use numeric value).
00249  *
00250  *  Revision 1.6  2000/11/07 18:14:31  joergr
00251  *  Enhanced support for by-reference relationships.
00252  *
00253  *  Revision 1.5  2000/10/26 14:20:49  joergr
00254  *  Generalized routine to get and search for position strings ("1.2.3").
00255  *
00256  *  Revision 1.4  2000/10/18 17:09:06  joergr
00257  *  Made some functions inline.
00258  *
00259  *  Revision 1.3  2000/10/16 16:31:08  joergr
00260  *  Updated comments.
00261  *
00262  *  Revision 1.2  2000/10/16 11:57:00  joergr
00263  *  Added doc++ comments.
00264  *
00265  *  Revision 1.1  2000/10/13 07:49:34  joergr
00266  *  Added new module 'dcmsr' providing access to DICOM structured reporting
00267  *  documents (supplement 23).  Doc++ documentation not yet completed.
00268  *
00269  *
00270  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5