#include <CurPath.hpp>
Public Methods | |
| CurPath () | |
| void | AddLabel (TLabelID labelid) | 
| TLabelID | RemoveLabel () | 
| void | InitIterator (CurPathIterator *it) | 
      
  | 
  
| 
 
 Definition at line 102 of file CurPath.hpp.  | 
  
      
  | 
  
| 
 
 Definition at line 114 of file CurPath.hpp. 00116    {
00117 #ifdef PROFILE
00118       curdepth++;
00119          if(curdepth>maxdepth)
00120             maxdepth=curdepth;
00121 #endif
00122 
00123       if(curlabel==curblock->labels+CURPATH_LABELBLOCKSIZE)
00124          // Is there not enough space in the current block?
00125          // ==> Create new block, if there is no next block
00126          // (We never delete blocks)
00127       {
00128          if(curblock->next==NULL)
00129          {
00130             curblock->next=new CurPathLabelBlock();
00131             curblock->next->prev=curblock;
00132             curblock->next->next=NULL;
00133          }
00134          curblock=curblock->next;
00135 
00136          // We set the new current label
00137          curlabel=curblock->labels;
00138       }
00139       *curlabel=labelid;
00140       curlabel++;
00141    }
 | 
  
      
  | 
  
| 
 
 Definition at line 164 of file CurPath.hpp. 00166    {
00167       it->curblock=curblock;
00168       it->curlabel=curlabel;
00169    }
 | 
  
      
  | 
  
| 
 
 Definition at line 143 of file CurPath.hpp. 00145    {
00146 #ifdef PROFILE
00147       curdepth--;
00148 #endif
00149 
00150       curlabel--;
00151       if(curlabel==curblock->labels-1)
00152          // If the label in the previou block?
00153          // Go one block back
00154       {
00155          curblock=curblock->prev;
00156          if(curblock==NULL)   // No previous block? => Exit
00157             return LABEL_UNDEFINED;
00158 
00159          curlabel=curblock->labels+CURPATH_LABELBLOCKSIZE-1;
00160       }
00161       return *curlabel;
00162    }
 | 
  
1.2.11.1 written by Dimitri van Heesch,
 © 1997-2001