Lolly 1.4.27
Loading...
Searching...
No Matches
Classes | Macros | Variables
classdef.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  concrete_struct
 Structure representing a concrete object with a reference count. More...
 
struct  abstract_struct
 Structure representing an abstract object with a reference count. More...
 

Macros

#define TM_DEBUG(x)
 Debugging macro used to disable debugging output.
 
#define INC_COUNT(R)    { (R)->ref_count++; }
 Macro used to increment the reference count for a structure object.
 
#define DEC_COUNT(R)
 Macro used to decrement the reference count for a structure object and delete it if the count reaches 0.
 
#define INC_COUNT_NULL(R)
 Macro used to increment the reference count for a structure object, only if the object is not NULL.
 
#define DEC_COUNT_NULL(R)
 Macro used to decrement the reference count for a structure object and delete it if the count reaches 0, only if the object is not NULL.
 
#define CONCRETE(PTR)
 Macro used to define a concrete smart pointer with reference counting.
 
#define CONCRETE_CODE(PTR)
 Macro used to define the implementation of a concrete smart pointer.
 
#define CONCRETE_TEMPLATE(PTR, T)
 Macro used to define a concrete smart pointer with reference counting for a single template parameter.
 
#define CONCRETE_TEMPLATE_CODE(PTR, TT, T)
 Macro used to define the implementation of a concrete smart pointer with reference counting for a single template parameter.
 
#define CONCRETE_TEMPLATE_2(PTR, T1, T2)
 Macro used to define a concrete smart pointer with reference counting for two template parameters.
 
#define CONCRETE_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2)
 Macro used to define the implementation of a concrete smart pointer with reference counting for two template parameters.
 
#define ABSTRACT(PTR)
 Macro to define an abstract pointer type.
 
#define ABSTRACT_CODE(PTR)
 Macro to define an abstract pointer type with code.
 
#define ABSTRACT_TEMPLATE(PTR, T)
 Macro to define a templated abstract pointer type.
 
#define ABSTRACT_TEMPLATE_CODE(PTR, TT, T)
 Macro to define a templated abstract pointer type with code.
 
#define CONCRETE_NULL(PTR)
 Macro to define a concrete null pointer type.
 
#define CONCRETE_NULL_CODE(PTR)
 Code for the concrete null pointer type.
 
#define CONCRETE_NULL_TEMPLATE(PTR, T)
 Macro to define a templated concrete null pointer type.
 
#define CONCRETE_NULL_TEMPLATE_CODE(PTR, TT, T)
 Code for the templated concrete null pointer type.
 
#define CONCRETE_NULL_TEMPLATE_2(PTR, T1, T2)
 Macro for concrete null indirect structure two-template-parameter definition.
 
#define CONCRETE_NULL_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2)
 Macro for concrete null indirect structure two-template-parameter code definition.
 
#define ABSTRACT_NULL(PTR)
 Macro for abstract null indirect structure definition.
 
#define ABSTRACT_NULL_CODE(PTR)
 Macro for abstract null indirect structure code definition.
 
#define ABSTRACT_NULL_TEMPLATE(PTR, T)
 Macro for abstract null indirect structure template definition.
 
#define ABSTRACT_NULL_TEMPLATE_CODE(PTR, TT, T)
 Macro for abstract null indirect structure template code definition.
 
#define ABSTRACT_NULL_TEMPLATE_2(PTR, T1, T2)
 Macro for abstract null indirect structure two-template-parameter definition.
 
#define ABSTRACT_NULL_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2)
 Macro for abstract null indirect structure two-template-parameter code definition.
 
#define EXTEND(BASE, PTR)
 Macro for extension of a base indirect structure with an abstract indirect structure.
 
#define EXTEND_CODE(BASE, PTR)
 Macro for extension of a base indirect structure with an abstract indirect structure code implementation.
 
#define EXTEND_NULL(BASE, PTR)
 Macro for extension of a base indirect structure with a concrete null indirect structure.
 
#define EXTEND_NULL_CODE(BASE, PTR)
 Macro for extension of a base indirect structure with a concrete null indirect structure code implementation.
 
#define EXTEND_NULL_TEMPLATE(BASE, PTR, T)
 Macro for extension of a base indirect structure with a concrete null indirect structure with a template parameter.
 
#define EXTEND_NULL_TEMPLATE_CODE(BASE, PTR, TT, T)
 Macro for extension of a base indirect structure with a concrete null indirect structure with a template parameter code implementation.
 

Variables

int concrete_count
 Global variable holding the number of concrete structures currently active.
 
int abstract_count
 Global variable holding the number of abstract structures currently active.
 

Detailed Description

defines concrete and abstract base structures.

Author
Joris van der Hoeven
Date
1999

Definition in file classdef.hpp.

Macro Definition Documentation

◆ TM_DEBUG

#define TM_DEBUG ( x)

Debugging macro used to disable debugging output.

Definition at line 13 of file classdef.hpp.

◆ INC_COUNT

#define INC_COUNT ( R)     { (R)->ref_count++; }

