charon-core  0.3.1
ParameteredObject.h File Reference

Declaration of the base class ParameteredObject. More...

#include <set>
#include "ParameterFile.h"
#include "Parameter.h"
#include "Slots.h"
#include "DllEx.h"
Include dependency graph for ParameteredObject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ParameteredObject
 Base class for serializable objects. More...
 
class  TemplatedParameteredObject< T >
 Base class for templated classes derived from ParameteredObject. More...
 

Macros

#define _addConstructor(x)
 register some constructor More...
 
#define _addFunction(x)
 register member function More...
 
#define PARAMETEREDOBJECT_AVOID_REEXECUTION   sout << "(WW) using deprecated AVOID_REEXECUTION macro" << std::endl;
 deprecated macro
 

Variables

charon_DEPRECATED typedef
ParameteredObject::template_type 
template_type
 for transition to ParameteredObject::template_type
 

Detailed Description

Author
Daniel Kondermann
Jens-Malte Gottfried
Stephan Meister
Cornelius Ratsch

Original file written by Daniel Kondermann, modified by Jens-Malte Gottfried and Stephan Meister.

In most cases, you do not want do include this file directly, use ParameteredObject.hxx instead.

Date
11.12.2008

Changes:

  • added documentation
  • renamed private members (left protected unchaged to maintain interface)
  • split up into precompilable cpp part and header
  • modified parametered object interface

Definition in file ParameteredObject.h.

Macro Definition Documentation

#define _addConstructor (   x)
Value:
if (!this && new x) {\
throw 42;\
}

use this hack, if you have multiple templated constructors and want them to be compiled (and exported) into the (dynamic) library.

Example: _addConstructor( myObject(par1,par2,par3) );

Warning
at least on gcc, there are multiple kinds of constructors, i.e. some base constructor that is used on derived classes and some full constructor that is used to create instances. This hack will only produce the full constructor, not the base one.

Definition at line 262 of file ParameteredObject.h.

#define _addFunction (   x)
Value:
if (!this && &x) {\
throw 42;\
}

This hack is useful to get some member functions compiled (and exported into) the (dynamic) library. No code is executed, because this-pointer is always non-zero, but the compiler is forced to compile the given (templated) function and export the symbol.

Example: _addFunction(someFunction);

Parameters
xfunction to export

Definition at line 244 of file ParameteredObject.h.