Hauptseite   Klassenhierarchie   Übersicht   Auflistung der Dateien   Datenstruktur-Elemente   Datei-Elemente  

idx_holder.h

gehe zur Dokumentation dieser Datei
00001 
00012 #ifndef __IDX_HOLDER_H__
00013 #define __IDX_HOLDER_H__
00014 
00015 #include <global.h>
00016 
00017 #if !defined(CLASSIC_MODE) && defined(FILL_SOLIDS)
00018 
00019 #include <node_index.h>
00020 
00021 #if defined(LIMITED_STACK) || defined(MARK_BORDER) 
00022 
00023 #ifdef USE_QUEUE 
00024 
00025 #include <utils/data_queue.h>
00026 
00027 #else // !USE_QUEUE
00028 
00029 #include <utils/data_stack.h>
00030 
00031 #endif // !USE_QUEUE
00032 
00033 #else // !LIMITED_STACK && !MARK_BORDER
00034 
00035 #include <utils/data_holder.h>
00036 
00037 #ifdef USE_QUEUE
00038 
00039 #include <queue>
00040 
00041 #else // !USE_QUEUE
00042 
00043 #include <stack>
00044 
00045 #endif // !USE_QUEUE
00046 
00047 #endif // !LIMITED_STACK && !MARK_BORDER
00048 
00059 #if defined(MARK_BORDER) || defined(LIMITED_STACK)
00060 
00061 #if MAX_RECURSIVE_DEEP <= 0 
00062 
00067 #define HOLDER_SIZE (DIMENSIONS << treeHight)
00068 
00069 #else // MAX_RECURSIVE_DEEP > 0
00070 
00075 #define HOLDER_SIZE MAX_RECURSIVE_DEEP
00076 
00077 #endif // MAX_RECURSIVE_DEEP > 0
00078 
00079 #ifdef USE_QUEUE
00080 
00081 class IdxHolder : public DataQueue<NodeIndex> {
00082 
00083 #else // !USE_QUEUE
00084 
00085 class IdxHolder : public DataStack<NodeIndex> {
00086 
00087 #endif // !USE_QUEUE
00088 
00089 #else // !MARK_BORDER && !LIMITED_STACK
00090 
00091 class IdxHolder {
00092 
00093 #endif // !MARK_BORDER && !LIMITED_STACK
00094 
00095  public:
00100   inline IdxHolder(Hight treeHight) 
00101 #if defined(LIMITED_STACK) || defined(MARK_BORDER)
00102 
00103 #ifdef USE_QUEUE
00104 
00105     : DataQueue<NodeIndex>(HOLDER_SIZE) {
00106 
00107 #else // !USE_QUEUE
00108 
00109     : DataStack<NodeIndex>(HOLDER_SIZE) {
00110 
00111 #endif // !USE_QUEUE
00112 
00113 #else // !LIMITED_STACK && !MARK_BORDER
00114     {
00115 
00116 #endif // !LIMITED_STACK && !MARK_BORDER
00117 
00118     }
00119 
00125   NodeIndex get();
00126 
00131   bool isEmpty(); 
00132 
00137   bool isFull(); 
00138 
00143   void put(NodeIndex item); 
00144 
00145 #if !defined(MARK_BORDER) && !defined(LIMITED_STACK)
00146  private:
00150 #ifdef USE_QUEUE
00151   queue<NodeIndex> pool;
00152 #else // !USE_QUEUE  
00153   stack<NodeIndex> pool;
00154 #endif // !USE_QUEUE
00155 
00156 #endif // !MARK_BORDER && !LIMITED_STACK
00157 
00158 };
00159 
00160 #endif // !CLASSIC_MODE && FILL_SOLIDS
00161 
00162 #endif // ! __IDX_HOLDER_H__

Erzeugt am Fri Mar 14 19:44:50 2003 für cad2octree von doxygen1.2.16