Macro used to increment the reference count for a structure object.

Parameters
RThe structure object to increment the reference count for.

Definition at line 74 of file classdef.hpp.

74#define INC_COUNT(R) \
75 { (R)->ref_count++; }

◆ DEC_COUNT

#define DEC_COUNT ( R)
Value:
{ \
if (0 == --((R)->ref_count)) { \
} \
}
The list class represents a linked list.
Definition list.hpp:48

Macro used to decrement the reference count for a structure object and delete it if the count reaches 0.

Parameters
RThe structure object to decrement the reference count for and delete if necessary.

Definition at line 84 of file classdef.hpp.

84#define DEC_COUNT(R) \
85 { \
86 if (0 == --((R)->ref_count)) { \
87 tm_delete (R); \
88 } \
89 }

◆ INC_COUNT_NULL

#define INC_COUNT_NULL ( R)
Value:
{ \
if ((R) != NULL) (R)->ref_count++; \
}

Macro used to increment the reference count for a structure object, only if the object is not NULL.

Parameters
RThe structure object to increment the reference count for.

Definition at line 98 of file classdef.hpp.

98#define INC_COUNT_NULL(R) \
99 { \
100 if ((R) != NULL) (R)->ref_count++; \
101 }

◆ DEC_COUNT_NULL

#define DEC_COUNT_NULL ( R)
Value:
{ \
if ((R) != NULL && 0 == --((R)->ref_count)) { \
R= NULL; \
} \
}

Macro used to decrement the reference count for a structure object and delete it if the count reaches 0, only if the object is not NULL.

Parameters
RThe structure object to decrement the reference count for and delete if necessary.

Definition at line 112 of file classdef.hpp.

112#define DEC_COUNT_NULL(R) \
113 { \
114 if ((R) != NULL && 0 == --((R)->ref_count)) { \
115 tm_delete (R); \
116 R= NULL; \
117 } \
118 }

◆ CONCRETE

#define CONCRETE ( PTR)
Value:
PTR##_rep* rep; \
\
public: \
inline PTR (const PTR&); \
inline ~PTR (); \
inline PTR##_rep* operator->(); \
inline PTR& operator= (PTR x)
base class of resources
Definition resource.hpp:23

Macro used to define a concrete smart pointer with reference counting.

The PTR parameter should be a valid identifier that will be used as the name of the smart pointer type.

The macro defines the following:

  • An opaque pointer to the implementation class, named PTR##_rep;
  • A public copy constructor and destructor for the smart pointer, and a pointer dereference operator;
  • A public assignment operator that decrements the reference count for the old object and increments the reference count for the new object.
Parameters
PTRThe name of the concrete smart pointer type to be defined.

Definition at line 137 of file classdef.hpp.

137#define CONCRETE(PTR) \
138 PTR##_rep* rep; \
139 \
140public: \
141 inline PTR (const PTR&); \
142 inline ~PTR (); \
143 inline PTR##_rep* operator->(); \
144 inline PTR& operator= (PTR x)

◆ CONCRETE_CODE

#define CONCRETE_CODE ( PTR)
Value:
inline PTR::PTR (const PTR& x) : rep (x.rep) { INC_COUNT (this->rep); } \
inline PTR::~PTR () { DEC_COUNT (this->rep); } \
inline PTR##_rep* PTR::operator->() { return rep; } \
inline PTR& PTR::operator= (PTR x) { \
INC_COUNT (x.rep); \
DEC_COUNT (this->rep); \
this->rep= x.rep; \
return *this; \
}
#define DEC_COUNT(R)
Macro used to decrement the reference count for a structure object and delete it if the count reaches...
Definition classdef.hpp:84
#define INC_COUNT(R)
Macro used to increment the reference count for a structure object.
Definition classdef.hpp:74
list(T item)
Construct a new list object with a single item.
Definition list.hpp:137

Macro used to define the implementation of a concrete smart pointer.

This macro defines the following:

  • A copy constructor that increments the reference count for the new object;
  • A destructor that decrements the reference count for the old object;
  • A pointer dereference operator that returns the implementation pointer;
  • An assignment operator that decrements the reference count for the old object, increments the reference count for the new object, and updates the implementation pointer.
Parameters
PTRThe name of the concrete smart pointer type to be defined.

Definition at line 159 of file classdef.hpp.

159#define CONCRETE_CODE(PTR) \
160 inline PTR::PTR (const PTR& x) : rep (x.rep) { INC_COUNT (this->rep); } \
161 inline PTR::~PTR () { DEC_COUNT (this->rep); } \
162 inline PTR##_rep* PTR::operator->() { return rep; } \
163 inline PTR& PTR::operator= (PTR x) { \
164 INC_COUNT (x.rep); \
165 DEC_COUNT (this->rep); \
166 this->rep= x.rep; \
167 return *this; \
168 }

◆ CONCRETE_TEMPLATE

#define CONCRETE_TEMPLATE ( PTR,
T )
Value:
\
public: \
inline PTR (const PTR<T>&); \
inline ~PTR (); \
inline PTR##_rep<T>* operator->(); \

