Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: Zap::ServerGame Class Reference

# Zap::ServerGame Class Reference

`#include <game.h>`

Inheritance diagram for Zap::ServerGame:

## Public Member Functions

U32 | getPlayerCount ()
U32 | getMaxPlayers ()
const char * | getHostName ()
bool | isFull ()
void | addClient (GameConnection *theConnection)
void | removeClient (GameConnection *theConnection)
| ServerGame (const Address &theBindAddress, U32 maxPlayers, const char *hostName)
void | setLevelList (const char *levelList)
void | loadLevel (const char *fileName)
void | cycleLevel (S32 newLevelIndex=-1)
StringTableEntry | getLevelName (S32 index)
void | processLevelLoadLine (int argc, const char **argv)
bool | isServer ()
void | idle (U32 timeDelta)
void | gameEnded ()

## Private Types

enum | { LevelSwitchTime = 5000 }

## Private Attributes

U32 | mPlayerCount
U32 | mMaxPlayers
const char * | mHostName
Vector< StringTableEntry > | mLevelList
Vector< StringTableEntry > | mLevelNames
Vector< StringTableEntry > | mLevelTypes
U32 | mCurrentLevelIndex
Timer | mLevelSwitchTimer

## Member Enumeration Documentation

anonymous enum`[private]`

Enumerator:

  LevelSwitchTime |

## Constructor & Destructor Documentation

Zap::ServerGame::ServerGame | ( | const Address & | theBindAddress,
|  | U32 | maxPlayers,
|  | const char * | hostName |
| ) |  |  |

## Member Function Documentation

U32 Zap::ServerGame::getPlayerCount | ( |  | ) | `[inline]`

U32 Zap::ServerGame::getMaxPlayers | ( |  | ) | `[inline]`

const char* Zap::ServerGame::getHostName | ( |  | ) | `[inline]`

bool Zap::ServerGame::isFull | ( |  | ) | `[inline]`

void Zap::ServerGame::addClient | ( | GameConnection * | theConnection | ) |

void Zap::ServerGame::removeClient | ( | GameConnection * | theConnection | ) |

void Zap::ServerGame::setLevelList | ( | const char * | levelList | ) |

void Zap::ServerGame::loadLevel | ( | const char * | fileName | ) |

void Zap::ServerGame::cycleLevel | ( | S32 | newLevelIndex = `-1` | ) |

StringTableEntry Zap::ServerGame::getLevelName | ( | S32 | index | ) |

void Zap::ServerGame::processLevelLoadLine | ( | int | argc,
|  | const char ** | argv |
| ) |  |  | `[virtual]`

Implements Zap::LevelLoader.

bool Zap::ServerGame::isServer | ( |  | ) | `[inline, virtual]`

Implements Zap::Game.

void Zap::ServerGame::idle | ( | U32 | timeDelta | ) | `[virtual]`

Implements Zap::Game.

void Zap::ServerGame::gameEnded | ( |  | ) |

## Field Documentation

U32 Zap::ServerGame::mPlayerCount`[private]`

U32 Zap::ServerGame::mMaxPlayers`[private]`

const char* Zap::ServerGame::mHostName`[private]`

Vector<StringTableEntry> Zap::ServerGame::mLevelList`[private]`

Vector<StringTableEntry> Zap::ServerGame::mLevelNames`[private]`

Vector<StringTableEntry> Zap::ServerGame::mLevelTypes`[private]`

U32 Zap::ServerGame::mCurrentLevelIndex`[private]`

Timer Zap::ServerGame::mLevelSwitchTimer`[private]`