The "Class_Register()" function is used to register your class with sliceOmatic.
The name returned by the function will be listed in the "All Classes" list of the "DB Class Management" mode. The user can then select it and add it to the "Active Classes" list. You can also see it with the "Database: List" command, or add it to the active list with the "Database: tree" command.
Syntax
extern "C" __declspec(dllexport) char *Class_Register(
unsigned int *id
)
Parameters
id
Is a pointer to a variable where you must place the ID of this class. The ID for a class is split in 3 parts:
·0x FF00 0000 -> Magic number (0xAA000000 for Class)
·0x 00FF 0000 -> Class number
·0x 0000 FFFF -> Instance number
When you register a class, the "Magic" and "Instance" numbers will be 0, so the ID is an hexadecimal number between 0x 0000 0000 and 0x 00FF 0000.
However, some of these values are reserved by sliceOmatic for the basic classes, this leave ID 0x 0010 0000 to 0x 00FE 0000 for your classes.
Return value
The function returns the name of your class.
Remarks
The "DB Class Management" mode list will also associate an icon with your class.
If you want to provide an icon for the list, it must:
·Be a 32 by 32 pixel image in TARGA format.
·Be placed in the "Icons" sub-directory of the installation directory.
·Pixel with RGB values of (0,0,0) will be transparent.
·Its name must be: "class xxx.tga" where "xxx" stand for the name returned by the Class_Register() function.
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
The "Series" class
See also