Macro used to define a concrete smart pointer with reference counting for a single template parameter.

The PTR parameter should be a valid identifier that will be used as the name of the smart pointer type. The T parameter should be a valid template parameter that will be used as the type of the managed object.

The macro defines the following:

  • An opaque pointer to the implementation class, named PTR##_rep<T>;
  • A public copy constructor and destructor for the smart pointer, and a pointer dereference operator;
  • A public assignment operator that decrements the reference count for the old object and increments the reference count for the new object.
Parameters
PTRThe name of the concrete smart pointer type to be defined.
TThe type of the managed object.

Definition at line 190 of file classdef.hpp.

190#define CONCRETE_TEMPLATE(PTR, T) \
191 PTR##_rep<T>* rep; \
192 \
193public: \
194 inline PTR (const PTR<T>&); \
195 inline ~PTR (); \
196 inline PTR##_rep<T>* operator->(); \
197 inline PTR<T>& operator= (PTR<T> x)

◆ CONCRETE_TEMPLATE_CODE

#define CONCRETE_TEMPLATE_CODE ( PTR,
TT,
T )
Value:
template <TT T> inline PTR<T>::PTR (const PTR<T>& x) : rep (x.rep) { \
INC_COUNT (this->rep); \
} \
template <TT T> inline PTR<T>::~PTR () { DEC_COUNT (this->rep); } \
template <TT T> inline PTR##_rep<T>* PTR<T>::operator->() { \
return this->rep; \
} \
template <TT T> inline PTR<T>& PTR<T>::operator= (PTR<T> x) { \
INC_COUNT (x.rep); \
DEC_COUNT (this->rep); \
this->rep= x.rep; \
return *this; \
}

Macro used to define the implementation of a concrete smart pointer with reference counting for a single template parameter.

This macro defines the following:

  • A copy constructor that increments the reference count for the new object;
  • A destructor that decrements the reference count for the old object;
  • A pointer dereference operator that returns the implementation pointer;
  • An assignment operator that decrements the reference count for the old object, increments the reference count for the new object, and updates the implementation pointer.
Parameters
PTRThe name of the concrete smart pointer type to be defined.
TTThe template parameter type.
TThe type of the managed object.

Definition at line 215 of file classdef.hpp.

215#define CONCRETE_TEMPLATE_CODE(PTR, TT, T) \
216 template <TT T> inline PTR<T>::PTR (const PTR<T>& x) : rep (x.rep) { \
217 INC_COUNT (this->rep); \
218 } \
219 template <TT T> inline PTR<T>::~PTR () { DEC_COUNT (this->rep); } \
220 template <TT T> inline PTR##_rep<T>* PTR<T>::operator->() { \
221 return this->rep; \
222 } \
223 template <TT T> inline PTR<T>& PTR<T>::operator= (PTR<T> x) { \
224 INC_COUNT (x.rep); \
225 DEC_COUNT (this->rep); \
226 this->rep= x.rep; \
227 return *this; \
228 }

◆ CONCRETE_TEMPLATE_2

#define CONCRETE_TEMPLATE_2 ( PTR,
T1,
T2 )
Value:
\
public: \
inline PTR (const PTR<T1, T2>&); \
inline ~PTR (); \
inline PTR##_rep<T1, T2>* operator->(); \

Macro used to define a concrete smart pointer with reference counting for two template parameters.

The PTR parameter should be a valid identifier that will be used as the name of the smart pointer type. The T1 and T2 parameters should be valid template parameters that will be used as the types of the managed objects.

The macro defines the following:

  • An opaque pointer to the implementation class, named PTR##_rep<T1, T2>;
  • A public copy constructor and destructor for the smart pointer, and a pointer dereference operator;
  • A public assignment operator that decrements the reference count for the old object and increments the reference count for the new object.
Parameters
PTRThe name of the concrete smart pointer type to be defined.
T1The first type of the managed object.
T2The second type of the managed object.

Definition at line 251 of file classdef.hpp.

251#define CONCRETE_TEMPLATE_2(PTR, T1, T2) \
252 PTR##_rep<T1, T2>* rep; \
253 \
254public: \
255 inline PTR (const PTR<T1, T2>&); \
256 inline ~PTR (); \
257 inline PTR##_rep<T1, T2>* operator->(); \
258 inline PTR<T1, T2>& operator= (PTR<T1, T2> x)

◆ CONCRETE_TEMPLATE_2_CODE

#define CONCRETE_TEMPLATE_2_CODE ( PTR,
TT1,
T1,
TT2,
T2 )
Value:
template <TT1 T1, TT2 T2> \
inline PTR<T1, T2>::PTR (const PTR<T1, T2>& x) : rep (x.rep) { \
INC_COUNT (this->rep); \
} \
template <TT1 T1, TT2 T2> inline PTR<T1, T2>::~PTR () { \
DEC_COUNT (this->rep); \
} \
template <TT1 T1, TT2 T2> \
return this->rep; \
} \
template <TT1 T1, TT2 T2> \
INC_COUNT (x.rep); \
DEC_COUNT (this->rep); \
this->rep= x.rep; \
return *this; \
}

