Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ObjectCreationList Class Reference

#include <ObjectCreationList.h>

Public Member Functions

void clear ()
 
void addObjectCreationNugget (ObjectCreationNugget *nugget)
 

Static Public Member Functions

static Objectcreate (const ObjectCreationList *ocl, const Object *primaryObj, const Coord3D *primary, const Coord3D *secondary, Bool createOwner, UnsignedInt lifetimeFrames=0)
 
static Objectcreate (const ObjectCreationList *ocl, const Object *primaryObj, const Coord3D *primary, const Coord3D *secondary, Real angle, UnsignedInt lifetimeFrames=0)
 inline convenience method to avoid having to check for null.
 
static Objectcreate (const ObjectCreationList *ocl, const Object *primary, const Object *secondary, UnsignedInt lifetimeFrames=0)
 inline convenience method to avoid having to check for null.
 

Detailed Description

An ObjectCreationList is a way of creating a particular set of Objects.

Important notes:

– an ObjectCreationList is specified solely by name, and the only parameters it receives when performing its AV effects are a primary (and optional secondary) object position.

– There is no inheritance or overriding of ObjectCreationLists; if you need an ObjectCreationList that is nearly-but-not-quite identical to an existing one, you must simply make an entirely new ObjectCreationList. Realistically, this shouldn't be a problem, since they are pretty simple to specify, and don't consume a lot of memory.

– an ObjectCreationList is shared between multiple units. To help enforce this, all it's methods are declared 'const'. If you can't implement the stuff you need within this framework, please don't simply de-const things, because it could lead to very strange side-effects. Instead, the system will have to be enhanced to allow for multiple instances of each ObjectCreationNugget.

– Unlike most other game systems, ObjectCreationList can't be overridden by subsequent INI file loads. This isn't really a problem, because all you really need to do to "override" one is to specify a different one.

Definition at line 126 of file ObjectCreationList.h.

Member Function Documentation

◆ addObjectCreationNugget()

void ObjectCreationList::addObjectCreationNugget ( ObjectCreationNugget * nugget)

Definition at line 1526 of file ObjectCreationList.cpp.

◆ clear()

void ObjectCreationList::clear ( )

Toss the contents.

Definition at line 1519 of file ObjectCreationList.cpp.

◆ create() [1/3]

static Object * ObjectCreationList::create ( const ObjectCreationList * ocl,
const Object * primary,
const Object * secondary,
UnsignedInt lifetimeFrames = 0 )
inlinestatic

inline convenience method to avoid having to check for null.

Definition at line 160 of file ObjectCreationList.h.

◆ create() [2/3]

static Object * ObjectCreationList::create ( const ObjectCreationList * ocl,
const Object * primaryObj,
const Coord3D * primary,
const Coord3D * secondary,
Bool createOwner,
UnsignedInt lifetimeFrames = 0 )
inlinestatic

Definition at line 140 of file ObjectCreationList.h.

◆ create() [3/3]

static Object * ObjectCreationList::create ( const ObjectCreationList * ocl,
const Object * primaryObj,
const Coord3D * primary,
const Coord3D * secondary,
Real angle,
UnsignedInt lifetimeFrames = 0 )
inlinestatic

inline convenience method to avoid having to check for null.

Definition at line 150 of file ObjectCreationList.h.


The documentation for this class was generated from the following files: