Gyoto
|
Introspectable objects. More...
Go to the source code of this file.
Classes | |
class | Gyoto::Object |
Object with properties. More... | |
Namespaces | |
namespace | Gyoto |
Namespace for the Gyoto library. | |
Macros | |
#define | GYOTO_OBJECT_ACCESSORS_STRING(method) |
Declare a pair of accessors to string member in a class declaration. More... | |
#define | GYOTO_OBJECT_ACCESSORS(type, method) |
Declare a pair of accessors to scalar member in a class declaration. More... | |
#define | GYOTO_OBJECT_ACCESSORS_UNIT(method) |
Declare a quadruplet of accessors to double member that supports unit. More... | |
#define | GYOTO_OBJECT |
Declare class::properties and class::getProperties() More... | |
#define | GYOTO_OBJECT_THREAD_SAFETY virtual bool isThreadSafe() const |
Declare virtual bool isThreadSafe() const. More... | |
Introspectable objects.
#define GYOTO_OBJECT |
Declare class::properties and class::getProperties()
Any derived class that does define Properties (i.e. the macro GYOTO_PROPERTY_START() is called somewhere in the .C file) must call the GYOTO_OBJECT macro in a "public:" section of the class declaration. Else, the property list is inherited from the direct parent, and calling GYOTO_PROPERTY_START() in the .C file leads to a compile-time error.
#define GYOTO_OBJECT_ACCESSORS | ( | type, | |
method | |||
) |
Declare a pair of accessors to scalar member in a class declaration.
The accessors must also be defined in the .C file, which can be done using GYOTO_PROPERTY_ACCESSORS
type | data type of the memebr beeing accessed. Any scalar type (double, long, size_t, SmartPointer<Metric::Generic> etc). |
method | name of the accessors. |
#define GYOTO_OBJECT_ACCESSORS_STRING | ( | method | ) |
Declare a pair of accessors to string member in a class declaration.
The accessors must also be defined in the .C file
method | name of the accessors. |
#define GYOTO_OBJECT_ACCESSORS_UNIT | ( | method | ) |
Declare a quadruplet of accessors to double member that supports unit.
The accessors must also be defined in the .C file.
method | name of the accessors. |
#define GYOTO_OBJECT_THREAD_SAFETY virtual bool isThreadSafe() const |
Declare virtual bool isThreadSafe() const.
Use this to declare that the object is not (or not always) thread safe. The corresponding definition of isThreadSafe() must exist. If the object is always thread unsafe (e.g. Lorene Metrics of Python based objects), you can simply use GYOTO_PROPERTY_THREAD_SAFETY in the corresponding .C file.