Macro used to define the implementation of a concrete smart pointer with reference counting for two template parameters.

This macro defines the following:

  • A copy constructor that increments the reference count for the new object;
  • A destructor that decrements the reference count for the old object;
  • A pointer dereference operator that returns the implementation pointer;
  • An assignment operator that decrements the reference count for the old object, increments the reference count for the new object, and updates the implementation pointer.
Parameters
PTRThe name of the concrete smart pointer type to be defined.
TT1The first template parameter type.
T1The first type of the managed object.
TT2The second template parameter type.
T2The second type of the managed object.

Definition at line 278 of file classdef.hpp.

278#define CONCRETE_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2) \
279 template <TT1 T1, TT2 T2> \
280 inline PTR<T1, T2>::PTR (const PTR<T1, T2>& x) : rep (x.rep) { \
281 INC_COUNT (this->rep); \
282 } \
283 template <TT1 T1, TT2 T2> inline PTR<T1, T2>::~PTR () { \
284 DEC_COUNT (this->rep); \
285 } \
286 template <TT1 T1, TT2 T2> \
287 inline PTR##_rep<T1, T2>* PTR<T1, T2>::operator->() { \
288 return this->rep; \
289 } \
290 template <TT1 T1, TT2 T2> \
291 inline PTR<T1, T2>& PTR<T1, T2>::operator= (PTR<T1, T2> x) { \
292 INC_COUNT (x.rep); \
293 DEC_COUNT (this->rep); \
294 this->rep= x.rep; \
295 return *this; \
296 }

◆ ABSTRACT

