aboutsummaryrefslogtreecommitdiff
path: root/src/trinityrealm/RealmList.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:51:44 -0700
committermaximius <none@none>2009-10-17 15:51:44 -0700
commite585187b248f48b3c6e9247b49fa07c6565d65e5 (patch)
tree637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /src/trinityrealm/RealmList.h
parent26b5e033ffde3d161382fc9addbfa99738379641 (diff)
*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
Diffstat (limited to 'src/trinityrealm/RealmList.h')
-rw-r--r--src/trinityrealm/RealmList.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/trinityrealm/RealmList.h b/src/trinityrealm/RealmList.h
index 9939bb39921..25f0c01da14 100644
--- a/src/trinityrealm/RealmList.h
+++ b/src/trinityrealm/RealmList.h
@@ -17,12 +17,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
/// \addtogroup realmd
/// @{
/// \file
+
#ifndef _REALMLIST_H
#define _REALMLIST_H
+
#include "Common.h"
+
/// Storage object for a realm
struct Realm
{
@@ -36,16 +40,22 @@ struct Realm
float populationLevel;
uint32 gamebuild;
};
+
/// Storage object for the list of realms on the server
class RealmList
{
public:
typedef std::map<std::string, Realm> RealmMap;
+
RealmList();
~RealmList() {}
+
void Initialize(uint32 updateInterval);
+
void UpdateIfNeed();
+
void AddRealm(Realm NewRealm) {m_realms[NewRealm.name] = NewRealm;}
+
RealmMap::const_iterator begin() const { return m_realms.begin(); }
RealmMap::const_iterator end() const { return m_realms.end(); }
uint32 size() const { return m_realms.size(); }