Is there somewhere an example on how to include classes in a module ? All my attempt fail. This is what I actually do based on code found.
REALclassDefinition Class1_Definition = {
kCurrentREALControlVersion,
"Class1",
......
......
};
REALclassDefinition Class2_Definition = {
kCurrentREALControlVersion,
"Class2",
......
......
};
static REALclassDefinition All_Classes[] = {
Class1_Definition,
Class2_Definition
};
static REALclassDefinition* ac = All_Classes;
static REALclassDefinition** All_ClassDef = ∾
// Structures and enumerations live inside of a module,
// and so we will demonstrate how to declare them inside
// of the module.
static REALmoduleDefinition testModule = {
kCurrentREALControlVersion,
"TestStructEnumModule",
testMethods,
sizeof(testMethods) / sizeof(REALmethodDefinition),
NULL, // Constants
0, // Constant count
NULL, // Properties
0, // Property count
testStructs,
sizeof( testStructs ) / sizeof( REALstructure ),
testEnums,
sizeof( testEnums ) / sizeof( REALenum ),
nil, // Atributes
0, // Attribute count
nil, // Delegates
0, // Delegate count
ClassDef, // Classes
_countof(ClassDef), // Class count
};
void PluginEntry( void )
{
REALRegisterModule( &testModule );
// SetClassConsoleSafe(&Class1_Definition);
// REALRegisterClass(&Class1_Definition);
// SetClassConsoleSafe(&Class2_Definition);
// REALRegisterClass(&Class2_Definition);
}
Doing so auto-complete doesn’t show the classes after the first one.
Var c2 As TestStructEnumModule.Class2
IDE complains that Class2 is an unknown type. Classes registered indepently work fine.
One more question. From my knowledge it is not possible to declare structures in a class. Why ?
Thanks in advance for your advices.