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

#include <Module.h>

Inherits MemoryPoolObject, and Snapshot.

Inherited by DrawableModule, and ObjectModule.

Public Member Functions

 Module (const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual NameKeyType getModuleNameKey () const =0
 
NameKeyType getModuleTagNameKey () const
 
virtual void onObjectCreated ()
 
virtual void onDrawableBoundToObject ()
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preload any assets we might have for this time of day
 
virtual void onDelete (void)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static ModuleDatafriend_newModuleData (INI *ini)
 

Protected Member Functions

const ModuleDatagetModuleData () const
 
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

Common interface for thing modules, we want a single common base class for all the modules (either object or drawable) so that we can use a single module factory to handle instancing them ... it's just convenient this way

Definition at line 181 of file Module.h.

Constructor & Destructor Documentation

◆ Module()

Module::Module ( const ModuleData * moduleData)
inline

< this abstract class needs memory pool hooks

Definition at line 189 of file Module.h.

Member Function Documentation

◆ crc()

void Module::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Reimplemented in BehaviorModule, BodyModule, DrawableModule, ObjectHelper, and ObjectModule.

Definition at line 82 of file Module.cpp.

◆ friend_newModuleData()

ModuleData * Module::friend_newModuleData ( INI * ini)
static

Definition at line 64 of file Module.cpp.

◆ getModuleData()

const ModuleData * Module::getModuleData ( ) const
inlineprotected

Definition at line 220 of file Module.h.

◆ getModuleNameKey()

virtual NameKeyType Module::getModuleNameKey ( ) const
pure virtual

◆ getModuleTagNameKey()

NameKeyType Module::getModuleTagNameKey ( ) const
inline

Definition at line 198 of file Module.h.

◆ loadPostProcess()

void Module::loadPostProcess ( void )
protectedvirtual

load post process

Implements Snapshot.

Reimplemented in BehaviorModule, BodyModule, DrawableModule, ObjectHelper, and ObjectModule.

Definition at line 105 of file Module.cpp.

◆ onDelete()

virtual void Module::onDelete ( void )
inlinevirtual

onDelete() will be called on all modules contained by an object or drawable before the actual deletion of each of those modules happens

Reimplemented in ActiveBody, BattlePlanUpdate, BridgeBehavior, CostModifierUpgrade, DozerAIUpdate, HelixContain, JetAIUpdate, MissileAIUpdate, NeutronMissileUpdate, ObjectCreationUpgrade, OpenContain, OverchargeBehavior, OverlordContain, PowerPlantUpgrade, PropagandaTowerBehavior, RadarUpgrade, SpawnBehavior, SpyVisionUpdate, TunnelContain, and WorkerAIUpdate.

Definition at line 216 of file Module.h.

◆ onDrawableBoundToObject()

virtual void Module::onDrawableBoundToObject ( void )
inlinevirtual

this is called whenever a drawable is bound to the object. drawable is NOT guaranteed to be non-null.

Reimplemented in HordeUpdate, ParachuteContain, and W3DModelDraw.

Definition at line 209 of file Module.h.

◆ onObjectCreated()

◆ preloadAssets()

virtual void Module::preloadAssets ( TimeOfDay timeOfDay)
inlinevirtual

preload any assets we might have for this time of day

Reimplemented in W3DModelDraw.

Definition at line 212 of file Module.h.

◆ xfer()

void Module::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Reimplemented in BehaviorModule, BodyModule, DrawableModule, ObjectHelper, and ObjectModule.

Definition at line 92 of file Module.cpp.


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