#define ABSTRACT ( PTR)
Value:
inline PTR (PTR##_rep*)
#define CONCRETE(PTR)
Macro used to define a concrete smart pointer with reference counting.
Definition classdef.hpp:137

Macro to define an abstract pointer type.

Parameters
PTRThe name of the abstract pointer type to define.

Definition at line 306 of file classdef.hpp.

306#define ABSTRACT(PTR) \
307 CONCRETE (PTR); \
308 inline PTR (PTR##_rep*)

◆ ABSTRACT_CODE

#define ABSTRACT_CODE ( PTR)
Value:
inline PTR::PTR (PTR##_rep* rep2) : rep (rep2) { INC_COUNT (this->rep); }
#define CONCRETE_CODE(PTR)
Macro used to define the implementation of a concrete smart pointer.
Definition classdef.hpp:159

Macro to define an abstract pointer type with code.

Parameters
PTRThe name of the abstract pointer type to define.

Definition at line 315 of file classdef.hpp.

315#define ABSTRACT_CODE(PTR) \
316 CONCRETE_CODE (PTR); \
317 inline PTR::PTR (PTR##_rep* rep2) : rep (rep2) { INC_COUNT (this->rep); }

◆ ABSTRACT_TEMPLATE

#define ABSTRACT_TEMPLATE ( PTR,
T )
Value:
inline PTR (PTR##_rep<T>*)
#define CONCRETE_TEMPLATE(PTR, T)
Macro used to define a concrete smart pointer with reference counting for a single template parameter...
Definition classdef.hpp:190

Macro to define a templated abstract pointer type.

Parameters
PTRThe name of the abstract pointer type to define.
TThe template parameter of the abstract pointer type.

Definition at line 325 of file classdef.hpp.

325#define ABSTRACT_TEMPLATE(PTR, T) \
326 CONCRETE_TEMPLATE (PTR, T); \
327 inline PTR (PTR##_rep<T>*)

◆ ABSTRACT_TEMPLATE_CODE

#define ABSTRACT_TEMPLATE_CODE ( PTR,
TT,
T )
Value:
template <TT T> inline PTR<T>::PTR (PTR##_rep<T>* rep2) : rep (rep2) { \
INC_COUNT (this->rep); \
}
#define CONCRETE_TEMPLATE_CODE(PTR, TT, T)
Macro used to define the implementation of a concrete smart pointer with reference counting for a sin...
Definition classdef.hpp:215

Macro to define a templated abstract pointer type with code.

Parameters
PTRThe name of the abstract pointer type to define.
TTThe template parameter type of the concrete implementation.
TThe template parameter of the abstract pointer type.

Definition at line 336 of file classdef.hpp.

336#define ABSTRACT_TEMPLATE_CODE(PTR, TT, T) \
337 CONCRETE_TEMPLATE_CODE (PTR, TT, T); \
338 template <TT T> inline PTR<T>::PTR (PTR##_rep<T>* rep2) : rep (rep2) { \
339 INC_COUNT (this->rep); \
340 }

◆ CONCRETE_NULL

#define CONCRETE_NULL ( PTR)
Value:
inline PTR (); \
friend bool is_nil /*LESSGTR*/ (PTR x)
bool is_nil(blackbox x)
Definition blackbox.hpp:29

Macro to define a concrete null pointer type.

Parameters
PTRThe name of the concrete null pointer type to define.

Definition at line 354 of file classdef.hpp.

354#define CONCRETE_NULL(PTR) \
355 CONCRETE (PTR); \
356 inline PTR (); \
357 friend bool is_nil /*LESSGTR*/ (PTR x)

◆ CONCRETE_NULL_CODE

#define CONCRETE_NULL_CODE ( PTR)
Value:
inline PTR::PTR () : rep (NULL) {} \
inline PTR::PTR (const PTR& x) : rep (x.rep) { INC_COUNT_NULL (this->rep); } \
inline PTR::~PTR () { DEC_COUNT_NULL (this->rep); } \
inline PTR##_rep* PTR::operator->() { return this->rep; } \
inline PTR& PTR::operator= (PTR x) { \
DEC_COUNT_NULL (this->rep); \
this->rep= x.rep; \
return *this; \
} \
inline bool is_nil (PTR x) { return x.rep == NULL; }
#define DEC_COUNT_NULL(R)
Macro used to decrement the reference count for a structure object and delete it if the count reaches...
Definition classdef.hpp:112
#define INC_COUNT_NULL(R)
Macro used to increment the reference count for a structure object, only if the object is not NULL.
Definition classdef.hpp:98

Code for the concrete null pointer type.

Parameters
PTRThe name of the concrete null pointer type.

Definition at line 364 of file classdef.hpp.

364#define CONCRETE_NULL_CODE(PTR) \
365 inline PTR::PTR () : rep (NULL) {} \
366 inline PTR::PTR (const PTR& x) : rep (x.rep) { INC_COUNT_NULL (this->rep); } \
367 inline PTR::~PTR () { DEC_COUNT_NULL (this->rep); } \
368 inline PTR##_rep* PTR::operator->() { return this->rep; } \
369 inline PTR& PTR::operator= (PTR x) { \
370 INC_COUNT_NULL (x.rep); \
371 DEC_COUNT_NULL (this->rep); \
372 this->rep= x.rep; \
373 return *this; \
374 } \
375 inline bool is_nil (PTR x) { return x.rep == NULL; }

◆ CONCRETE_NULL_TEMPLATE

#define CONCRETE_NULL_TEMPLATE ( PTR,
T )
Value:
inline PTR (); \
friend bool is_nil LESSGTR (PTR<T> x)
#define LESSGTR
Macro used for template specialization of less than and greater than operators.
Definition basic.hpp:22

Macro to define a templated concrete null pointer type.

Parameters
PTRThe name of the templated concrete null pointer type to define.
TThe template parameter type of the concrete null pointer type.

Definition at line 383 of file classdef.hpp.

383#define CONCRETE_NULL_TEMPLATE(PTR, T) \
384 CONCRETE_TEMPLATE (PTR, T); \
385 inline PTR (); \
386 friend bool is_nil LESSGTR (PTR<T> x)

◆ CONCRETE_NULL_TEMPLATE_CODE

#define CONCRETE_NULL_TEMPLATE_CODE ( PTR,
TT,
T )
Value:
template <TT T> inline PTR<T>::PTR () : rep (NULL) {} \
template <TT T> inline PTR<T>::PTR (const PTR<T>& x) : rep (x.rep) { \
INC_COUNT_NULL (this->rep); \
} \
template <TT T> inline PTR<T>::~PTR () { DEC_COUNT_NULL (this->rep); } \
template <TT T> inline PTR##_rep<T>* PTR<T>::operator->() { \
return this->rep; \
} \
template <TT T> inline PTR<T>& PTR<T>::operator= (PTR<T> x) { \
DEC_COUNT_NULL (this->rep); \
this->rep= x.rep; \
return *this; \
} \
template <TT T> inline bool is_nil (PTR<T> x) { return x.rep == NULL; }

Code for the templated concrete null pointer type.

Parameters
PTRThe name of the templated concrete null pointer type.
TTThe template parameter type of the concrete implementation.
TThe template parameter of the concrete null pointer type.

Definition at line 395 of file classdef.hpp.

395#define CONCRETE_NULL_TEMPLATE_CODE(PTR, TT, T) \
396 template <TT T> inline PTR<T>::PTR () : rep (NULL) {} \
397 template <TT T> inline PTR<T>::PTR (const PTR<T>& x) : rep (x.rep) { \
398 INC_COUNT_NULL (this->rep); \
399 } \
400 template <TT T> inline PTR<T>::~PTR () { DEC_COUNT_NULL (this->rep); } \
401 template <TT T> inline PTR##_rep<T>* PTR<T>::operator->() { \
402 return this->rep; \
403 } \
404 template <TT T> inline PTR<T>& PTR<T>::operator= (PTR<T> x) { \
405 INC_COUNT_NULL (x.rep); \
406 DEC_COUNT_NULL (this->rep); \
407 this->rep= x.rep; \
408 return *this; \
409 } \
410 template <TT T> inline bool is_nil (PTR<T> x) { return x.rep == NULL; }

