_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | List of all members
CUnitManager Class Reference

#include <unit_manager.h>

Public Types

typedef std::vector< CUnit * >
::iterator 
Iterator
 

Public Member Functions

unit_manager.cpp - Unit manager.
 CUnitManager ()
 Unit manager. More...
 
void Init ()
 
CUnitAllocUnit ()
 
void ReleaseUnit (CUnit *unit)
 
void Save (CFile &file) const
 
void Load (lua_State *Lua)
 
void Add (CUnit *unit)
 
Iterator begin ()
 
Iterator end ()
 
bool empty () const
 
CUnitlastCreatedUnit ()
 
CUnitGetSlotUnit (int index) const
 
unsigned int GetUsedSlotCount () const
 

Member Typedef Documentation

typedef std::vector<CUnit *>::iterator CUnitManager::Iterator

Constructor & Destructor Documentation

CUnitManager::CUnitManager ( )

Unit manager.

Member Function Documentation

void CUnitManager::Add ( CUnit unit)
CUnit * CUnitManager::AllocUnit ( )

Allocate a new unit

Returns
New unit
CUnitManager::Iterator CUnitManager::begin ( )
bool CUnitManager::empty ( ) const
CUnitManager::Iterator CUnitManager::end ( )
CUnit & CUnitManager::GetSlotUnit ( int  index) const
unsigned int CUnitManager::GetUsedSlotCount ( ) const
void CUnitManager::Init ( )

Initial memory allocation for units.

CUnit * CUnitManager::lastCreatedUnit ( )
void CUnitManager::Load ( lua_State *  Lua)
void CUnitManager::ReleaseUnit ( CUnit unit)

Release a unit

Parameters
unitUnit to release
void CUnitManager::Save ( CFile file) const

Save state of unit manager to file.

Parameters
fileOutput file.

The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.