C4 Engine Terathon Software C4 Engine API Documentation

• Controller System

API Links
Developer Links

class MethodRegistration

Defined in:  C4Methods.h
The MethodRegistration class manages internal registration information for a custom script method type.
Definition

class MethodRegistration : public Registration<Method, MethodRegistration>

Member Functions
MethodRegistration::GetMethodType Returns the registered method type.
MethodRegistration::GetMethodFlags Returns the method flags.
MethodRegistration::GetMethodName Returns the human-readable method name.
Constructor

MethodRegistration(MethodType type, const char *name, unsigned long flags = 0, MethodGroup group = 0);

Parameters
type The method type.
name The method name.
flags The method flags. See below for possible values.
group The group to which the method belongs. This should be 0 for all custom methods.
Description
The MethodRegistration class is abstract and serves as the common base class for the template class MethodReg. A custom script method is registered with the engine by instantiating an object of type MethodReg<classType>, where classType is the type of the method subclass being registered.

The flags parameter can be a combination (through logical OR) of the following values.
kMethodNoTarget The method does not operate on a target node.
kMethodNoSelfTarget The method cannot operate on the node to which its script controller is attached.
kMethodNoMessage The method does not generate any controller messages. This flag is implied by kMethodNoTarget.
kMethodOutputValue The method generates an output value that can be stored in a script variable.
Base Classes
Registration<Method, MethodRegistration> A method registration is a specific type of registration object.
See Also

MethodReg

Method