◆ CONCRETE_NULL_TEMPLATE_2

#define CONCRETE_NULL_TEMPLATE_2 ( PTR,
T1,
T2 )
Value:
CONCRETE_TEMPLATE_2 (PTR, T1, T2); \
inline PTR (); \
friend bool is_nil LESSGTR (PTR<T1, T2> x)
#define CONCRETE_TEMPLATE_2(PTR, T1, T2)
Macro used to define a concrete smart pointer with reference counting for two template parameters.
Definition classdef.hpp:251

Macro for concrete null indirect structure two-template-parameter definition.

Parameters
PTRPointer type of the concrete null indirect structure.
T1First template parameter of the concrete null indirect structure.
T2Second template parameter of the concrete null indirect structure.

Definition at line 419 of file classdef.hpp.

419#define CONCRETE_NULL_TEMPLATE_2(PTR, T1, T2) \
420 CONCRETE_TEMPLATE_2 (PTR, T1, T2); \
421 inline PTR (); \
422 friend bool is_nil LESSGTR (PTR<T1, T2> x)

◆ CONCRETE_NULL_TEMPLATE_2_CODE

#define CONCRETE_NULL_TEMPLATE_2_CODE ( PTR,
TT1,
T1,
TT2,
T2 )
Value:
template <TT1 T1, TT2 T2> inline PTR<T1, T2>::PTR () : rep (NULL) {} \
template <TT1 T1, TT2 T2> \
inline PTR<T1, T2>::PTR (const PTR<T1, T2>& x) : rep (x.rep) { \
INC_COUNT_NULL (this->rep); \
} \
template <TT1 T1, TT2 T2> inline PTR<T1, T2>::~PTR () { \
DEC_COUNT_NULL (this->rep); \
} \
template <TT1 T1, TT2 T2> PTR##_rep<T1, T2>* PTR<T1, T2>::operator->() { \
return this->rep; \
} \
template <TT1 T1, TT2 T2> \
DEC_COUNT_NULL (this->rep); \
this->rep= x.rep; \
return *this; \
} \
template <TT1 T1, TT2 T2> inline bool is_nil (PTR<T1, T2> x) { \
return x.rep == NULL; \
}

Macro for concrete null indirect structure two-template-parameter code definition.

Parameters
PTRPointer type of the concrete null indirect structure.
TT1Template type of the first template parameter of the concrete null indirect structure.
T1First template parameter of the concrete null indirect structure.
TT2Template type of the second template parameter of the concrete null indirect structure.
T2Second template parameter of the concrete null indirect structure.

Definition at line 435 of file classdef.hpp.

435#define CONCRETE_NULL_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2) \
436 template <TT1 T1, TT2 T2> inline PTR<T1, T2>::PTR () : rep (NULL) {} \
437 template <TT1 T1, TT2 T2> \
438 inline PTR<T1, T2>::PTR (const PTR<T1, T2>& x) : rep (x.rep) { \
439 INC_COUNT_NULL (this->rep); \
440 } \
441 template <TT1 T1, TT2 T2> inline PTR<T1, T2>::~PTR () { \
442 DEC_COUNT_NULL (this->rep); \
443 } \
444 template <TT1 T1, TT2 T2> PTR##_rep<T1, T2>* PTR<T1, T2>::operator->() { \
445 return this->rep; \
446 } \
447 template <TT1 T1, TT2 T2> \
448 inline PTR<T1, T2>& PTR<T1, T2>::operator= (PTR<T1, T2> x) { \
449 INC_COUNT_NULL (x.rep); \
450 DEC_COUNT_NULL (this->rep); \
451 this->rep= x.rep; \
452 return *this; \
453 } \
454 template <TT1 T1, TT2 T2> inline bool is_nil (PTR<T1, T2> x) { \
455 return x.rep == NULL; \
456 }

◆ ABSTRACT_NULL

