00001 /* 00002 * 00003 * Copyright (C) 1994-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: dcmnet 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: List class with procedural API compatible to MIR CTN 00023 * 00024 * Last Update: $Author: meichel $ 00025 * Update Date: $Date: 2005/12/08 16:02:25 $ 00026 * Source File: $Source: /share/dicom/cvs-depot/dcmtk/dcmnet/include/dcmtk/dcmnet/lst.h,v $ 00027 * CVS/RCS Revision: $Revision: 1.5 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef LST_H 00035 #define LST_H 00036 00037 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00038 #include "dcmtk/ofstd/ofcond.h" 00039 #include "dcmtk/ofstd/oflist.h" 00040 00041 00044 class LST_HEAD 00045 { 00046 public: 00048 LST_HEAD(); 00049 00051 ~LST_HEAD(); 00052 00056 void push_back(void *node); 00057 00061 void *dequeue(); 00062 00066 size_t size() const; 00067 00071 void *front(); 00072 00077 void *position(void *node); 00078 00084 void *next(); 00085 00090 void *current() const; 00091 00092 00093 private: 00095 OFList<void *> theList; 00096 00098 OFListIterator(void *) theIterator; 00099 }; 00100 00101 00102 // -------------------------------------------------------------------- 00103 // THE FOLLOWING PROCEDURAL API IS COMPATIBLE TO THE MIR CTN LST MODULE 00104 // -------------------------------------------------------------------- 00105 00107 typedef void LST_NODE; 00108 00111 LST_HEAD *LST_Create(); 00112 00116 OFCondition LST_Destroy(LST_HEAD **lst); 00117 00120 OFCondition LST_Enqueue(LST_HEAD **lst, void *node); 00121 00125 void *LST_Dequeue(LST_HEAD **lst); 00126 00129 void *LST_Pop(LST_HEAD **lst); 00130 00133 unsigned long LST_Count(LST_HEAD **lst); 00134 00138 void *LST_Head(LST_HEAD **lst); 00139 00142 void *LST_Current(LST_HEAD **lst); 00143 00147 void *LST_Next(LST_HEAD **lst); 00148 00154 void *LST_Position(LST_HEAD **lst, void *node); 00155 00156 #endif 00157 00158 /* 00159 * CVS Log 00160 * $Log: lst.h,v $ 00161 * Revision 1.5 2005/12/08 16:02:25 meichel 00162 * Changed include path schema for all DCMTK header files 00163 * 00164 * Revision 1.4 2003/06/02 16:44:11 meichel 00165 * Renamed local variables to avoid name clashes with STL 00166 * 00167 * Revision 1.3 2001/10/12 10:17:32 meichel 00168 * Re-implemented the LST module (double linked list functions) 00169 * used in the dcmnet module from scratch based on OFList. 00170 * 00171 * Revision 1.2 1999/03/29 11:20:00 meichel 00172 * Cleaned up dcmnet code for char* to const char* assignments. 00173 * 00174 * Revision 1.1.1.1 1996/03/26 18:38:45 hewett 00175 * Initial Release. 00176 * 00177 */