Loading...
Searching...
No Matches
SBCReferenceRegister.hpp File Reference

Macros

#define SB_REGISTER_TARGET_TYPE(TYPE, SHORT_NAME, UUID)
 Registers a target type in a SAMSON Extension.
 

Macro Definition Documentation

◆ SB_REGISTER_TARGET_TYPE

#define SB_REGISTER_TARGET_TYPE (   TYPE,
  SHORT_NAME,
  UUID 
)
Parameters
TYPEThe registered type
SHORT_NAMEThe short name of the registered type (in quotes)
UUIDThe UUID of the registered type (in quotes)

This macro registers a target type in a SAMSON Extension.

Assume for example a SAMSON Extension contains the following class:

class A : public SBCReferenceTarget {
public:
A() {}
virtual ~A() {}
int multiplyByTwo(int i) {
return 2 * i;
}
};
SB_REGISTER_TARGET_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C");
#define SB_CLASS
Macro that is added inside the class declaration for Introspection, etc.
Definition: SBCClass.hpp:241
#define SB_REGISTER_TARGET_TYPE(TYPE, SHORT_NAME, UUID)
Registers a target type in a SAMSON Extension.
Definition: SBCReferenceRegister.hpp:54
Definition: SBCReferenceTarget.hpp:18

The SB_REGISTER_TYPE macro declares to SAMSON's introspection mechanism that A is a registered type, and that it is a reference target (i.e. that it derives from SBCReferenceTarget).

For classes that do not (directly or indirectly) derive from SBCReferenceTarget, the macro SB_REGISTER_TYPE should be used instead.

See also
Introspection
SB_REGISTER_TYPE