#define ABSTRACT_NULL ( PTR)
Value:
inline PTR (PTR##_rep*)
#define CONCRETE_NULL(PTR)
Macro to define a concrete null pointer type.
Definition classdef.hpp:354

Macro for abstract null indirect structure definition.

Parameters
PTRPointer type of the abstract null indirect structure.

Definition at line 466 of file classdef.hpp.

466#define ABSTRACT_NULL(PTR) \
467 CONCRETE_NULL (PTR); \
468 inline PTR (PTR##_rep*)

◆ ABSTRACT_NULL_CODE

#define ABSTRACT_NULL_CODE ( PTR)
Value:
inline PTR::PTR (PTR##_rep* rep2) : rep (rep2) { INC_COUNT_NULL (this->rep); }
#define CONCRETE_NULL_CODE(PTR)
Code for the concrete null pointer type.
Definition classdef.hpp:364

Macro for abstract null indirect structure code definition.

Parameters
PTRPointer type of the abstract null indirect structure.

Definition at line 474 of file classdef.hpp.

474#define ABSTRACT_NULL_CODE(PTR) \
475 CONCRETE_NULL_CODE (PTR); \
476 inline PTR::PTR (PTR##_rep* rep2) : rep (rep2) { INC_COUNT_NULL (this->rep); }

◆ ABSTRACT_NULL_TEMPLATE

#define ABSTRACT_NULL_TEMPLATE ( PTR,
T )
Value:
inline PTR (PTR##_rep<T>*)
#define CONCRETE_NULL_TEMPLATE(PTR, T)
Macro to define a templated concrete null pointer type.
Definition classdef.hpp:383

Macro for abstract null indirect structure template definition.

Parameters
PTRPointer type of the abstract null indirect structure.
TTemplate parameter of the abstract null indirect structure.

Definition at line 483 of file classdef.hpp.

483#define ABSTRACT_NULL_TEMPLATE(PTR, T) \
484 CONCRETE_NULL_TEMPLATE (PTR, T); \
485 inline PTR (PTR##_rep<T>*)

◆ ABSTRACT_NULL_TEMPLATE_CODE

#define ABSTRACT_NULL_TEMPLATE_CODE ( PTR,
TT,
T )
Value:
template <TT T> inline PTR<T>::PTR (PTR##_rep<T>* rep2) : rep (rep2) { \
INC_COUNT (this->rep); \
}
#define CONCRETE_NULL_TEMPLATE_CODE(PTR, TT, T)
Code for the templated concrete null pointer type.
Definition classdef.hpp:395

Macro for abstract null indirect structure template code definition.

Parameters
PTRPointer type of the abstract null indirect structure.
TTTemplate type of the abstract null indirect structure.
TTemplate parameter of the abstract null indirect structure.

Definition at line 493 of file classdef.hpp.

493#define ABSTRACT_NULL_TEMPLATE_CODE(PTR, TT, T) \
494 CONCRETE_NULL_TEMPLATE_CODE (PTR, TT, T); \
495 template <TT T> inline PTR<T>::PTR (PTR##_rep<T>* rep2) : rep (rep2) { \
496 INC_COUNT (this->rep); \
497 }

◆ ABSTRACT_NULL_TEMPLATE_2

#define ABSTRACT_NULL_TEMPLATE_2 ( PTR,
T1,
T2 )
Value:
inline PTR (PTR##_rep<T1, T2>*)
#define CONCRETE_NULL_TEMPLATE_2(PTR, T1, T2)
Macro for concrete null indirect structure two-template-parameter definition.
Definition classdef.hpp:419

Macro for abstract null indirect structure two-template-parameter definition.

Parameters
PTRPointer type of the abstract null indirect structure.
T1First template parameter of the abstract null indirect structure.
T2Second template parameter of the abstract null indirect structure.

Definition at line 506 of file classdef.hpp.

506#define ABSTRACT_NULL_TEMPLATE_2(PTR, T1, T2) \
507 CONCRETE_NULL_TEMPLATE_2 (PTR, T1, T2); \
508 inline PTR (PTR##_rep<T1, T2>*)

◆ ABSTRACT_NULL_TEMPLATE_2_CODE

#define ABSTRACT_NULL_TEMPLATE_2_CODE ( PTR,
TT1,
T1,
TT2,
T2 )
Value:
template <TT1 T1, TT2 T2> \
INC_COUNT (this->rep); \
}
#define CONCRETE_NULL_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2)
Macro for concrete null indirect structure two-template-parameter code definition.
Definition classdef.hpp:435

Macro for abstract null indirect structure two-template-parameter code definition.

Parameters
PTRPointer type of the abstract null indirect structure.
TT1Template type of the first template parameter of the abstract null indirect structure.
T1First template parameter of the abstract null indirect structure.
TT2Template type of the second template parameter of the abstract null indirect structure.
T2Second template parameter of the abstract null indirect structure.

Definition at line 521 of file classdef.hpp.

521#define ABSTRACT_NULL_TEMPLATE_2_CODE(PTR, TT1, T1, TT2, T2) \
522 CONCRETE_NULL_TEMPLATE_2_CODE (PTR, TT1, T1, TT2, T2); \
523 template <TT1 T1, TT2 T2> \
524 inline PTR<T1, T2>::PTR (PTR##_rep<T1, T2>* rep2) : rep (rep2) { \
525 INC_COUNT (this->rep); \
526 }

◆ EXTEND

#define EXTEND ( BASE,
PTR )
Value:
inline PTR (BASE&); \
inline operator BASE ()
#define ABSTRACT(PTR)
Macro to define an abstract pointer type.
Definition classdef.hpp:306

Macro for extension of a base indirect structure with an abstract indirect structure.

Parameters
BASEBase indirect structure.
PTRAbstract indirect structure.

Definition at line 540 of file classdef.hpp.

540#define EXTEND(BASE, PTR) \
541 ABSTRACT (PTR); \
542 inline PTR (BASE&); \
543 inline operator BASE ()

◆ EXTEND_CODE

#define EXTEND_CODE ( BASE,
PTR )
Value:
inline PTR::PTR (BASE& x) : rep (static_cast<PTR##_rep*> (x.rep)) { \
INC_COUNT (this->rep); \
} \
inline PTR::operator BASE () { return BASE (this->rep); }
#define ABSTRACT_CODE(PTR)
Macro to define an abstract pointer type with code.
Definition classdef.hpp:315

Macro for extension of a base indirect structure with an abstract indirect structure code implementation.

Parameters
BASEBase indirect structure.
PTRAbstract indirect structure.

Definition at line 552 of file classdef.hpp.

552#define EXTEND_CODE(BASE, PTR) \
553 ABSTRACT_CODE (PTR); \
554 inline PTR::PTR (BASE& x) : rep (static_cast<PTR##_rep*> (x.rep)) { \
555 INC_COUNT (this->rep); \
556 } \
557 inline PTR::operator BASE () { return BASE (this->rep); }

◆ EXTEND_NULL

#define EXTEND_NULL ( BASE,
PTR )
Value:
inline PTR (BASE&); \
inline operator BASE ()
#define ABSTRACT_NULL(PTR)
Macro for abstract null indirect structure definition.
Definition classdef.hpp:466

