gclass_create()
#
Creates and register a GClass, defining its core structure, behavior, and configuration.
Prototype
PUBLIC hgclass gclass_create(
gclass_name_t gclass_name,
event_type_t *event_types,
states_t *states,
const GMETHODS *gmt,
const LMETHOD *lmt,
const sdata_desc_t *tattr_desc,
size_t priv_size,
const sdata_desc_t *authz_table,
const sdata_desc_t *command_table,
const trace_level_t *s_user_trace_level,
gclass_flag_t gclass_flag
);
Parameters
Key |
Type |
Description |
---|---|---|
|
The unique name of the GClass being created. |
|
|
Pointer to the table of events supported by the GClass, defining input and output events. |
|
|
Pointer to the finite state machine (FSM) definition for the GClass, specifying states and transitions. |
|
|
Pointer to the table of global methods for the GClass, implementing its core behavior. |
|
|
Pointer to the table of internal methods for the GClass, invoked explicitly as needed (optional). |
|
|
Pointer to the table defining the GClass attributes (type, name, flags, default value, and description). |
|
|
|
The size of the private data buffer allocated for each GObj instance of the GClass. |
|
Pointer to the table defining authorization rules for the GClass (optional). |
|
|
Pointer to the table defining commands available in the GClass (optional). |
|
|
Pointer to the table of trace levels for monitoring and debugging the GClass (optional). |
|
|
Flags modifying the GClass behavior (e.g., |
Return Value
Returns a handle to the created GClass
hgclass
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples