Lolly 1.4.27
Loading...
Searching...
No Matches
classdef.hpp
Go to the documentation of this file.
1/** \file classdef.hpp
2 * \copyright GPLv3
3 * \details defines concrete and abstract base structures.
4 * \author Joris van der Hoeven
5 * \date 1999
6 */
7
8#pragma once
9
10/**
11 * @brief Debugging macro used to disable debugging output.
12 */
13#define TM_DEBUG(x)
14
15/**
16 * @brief Global variable holding the number of concrete structures currently
17 * active.
18 */
19extern int concrete_count;
20
21/**
22 * @brief Structure representing a concrete object with a reference count.
23 */
25 int ref_count; ///< The reference count for the concrete object.
26
27 /**
28 * @brief Default constructor for the concrete object. Increments the
29 * reference count.
30 */
32
33 /**
34 * @brief Virtual destructor for the concrete object. Decrements the reference
35 * count.
36 */
37 virtual inline ~concrete_struct () { TM_DEBUG (concrete_count--); }
38};
39
40/**
41 * @brief Global variable holding the number of abstract structures currently
42 * active.
43 */
44extern int abstract_count;
45
46/**
47 * @brief Structure representing an abstract object with a reference count.
48 */
50 int ref_count; ///< The reference count for the abstract object.
51
52 /**
53 * @brief Default constructor for the abstract object. Sets the reference
54 * count to 0.
55 */
57
58 /**
59 * @brief Virtual destructor for the abstract object. Decrements the reference
60 * count.
61 */
62 virtual inline ~abstract_struct () { TM_DEBUG (abstract_count--); }
63};
64
65/******************************************************************************
66 * indirect structures
67 ******************************************************************************/
68
69/**
70 * @brief Macro used to increment the reference count for a structure object.
71 *
72 * @param R The structure object to increment the reference count for.
73 */
74#define INC_COUNT(R) \
75 { (R)->ref_count++; }
76
77/**
78 * @brief Macro used to decrement the reference count for a structure object and
79 * delete it if the count reaches 0.
80 *
81 * @param R The structure object to decrement the reference count for and delete
82 * if necessary.
83 */
84#define DEC_COUNT(R) \
85 { \
86 if (0 == --((R)->ref_count)) { \
87 tm_delete (R); \
88 } \
89 }
90// #define DEC_COUNT(R) { if(0==--((R)->ref_count)) { tm_delete (R); R=NULL;}}
91
92/**
93 * @brief Macro used to increment the reference count for a structure object,
94 * only if the object is not NULL.
95 *
96 * @param R The structure object to increment the reference count for.
97 */
98#define INC_COUNT_NULL(R) \
99 { \
100 if ((R) != NULL) (R)->ref_count++; \
101 }
102/*#define DEC_COUNT_NULL(R) \
103 { if ((R)!=NULL && 0==--((R)->ref_count)) { tm_delete (R); } } */
104
105/**
106 * @brief Macro used to decrement the reference count for a structure object and
107 * delete it if the count reaches 0, only if the object is not NULL.
108 *
109 * @param R The structure object to decrement the reference count for and delete
110 * if necessary.
111 */
112#define DEC_COUNT_NULL(R) \
113 { \
114 if ((R) != NULL && 0 == --((R)->ref_count)) { \
115 tm_delete (R); \
116 R= NULL; \
117 } \
118 }
119
120// concrete
121
122/**
123 * @brief Macro used to define a concrete smart pointer with reference counting.
124 *
125 * The PTR parameter should be a valid identifier that will be used as the name
126 * of the smart pointer type.
127 *
128 * The macro defines the following:
129 * - An opaque pointer to the implementation class, named PTR##_rep;
130 * - A public copy constructor and destructor for the smart pointer, and a
131 * pointer dereference operator;
132 * - A public assignment operator that decrements the reference count for the
133 * old object and increments the reference count for the new object.
134 *
135 * @param PTR The name of the concrete smart pointer type to be defined.
136 */
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)
145
146/**
147 * @brief Macro used to define the implementation of a concrete smart pointer.
148 *
149 * This macro defines the following:
150 * - A copy constructor that increments the reference count for the new object;
151 * - A destructor that decrements the reference count for the old object;
152 * - A pointer dereference operator that returns the implementation pointer;
153 * - An assignment operator that decrements the reference count for the old
154 * object, increments the reference count for the new object, and updates the
155 * implementation pointer.
156 *
157 * @param PTR The name of the concrete smart pointer type to be defined.
158 */
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 }
169
170// definition for 1 parameter template classes
171
172/**
173 * @brief Macro used to define a concrete smart pointer with reference counting
174 * for a single template parameter.
175 *
176 * The PTR parameter should be a valid identifier that will be used as the name
177 * of the smart pointer type. The T parameter should be a valid template
178 * parameter that will be used as the type of the managed object.
179 *
180 * The macro defines the following:
181 * - An opaque pointer to the implementation class, named PTR##_rep<T>;
182 * - A public copy constructor and destructor for the smart pointer, and a
183 * pointer dereference operator;
184 * - A public assignment operator that decrements the reference count for the
185 * old object and increments the reference count for the new object.
186 *
187 * @param PTR The name of the concrete smart pointer type to be defined.
188 * @param T The type of the managed object.
189 */
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)
198
199/**
200 * @brief Macro used to define the implementation of a concrete smart pointer
201 * with reference counting for a single template parameter.
202 *
203 * This macro defines the following:
204 * - A copy constructor that increments the reference count for the new object;
205 * - A destructor that decrements the reference count for the old object;
206 * - A pointer dereference operator that returns the implementation pointer;
207 * - An assignment operator that decrements the reference count for the old
208 * object, increments the reference count for the new object, and updates the
209 * implementation pointer.
210 *
211 * @param PTR The name of the concrete smart pointer type to be defined.
212 * @param TT The template parameter type.
213 * @param T The type of the managed object.
214 */
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 }
229
230// definition for 2 parameter template classes
231
232/**
233 * @brief Macro used to define a concrete smart pointer with reference counting
234 * for two template parameters.
235 *
236 * The PTR parameter should be a valid identifier that will be used as the name
237 * of the smart pointer type. The T1 and T2 parameters should be valid template
238 * parameters that will be used as the types of the managed objects.
239 *
240 * The macro defines the following:
241 * - An opaque pointer to the implementation class, named PTR##_rep<T1, T2>;
242 * - A public copy constructor and destructor for the smart pointer, and a
243 * pointer dereference operator;
244 * - A public assignment operator that decrements the reference count for the
245 * old object and increments the reference count for the new object.
246 *
247 * @param PTR The name of the concrete smart pointer type to be defined.
248 * @param T1 The first type of the managed object.
249 * @param T2 The second type of the managed object.
250 */
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)
259
260/**
261 * @brief Macro used to define the implementation of a concrete smart pointer
262 * with reference counting for two template parameters.
263 *
264 * This macro defines the following:
265 * - A copy constructor that increments the reference count for the new object;
266 * - A destructor that decrements the reference count for the old object;
267 * - A pointer dereference operator that returns the implementation pointer;
268 * - An assignment operator that decrements the reference count for the old
269 * object, increments the reference count for the new object, and updates the
270 * implementation pointer.
271 *
272 * @param PTR The name of the concrete smart pointer type to be defined.
273 * @param TT1 The first template parameter type.
274 * @param T1 The first type of the managed object.
275 * @param TT2 The second template parameter type.
276 * @param T2 The second type of the managed object.
277 */
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 }
297// end concrete
298
299// abstract
300
301/**
302 * @brief Macro to define an abstract pointer type.
303 *
304 * @param PTR The name of the abstract pointer type to define.
305 */
306#define ABSTRACT(PTR) \
307 CONCRETE (PTR); \
308 inline PTR (PTR##_rep*)
309
310/**
311 * @brief Macro to define an abstract pointer type with code.
312 *
313 * @param PTR The name of the abstract pointer type to define.
314 */
315#define ABSTRACT_CODE(PTR) \
316 CONCRETE_CODE (PTR); \
317 inline PTR::PTR (PTR##_rep* rep2) : rep (rep2) { INC_COUNT (this->rep); }
318
319/**
320 * @brief Macro to define a templated abstract pointer type.
321 *
322 * @param PTR The name of the abstract pointer type to define.
323 * @param T The template parameter of the abstract pointer type.
324 */
325#define ABSTRACT_TEMPLATE(PTR, T) \
326 CONCRETE_TEMPLATE (PTR, T); \
327 inline PTR (PTR##_rep<T>*)
328
329/**
330 * @brief Macro to define a templated abstract pointer type with code.
331 *
332 * @param PTR The name of the abstract pointer type to define.
333 * @param TT The template parameter type of the concrete implementation.
334 * @param T The template parameter of the abstract pointer type.
335 */
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 }
341// end abstract
342
343/******************************************************************************
344 * null indirect structures
345 ******************************************************************************/
346
347// concrete_null
348
349/**
350 * @brief Macro to define a concrete null pointer type.
351 *
352 * @param PTR The name of the concrete null pointer type to define.
353 */
354#define CONCRETE_NULL(PTR) \
355 CONCRETE (PTR); \
356 inline PTR (); \
357 friend bool is_nil /*LESSGTR*/ (PTR x)
358
359/**
360 * @brief Code for the concrete null pointer type.
361 *
362 * @param PTR The name of the concrete null pointer type.
363 */
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; }
376
377/**
378 * @brief Macro to define a templated concrete null pointer type.
379 *
380 * @param PTR The name of the templated concrete null pointer type to define.
381 * @param T The template parameter type of the concrete null pointer type.
382 */
383#define CONCRETE_NULL_TEMPLATE(PTR, T) \
384 CONCRETE_TEMPLATE (PTR, T); \
385 inline PTR (); \
386 friend bool is_nil LESSGTR (PTR<T> x)
387
388/**
389 * @brief Code for the templated concrete null pointer type.
390 *
391 * @param PTR The name of the templated concrete null pointer type.
392 * @param TT The template parameter type of the concrete implementation.
393 * @param T The template parameter of the concrete null pointer type.
394 */
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; }
411
412/**
413 * @brief Macro for concrete null indirect structure two-template-parameter
414 * definition.
415 * @param PTR Pointer type of the concrete null indirect structure.
416 * @param T1 First template parameter of the concrete null indirect structure.
417 * @param T2 Second template parameter of the concrete null indirect structure.
418 */
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)
423
424/**
425 * @brief Macro for concrete null indirect structure two-template-parameter code
426 * definition.
427 * @param PTR Pointer type of the concrete null indirect structure.
428 * @param TT1 Template type of the first template parameter of the concrete null
429 * indirect structure.
430 * @param T1 First template parameter of the concrete null indirect structure.
431 * @param TT2 Template type of the second template parameter of the concrete
432 * null indirect structure.
433 * @param T2 Second template parameter of the concrete null indirect structure.
434 */
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 }
457// end concrete_null
458
459// abstract_null
460
461/**
462 * @def ABSTRACT_NULL(PTR)
463 * @brief Macro for abstract null indirect structure definition.
464 * @param PTR Pointer type of the abstract null indirect structure.
465 */
466#define ABSTRACT_NULL(PTR) \
467 CONCRETE_NULL (PTR); \
468 inline PTR (PTR##_rep*)
469
470/**
471 * @brief Macro for abstract null indirect structure code definition.
472 * @param PTR Pointer type of the abstract null indirect structure.
473 */
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); }
477
478/**
479 * @brief Macro for abstract null indirect structure template definition.
480 * @param PTR Pointer type of the abstract null indirect structure.
481 * @param T Template parameter of the abstract null indirect structure.
482 */
483#define ABSTRACT_NULL_TEMPLATE(PTR, T) \
484 CONCRETE_NULL_TEMPLATE (PTR, T); \
485 inline PTR (PTR##_rep<T>*)
486
487/**
488 * @brief Macro for abstract null indirect structure template code definition.
489 * @param PTR Pointer type of the abstract null indirect structure.
490 * @param TT Template type of the abstract null indirect structure.
491 * @param T Template parameter of the abstract null indirect structure.
492 */
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 }
498
499/**
500 * @brief Macro for abstract null indirect structure two-template-parameter
501 * definition.
502 * @param PTR Pointer type of the abstract null indirect structure.
503 * @param T1 First template parameter of the abstract null indirect structure.
504 * @param T2 Second template parameter of the abstract null indirect structure.
505 */
506#define ABSTRACT_NULL_TEMPLATE_2(PTR, T1, T2) \
507 CONCRETE_NULL_TEMPLATE_2 (PTR, T1, T2); \
508 inline PTR (PTR##_rep<T1, T2>*)
509
510/**
511 * @brief Macro for abstract null indirect structure two-template-parameter code
512 * definition.
513 * @param PTR Pointer type of the abstract null indirect structure.
514 * @param TT1 Template type of the first template parameter of the abstract null
515 * indirect structure.
516 * @param T1 First template parameter of the abstract null indirect structure.
517 * @param TT2 Template type of the second template parameter of the abstract
518 * null indirect structure.
519 * @param T2 Second template parameter of the abstract null indirect structure.
520 */
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 }
527// end abstract_null
528
529/******************************************************************************
530 * extensions
531 ******************************************************************************/
532
533/**
534 * @def EXTEND(BASE, PTR)
535 * @brief Macro for extension of a base indirect structure with an abstract
536 * indirect structure.
537 * @param BASE Base indirect structure.
538 * @param PTR Abstract indirect structure.
539 */
540#define EXTEND(BASE, PTR) \
541 ABSTRACT (PTR); \
542 inline PTR (BASE&); \
543 inline operator BASE ()
544
545/**
546 * @def EXTEND_CODE(BASE, PTR)
547 * @brief Macro for extension of a base indirect structure with an abstract
548 * indirect structure code implementation.
549 * @param BASE Base indirect structure.
550 * @param PTR Abstract indirect structure.
551 */
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); }
558// end extend
559
560// extend_null
561
562/**
563 * @def EXTEND_NULL(BASE, PTR)
564 * @brief Macro for extension of a base indirect structure with a concrete null
565 * indirect structure.
566 * @param BASE Base indirect structure.
567 * @param PTR Concrete null indirect structure.
568 */
569#define EXTEND_NULL(BASE, PTR) \
570 ABSTRACT_NULL (PTR); \
571 inline PTR (BASE&); \
572 inline operator BASE ()
573
574/**
575 * @def EXTEND_NULL_CODE(BASE, PTR)
576 * @brief Macro for extension of a base indirect structure with a concrete null
577 * indirect structure code implementation.
578 * @param BASE Base indirect structure.
579 * @param PTR Concrete null indirect structure.
580 */
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); }
587
588/**
589 * @def EXTEND_NULL_TEMPLATE(BASE, PTR, T)
590 * @brief Macro for extension of a base indirect structure with a concrete null
591 * indirect structure with a template parameter.
592 * @param BASE Base indirect structure.
593 * @param PTR Concrete null indirect structure.
594 * @param T Template parameter of the concrete null indirect structure.
595 */
596#define EXTEND_NULL_TEMPLATE(BASE, PTR, T) \
597 ABSTRACT_NULL_TEMPLATE (PTR, T); \
598 inline PTR<T> (BASE&); \
599 inline operator BASE ()
600
601/**
602 * @def EXTEND_NULL_TEMPLATE_CODE(BASE, PTR, TT, T)
603 * @brief Macro for extension of a base indirect structure with a concrete null
604 * indirect structure with a template parameter code implementation.
605 * @param BASE Base indirect structure.
606 * @param PTR Concrete null indirect structure.
607 * @param TT Template type of the concrete null indirect structure.
608 * @param T Template parameter of the concrete null indirect structure.
609 */
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); }
617// end extend_null
int concrete_count
Global variable holding the number of concrete structures currently active.
#define TM_DEBUG(x)
Debugging macro used to disable debugging output.
Definition classdef.hpp:13
int abstract_count
Global variable holding the number of abstract structures currently active.
Structure representing an abstract object with a reference count.
Definition classdef.hpp:49
virtual ~abstract_struct()
Virtual destructor for the abstract object. Decrements the reference count.
Definition classdef.hpp:62
abstract_struct()
Default constructor for the abstract object. Sets the reference count to 0.
Definition classdef.hpp:56
int ref_count
The reference count for the abstract object.
Definition classdef.hpp:50
Structure representing a concrete object with a reference count.
Definition classdef.hpp:24
virtual ~concrete_struct()
Virtual destructor for the concrete object. Decrements the reference count.
Definition classdef.hpp:37
concrete_struct()
Default constructor for the concrete object. Increments the reference count.
Definition classdef.hpp:31
int ref_count
The reference count for the concrete object.
Definition classdef.hpp:25