Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

symbol_marker Class Reference

List of all members.

Public Member Functions

 symbol_marker ()
 symbol_marker (int a_ptr, char a_pattern, int a_intro)
 symbol_marker (const symbol_marker &other)
void set (int a_ptr, char a_pattern, int a_intro)

Static Public Member Functions

symbol_markerget_lowest (symbol_marker markers[], int count)

Public Attributes

int ptr
char pattern
int intro

Constructor & Destructor Documentation

symbol_marker::symbol_marker  )  [inline]
 

Definition at line 92 of file cmt_symbol.cxx.

References intro, pattern, and ptr.

00093   {
00094     ptr = cmt_string::npos;
00095     pattern = 0;
00096     intro = 0;
00097   }

symbol_marker::symbol_marker int  a_ptr,
char  a_pattern,
int  a_intro
[inline]
 

Definition at line 99 of file cmt_symbol.cxx.

References intro, pattern, and ptr.

00100   {
00101     ptr = a_ptr;
00102     pattern = a_pattern;
00103     intro = a_intro;
00104   }

symbol_marker::symbol_marker const symbol_marker other  )  [inline]
 

Definition at line 106 of file cmt_symbol.cxx.

References intro, pattern, and ptr.

00107   {
00108     ptr = other.ptr;
00109     pattern = other.pattern;
00110     intro = other.intro;
00111   }


Member Function Documentation

symbol_marker& symbol_marker::get_lowest symbol_marker  markers[],
int  count
[inline, static]
 

Definition at line 120 of file cmt_symbol.cxx.

References ptr.

Referenced by resolve_value(), resolve_value_for_macros(), and suppress_OS_delimiters().

00121   {
00122     static symbol_marker result;
00123     int real_count = 0;
00124     int i;
00125 
00126       // Check that at least one marker has result
00127 
00128     for (i = 0; i < count; i++)
00129       {
00130         if (markers[i].ptr != cmt_string::npos) real_count++;
00131       }
00132 
00133     if (real_count == 0) return (result);
00134 
00135     // since we've passed the previous test, 
00136     // at least one entry is not npos.
00137     // Now discards other npos by moving them to the end
00138     
00139     for (i = 0; i < count;)
00140       {
00141         if (markers[i].ptr == cmt_string::npos)
00142           {
00143             markers[i] = markers[count-1];
00144             count--;
00145             if (count == 0) break;
00146           }
00147         else
00148           {
00149             i++;
00150           }
00151       }
00152     
00153     if (count == 0) return (result);
00154     
00155     // now all entries in [0, count-1] are not npos
00156     // let's sort the lowest one in [0]
00157     
00158     for (i = 1; i < count;)
00159       {
00160         if (markers[0].ptr > markers[i].ptr)
00161           {
00162             symbol_marker temp = markers[0];
00163             markers[0] = markers[i];
00164             markers[i] = temp;
00165             i = 1;
00166           }
00167         else
00168           {
00169             i++;
00170           }
00171       }
00172     
00173     return (markers[0]);
00174   }

void symbol_marker::set int  a_ptr,
char  a_pattern,
int  a_intro
[inline]
 

Definition at line 113 of file cmt_symbol.cxx.

References intro, pattern, and ptr.

Referenced by resolve_value(), resolve_value_for_macros(), and suppress_OS_delimiters().

00114   {
00115     ptr = a_ptr;
00116     pattern = a_pattern;
00117     intro = a_intro;
00118   }


Member Data Documentation

int symbol_marker::intro
 

Definition at line 178 of file cmt_symbol.cxx.

Referenced by resolve_value(), resolve_value_for_macros(), set(), suppress_OS_delimiters(), and symbol_marker().

char symbol_marker::pattern
 

Definition at line 177 of file cmt_symbol.cxx.

Referenced by resolve_value(), resolve_value_for_macros(), set(), suppress_OS_delimiters(), and symbol_marker().

int symbol_marker::ptr
 

Definition at line 176 of file cmt_symbol.cxx.

Referenced by get_lowest(), resolve_value(), resolve_value_for_macros(), set(), suppress_OS_delimiters(), and symbol_marker().


The documentation for this class was generated from the following file:
Generated on Mon May 2 10:26:03 2005 for CMT by doxygen 1.3.5