Pol  Revision:3cfda13
realmdescriptor.h
Go to the documentation of this file.
1 
7 #ifndef PLIB_REALMDESCRIPTOR_H
8 #define PLIB_REALMDESCRIPTOR_H
9 
10 #include <cstddef>
11 #include <string>
12 
13 namespace Pol
14 {
15 namespace Clib
16 {
17 class ConfigElem;
18 }
19 namespace Plib
20 {
21 const unsigned WGRID_SIZE = 64;
22 const unsigned WGRID_SHIFT = 6;
23 
25 {
26 public:
27  static RealmDescriptor Load( const std::string& realm_name, const std::string& realm_path = "" );
28 
29  std::string name;
30  std::string file_path;
31  unsigned short width;
32  unsigned short height;
33  unsigned uomapid; // map[n].mul, need to be able to tell the client this.
34  bool uodif; // use the *dif files?
35  unsigned num_map_patches;
37  unsigned season;
38  std::string mapserver_type; // "memory" or "file"
39  unsigned short grid_width;
40  unsigned short grid_height;
41 
42  std::string path( const std::string& filename ) const;
43  bool operator==( const RealmDescriptor& rdesc ) const
44  {
45  return ( name == rdesc.name && uomapid == rdesc.uomapid );
46  }
47  size_t sizeEstimate() const;
48 
49 private:
50  RealmDescriptor( const std::string& realm_name, const std::string& realm_path,
51  Clib::ConfigElem& elem );
52 };
53 }
54 }
55 #endif
const unsigned WGRID_SHIFT
bool operator==(const RealmDescriptor &rdesc) const
const unsigned WGRID_SIZE
Definition: berror.cpp:12