C4 Engine
C4 Engine API Documentation

class ForceReg

Defined in:  C4Forces.h
The ForceReg class represents a custom force type.

template <class classType> class ForceReg : public ForceRegistration

Template Parameters
classType The custom force class.

ForceReg(ForceType type, const char *name);

type The force type.
name The force name.
The ForceReg template class is used to advertise the existence of a custom force type. The World Manager uses a force registration to construct a custom force, and the World Editor examines a force registration to determine what type of field a custom force can be assigned to. The act of instantiating a ForceReg object automatically registers the corresponding force type. The force type is unregistered when the ForceReg object is destroyed.

No more than one force registration should be created for each distinct force type.
Base Classes
ForceRegistration All specific force registration classes share the common base class ForceRegistration.
See Also