Revision 1131 trunk/src/tools99/adstring.hpp

adstring.hpp (revision 1131)
66 66
//#define HERE cout << "reached line " << __LINE__ << " in " << __FILE__ << endl;
67 67
#define HERE
68 68

  
69
#define USE_CONST
70
#ifdef USE_CONST
71
  #define _CONST const
72
#else
73
  #define _CONST
74
#endif
69
#define _CONST const
70

  
75 71
class adstring_shape
76 72
{
77 73
  unsigned int sz;
......
117 113
  unsigned int buff_size(void);
118 114
  unsigned char &operator()(const int i);
119 115
  unsigned char &operator[](const int i);
120
#ifdef USE_CONST
121 116
  const unsigned char& operator()(const int i) const;
122 117
  const unsigned char& operator[](const int i) const;
123
#endif
124 118

  
125 119
#ifdef __INTEL_COMPILER
126 120
  friend adstring operator+(const adstring &u, const char* v)
......
159 153
    { return(!(*this==u)); }
160 154

  
161 155
  adstring operator()(int i, int j);
162
  #if defined(USE_CONST)
163 156
  int operator==(const char* u) const;
164 157

  
165 158
  int operator==(const adstring &u) const;
166 159
  adstring operator()(int i, int j) const;
167
  #endif
168 160

  
169 161
  adstring& operator=(const adstring &t);
170 162
  adstring& operator=(const char t);
......
172 164

  
173 165
  operator unsigned char * ();
174 166
  operator char * ();
175
#ifdef USE_CONST
176 167
  operator const unsigned char*() const;
177 168
  operator const char*() const;
178
#endif
179 169

  
180 170
  // Pascal-like adstring functions
181 171

  
......
243 233
  adstring_array(int min,int max);
244 234
  void allocate(int min,int max);
245 235
  adstring_array(void);
246
  #ifdef USE_CONST
247 236
  const adstring& operator[](int i) const;
248 237
  const adstring& operator()(int i) const;
249
  #endif
250 238
  adstring& operator [] (int i);
251 239
  adstring& operator () (int i);
252 240
  adstring_array& operator += (const adstring& s);

Also available in: Unified diff