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

#include <GameMemory.h>

Inherited by AIGroup, AIPlayer, AISideBuildList, AISideInfo, Anim2D, Anim2DTemplate, AnimateWindow, AttackPriorityInfo, AudioEventInfo, AudioRequest, BattlePlanBonuses, BodyParticleSystem, Bridge, Bucket, BuildListInfo, Campaign, Condition, Connection, DisplayString, DrawableIconInfo, DrawableLocoInfo, DynamicAudioEventRTS, EnumeratedIP, EvaCheckInfo, ExperienceTracker, FXNugget, File, FloatingTextData, FrameDataManager, GameFont, GameMessage, GameMessageArgument, GameMessageParser, GameMessageParserArgumentType, GameWindow, Image, InputChunk, KindOfPercentProductionChange, Locomotor, MapObject, Mapping, MetaMapRec, Mission, ModalWindow, Module, MusicTrack, NamedTimerInfo, NetCommandList, NetCommandMsg, NetCommandRef, NetCommandWrapperList, NetCommandWrapperListNode, NetPacket, ObjectCreationNugget, ObjectIterator, ObjectSellInfo, ObjectTracker, ObjectTypes, OrCondition, OutputChunk, Overridable, Parameter, Particle, ParticleSystem, ParticleSystemTemplate, PartitionContactListNode, PartitionData, Path, PathNode, PlayerRelationMap, PolygonTrigger, PopupMessageData, ProductionEntry, RadarObject, ResourceGatheringManager, Script, ScriptAction, ScriptGroup, ScriptList, SequentialScript, SightingInfo, Squad, State, StateMachine, SuperweaponInfo, Team, TeamInQueue, TeamPrototype, TeamRelationMap, Template, TerrainRoadType, TerrainType, Thing, TintEnvelope, TransportStatus, TunnelTracker, TurretAI, TurretAIData, Upgrade, UpgradeTemplate, User, UserParser, W3DPrototypeClass, Waypoint, Weapon, WeaponBonusSet, WeaponTemplate, WebBrowserURL, WindowLayout, WorkOrder, and XferBlockData.

Public Member Functions

void deleteInstance ()
 

Protected Member Functions

virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

This class is provided as a simple and safe way to integrate C++ object allocation into MemoryPool usage. To use it, you must have your class inherit from MemoryPoolObject, then put the macro MEMORY_POOL_GLUE(MyClassName, "MyPoolName") at the start of your class definition. (This does not create the pool itself – you must create that manually using MemoryPoolFactory::createMemoryPool)

Definition at line 713 of file GameMemory.h.

Constructor & Destructor Documentation

◆ ~MemoryPoolObject()

virtual MemoryPoolObject::~MemoryPoolObject ( )
inlineprotectedvirtual

ensure that all destructors are virtual

Definition at line 718 of file GameMemory.h.

Member Function Documentation

◆ deleteInstance()

void MemoryPoolObject::deleteInstance ( )
inline

Definition at line 730 of file GameMemory.h.

◆ getObjectMemoryPool()

virtual MemoryPool * MemoryPoolObject::getObjectMemoryPool ( )
protectedpure virtual

◆ operator delete()

void MemoryPoolObject::operator delete ( void * p)
inlineprotected

Definition at line 722 of file GameMemory.h.

◆ operator new()

void * MemoryPoolObject::operator new ( size_t s)
inlineprotected

Definition at line 721 of file GameMemory.h.


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