Pol  Revision:cb584c9
Pol::Core::RegionGroupBase Class Referenceabstract

#include <region.h>

+ Inheritance diagram for Pol::Core::RegionGroupBase:

Public Member Functions

 RegionGroupBase (const char *name)
virtual ~RegionGroupBase ()
void create_bgnd_region (Clib::ConfigElem &elem)
virtual size_t estimateSize () const
const std::string & name () const
void read_region (Clib::ConfigElem &elem)

Protected Types

typedef std::map< Realms::Realm *, RegionId ** > RegionRealms

Protected Member Functions

Regiongetregion_byloc (xcoord x, ycoord y, Realms::Realm *realm)
Regiongetregion_byname (const std::string &regionname)

Protected Attributes

RegionRealms regionrealms
std::vector< Region * > regions_

Private Types

typedef std::map< std::string, Region * > RegionsByName

Private Member Functions

virtual Regioncreate_region (Clib::ConfigElem &elem, RegionId id) const =0
RegionId getregionid (xcoord x, ycoord y, Realms::Realm *realm)
void paint_zones (Clib::ConfigElem &elem, RegionId ridx)

Private Attributes

std::string name_
RegionsByName regions_byname_

Detailed Description

Definition at line 70 of file region.h.

Member Typedef Documentation

Definition at line 88 of file region.h.

typedef std::map<std::string, Region*> Pol::Core::RegionGroupBase::RegionsByName

Definition at line 97 of file region.h.

Constructor & Destructor Documentation

Pol::Core::RegionGroupBase::RegionGroupBase ( const char *  name)
Pol::Core::RegionGroupBase::~RegionGroupBase ( )

Definition at line 83 of file region.cpp.

References regionrealms, regions_, and Pol::Core::ZONE_SIZE.

Member Function Documentation

void Pol::Core::RegionGroupBase::create_bgnd_region ( Clib::ConfigElem elem)
virtual Region* Pol::Core::RegionGroupBase::create_region ( Clib::ConfigElem elem,
RegionId  id 
) const
privatepure virtual
size_t Pol::Core::RegionGroupBase::estimateSize ( ) const
Region * Pol::Core::RegionGroupBase::getregion_byloc ( xcoord  x,
ycoord  y,
Realms::Realm realm 

Definition at line 170 of file region.cpp.

References getregionid(), and regions_.

Referenced by Pol::Core::RegionGroup< T >::getregion().

Region * Pol::Core::RegionGroupBase::getregion_byname ( const std::string &  regionname)
RegionId Pol::Core::RegionGroupBase::getregionid ( xcoord  x,
ycoord  y,
Realms::Realm realm 
const std::string & Pol::Core::RegionGroupBase::name ( ) const

Definition at line 101 of file region.h.

Referenced by Pol::Core::ResourceDef::counttiles(), and Pol::Core::ResourceDef::write().

void Pol::Core::RegionGroupBase::read_region ( Clib::ConfigElem elem)

Member Data Documentation

std::string Pol::Core::RegionGroupBase::name_

Definition at line 96 of file region.h.

Referenced by estimateSize(), and Pol::Core::ResourceRegion::write().

RegionsByName Pol::Core::RegionGroupBase::regions_byname_

Definition at line 98 of file region.h.

Referenced by create_bgnd_region(), estimateSize(), getregion_byname(), and read_region().

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