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

#include <Team.h>

Inherits SubsystemInterface, and Snapshot.

Public Member Functions

 TeamFactory ()
 
 ~TeamFactory ()
 
virtual void init (void)
 
virtual void reset (void)
 
virtual void update (void)
 
void clear ()
 
void initFromSides (SidesList *sides)
 
void initTeam (const AsciiString &name, const AsciiString &owner, Bool isSingleton, Dict *d)
 create a new TeamPrototype and if singleton, a team.
 
TeamPrototypefindTeamPrototype (const AsciiString &name)
 return the TeamPrototype with the given name. if none exists, return null.
 
TeamPrototypefindTeamPrototypeByID (TeamPrototypeID id)
 return TeamPrototype with matching ID. if none exists NULL is returned
 
TeamfindTeamByID (TeamID teamID)
 search all prototypes for the team with the matching id, if none found NULL is returned
 
TeamcreateTeam (const AsciiString &name)
 create a team. there must be a TeamPrototype with the given name, or an exception is thrown.
 
TeamcreateTeamOnPrototype (TeamPrototype *prototype)
 create a team given an explicity team prototype rather than a prototype name
 
TeamcreateInactiveTeam (const AsciiString &name)
 create a team. there must be a TeamPrototype with the given name, or an exception is thrown.
 
TeamfindTeam (const AsciiString &name)
 return the team with the given name, or null if none exists. if multiple instances exist, return one arbitrarily.
 
void addTeamPrototypeToList (TeamPrototype *team)
 
void removeTeamPrototypeFromList (TeamPrototype *team)
 
void teamAboutToBeDeleted (Team *team)
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 

Additional Inherited Members

- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Definition at line 680 of file Team.h.

Constructor & Destructor Documentation

◆ TeamFactory()

TeamFactory::TeamFactory ( )

Definition at line 175 of file Team.cpp.

◆ ~TeamFactory()

TeamFactory::~TeamFactory ( )

Definition at line 184 of file Team.cpp.

Member Function Documentation

◆ addTeamPrototypeToList()

void TeamFactory::addTeamPrototypeToList ( TeamPrototype * team)

Definition at line 255 of file Team.cpp.

◆ clear()

void TeamFactory::clear ( )

Definition at line 209 of file Team.cpp.

◆ crc()

void TeamFactory::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 423 of file Team.cpp.

◆ createInactiveTeam()

Team * TeamFactory::createInactiveTeam ( const AsciiString & name)

create a team. there must be a TeamPrototype with the given name, or an exception is thrown.

Creates an inactive team, suitable for adding members to as they are built. Call team->setActive() when all members are added.

Definition at line 335 of file Team.cpp.

◆ createTeam()

Team * TeamFactory::createTeam ( const AsciiString & name)

create a team. there must be a TeamPrototype with the given name, or an exception is thrown.

Definition at line 368 of file Team.cpp.

◆ createTeamOnPrototype()

Team * TeamFactory::createTeamOnPrototype ( TeamPrototype * prototype)

create a team given an explicity team prototype rather than a prototype name

Definition at line 377 of file Team.cpp.

◆ findTeam()

Team * TeamFactory::findTeam ( const AsciiString & name)

return the team with the given name, or null if none exists. if multiple instances exist, return one arbitrarily.

Definition at line 394 of file Team.cpp.

◆ findTeamByID()

Team * TeamFactory::findTeamByID ( TeamID teamID)

search all prototypes for the team with the matching id, if none found NULL is returned

Definition at line 309 of file Team.cpp.

◆ findTeamPrototype()

TeamPrototype * TeamFactory::findTeamPrototype ( const AsciiString & name)

return the TeamPrototype with the given name. if none exists, return null.

Definition at line 278 of file Team.cpp.

◆ findTeamPrototypeByID()

TeamPrototype * TeamFactory::findTeamPrototypeByID ( TeamPrototypeID id)

return TeamPrototype with matching ID. if none exists NULL is returned

Definition at line 289 of file Team.cpp.

◆ init()

void TeamFactory::init ( void )
virtual
  • Assign any default values to data required for the class
    • Allocate any memory and resources needed throughout the lifetime of the class

Implements SubsystemInterface.

Definition at line 190 of file Team.cpp.

◆ initFromSides()

void TeamFactory::initFromSides ( SidesList * sides)

Definition at line 222 of file Team.cpp.

◆ initTeam()

void TeamFactory::initTeam ( const AsciiString & name,
const AsciiString & owner,
Bool isSingleton,
Dict * d )

create a new TeamPrototype and if singleton, a team.

Definition at line 240 of file Team.cpp.

◆ loadPostProcess()

void TeamFactory::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 554 of file Team.cpp.

◆ removeTeamPrototypeFromList()

void TeamFactory::removeTeamPrototypeFromList ( TeamPrototype * team)

Definition at line 269 of file Team.cpp.

◆ reset()

void TeamFactory::reset ( void )
virtual
  • Any system should be able to reset all data and go back to an empty state that is ready to accept a completely new set of data. Reset() can expect to be used in the context of resetting the engine in order to start or load a new game.
    • Do NOT free and re-allocate resources needed, where possible reorganize and re-initialize the resources already allocated.
    • After a reset, the system does not need to be in EXACTLY the same state as a fresh instantiation. If there are persistent state information for the system make sure you maintain it while restoring or re-initializing other transient parts.

Implements SubsystemInterface.

Definition at line 196 of file Team.cpp.

◆ teamAboutToBeDeleted()

void TeamFactory::teamAboutToBeDeleted ( Team * team)

Definition at line 410 of file Team.cpp.

◆ update()

void TeamFactory::update ( void )
virtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 204 of file Team.cpp.

◆ xfer()

void TeamFactory::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Definition at line 433 of file Team.cpp.


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