C4 Engine
C4 Engine API Documentation

class FunctionReg

Defined in:  C4Controller.h
The FunctionReg class represents a custom function type.
Definition

template <class classType> class FunctionReg : public FunctionRegistration

Template Parameters
classType The custom function class.
Constructor

FunctionReg(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 FunctionReg template class is used to advertise the existence of a custom function type for a particular. type of controller. The World Manager uses a function registration to construct a custom function, and the Script Editor displays a list of registered functions for the type of controller that each method operates on. The act of instantiating a FunctionReg object automatically registers the corresponding function type. The function type is unregistered when the FunctionReg object is destroyed.

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.
No more than one function registration should be created for each distinct function type.
Base Classes
FunctionRegistration All specific function registration classes share the common base class FunctionRegistration.
See Also

Function

Controller