Macro for extension of a base indirect structure with a concrete null indirect structure.

Parameters
BASEBase indirect structure.
PTRConcrete null indirect structure.

Definition at line 569 of file classdef.hpp.

569#define EXTEND_NULL(BASE, PTR) \
570 ABSTRACT_NULL (PTR); \
571 inline PTR (BASE&); \
572 inline operator BASE ()

◆ EXTEND_NULL_CODE

#define EXTEND_NULL_CODE ( BASE,
PTR )
Value:
inline PTR::PTR (BASE& x) : rep (static_cast<PTR##_rep*> (x.rep)) { \
INC_COUNT_NULL (this->rep); \
} \
inline PTR::operator BASE () { return BASE (this->rep); }
#define ABSTRACT_NULL_CODE(PTR)
Macro for abstract null indirect structure code definition.
Definition classdef.hpp:474

Macro for extension of a base indirect structure with a concrete null indirect structure code implementation.

Parameters
BASEBase indirect structure.
PTRConcrete null indirect structure.

Definition at line 581 of file classdef.hpp.

581#define EXTEND_NULL_CODE(BASE, PTR) \
582 ABSTRACT_NULL_CODE (PTR); \
583 inline PTR::PTR (BASE& x) : rep (static_cast<PTR##_rep*> (x.rep)) { \
584 INC_COUNT_NULL (this->rep); \
585 } \
586 inline PTR::operator BASE () { return BASE (this->rep); }

◆ EXTEND_NULL_TEMPLATE

#define EXTEND_NULL_TEMPLATE ( BASE,
PTR,
T )
Value:
inline PTR<T> (BASE&); \
inline operator BASE ()
#define ABSTRACT_NULL_TEMPLATE(PTR, T)
Macro for abstract null indirect structure template definition.
Definition classdef.hpp:483

Macro for extension of a base indirect structure with a concrete null indirect structure with a template parameter.

Parameters
BASEBase indirect structure.
PTRConcrete null indirect structure.
TTemplate parameter of the concrete null indirect structure.

Definition at line 596 of file classdef.hpp.

596#define EXTEND_NULL_TEMPLATE(BASE, PTR, T) \
597 ABSTRACT_NULL_TEMPLATE (PTR, T); \
598 inline PTR<T> (BASE&); \
599 inline operator BASE ()

◆ EXTEND_NULL_TEMPLATE_CODE

#define EXTEND_NULL_TEMPLATE_CODE ( BASE,
PTR,
TT,
T )
Value:
template <TT T> \
inline PTR<T>::PTR (BASE& x) : rep (static_cast<PTR##_rep<T>*> (x.rep)) { \
INC_COUNT_NULL (this->rep); \
} \
template <TT T> inline PTR<T>::operator BASE () { return BASE (this->rep); }
#define ABSTRACT_NULL_TEMPLATE_CODE(PTR, TT, T)
Macro for abstract null indirect structure template code definition.
Definition classdef.hpp:493

Macro for extension of a base indirect structure with a concrete null indirect structure with a template parameter code implementation.

Parameters
BASEBase indirect structure.
PTRConcrete null indirect structure.
TTTemplate type of the concrete null indirect structure.
TTemplate parameter of the concrete null indirect structure.

Definition at line 610 of file classdef.hpp.

610#define EXTEND_NULL_TEMPLATE_CODE(BASE, PTR, TT, T) \
611 ABSTRACT_NULL_TEMPLATE_CODE (PTR, TT, T); \
612 template <TT T> \
613 inline PTR<T>::PTR (BASE& x) : rep (static_cast<PTR##_rep<T>*> (x.rep)) { \
614 INC_COUNT_NULL (this->rep); \
615 } \
616 template <TT T> inline PTR<T>::operator BASE () { return BASE (this->rep); }

Variable Documentation

◆ concrete_count

int concrete_count
extern

Global variable holding the number of concrete structures currently active.

◆ abstract_count

int abstract_count
extern

Global variable holding the number of abstract structures currently active.