Macros | |
#define | SB_DECLARE_BASE_TYPE(DERIVED_TYPE, BASE_TYPE) |
Registers a base type in a SAMSON Extension. | |
#define SB_DECLARE_BASE_TYPE | ( | DERIVED_TYPE, | |
BASE_TYPE | |||
) |
DERIVED_TYPE | The derived registered type |
BASE_TYPE | The base registered type |
This macro registers a base type in a SAMSON Extension.
Assume for example a SAMSON Extension contains the following classes:
The SB_DECLARE_BASE_TYPE macro declares to SAMSON's introspection mechanism that class B
derives from class A
.
Both the derived and the base types should be registered through either SB_REGISTER_TYPE or SB_REGISTER_TARGET_TYPE (whichever is appropriate).
Note that, at the moment, SAMSON's introspection mechanism may not expose multiple inheritance relationships: while it is perfectly possible to expose a class that inherits multiple classes, the SB_DECLARE_BASE_TYPE macro may be used to expose only one derivation relationship, with only one of the base classes.