C4 Engine
C4 Engine API Documentation

class FunctionRegistration

Defined in:  C4Controller.h
The FunctionRegistration class contains information about an application-defined controller function.
Definition

class FunctionRegistration : public MapElement<FunctionRegistration>

Member Functions
FunctionRegistration::GetPreviousFunctionRegistration Returns the next function registration.
FunctionRegistration::GetNextFunctionRegistration Returns the next function registration.
FunctionRegistration::GetFunctionType Returns the registered function type.
FunctionRegistration::GetFunctionName Returns the human-readable function name.
Constructor

FunctionRegistration(ControllerRegistration *reg, FunctionType type, const char *name, uint32 flags = 0);

Parameters
reg A pointer to the registration object for the controller to which the function pertains.
type The function type.
name The function name.
flags The function flags.
Description
The FunctionRegistration class is abstract and serves as the common base class for the template class FunctionReg. A custom function is registered with the engine by instantiating an object of type FunctionReg<classType>, where classType is the type of the function subclass being registered.

The flags parameter can be a combination (through logical OR) of the following constants.
kFunctionRemote The function executes on remote machines instead of only on the server.
kFunctionJournaled The message used to execute a remote function should be journaled.
kFunctionOutputValue The function generates an output value that can be stored in a script variable.
Base Classes
MapElement<FunctionRegistration> Registration objects are stored in a map container by the engine.
See Also

FunctionReg

Function

Controller

ControllerRegistration