1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef RYZOM_CONTINENT_H
20 #define RYZOM_CONTINENT_H
22 #include "nel/misc/types_nl.h"
57 // NB_RESPAWN_POINT_TYPE = UNKNOWN,
58 NB_CONTINENTS
= UNKNOWN
63 * get continent type corresponding to input string
64 * \param str the input string
65 * \return the TContinent associated to this string (UNKNOWN if the string cannot be interpreted)
67 TContinent
toContinent(const std::string
&str
);
70 * get the continent type string corresponding to enum
71 * \param nature the TContinent value
72 * \return nature as a string (or UNKNOWN)
74 const std::string
& toString(TContinent continent
);
76 // A small wrapper around the continent enum to allow it
77 // to be used as a serialisable map key.
82 : _Continent(CONTINENT::UNKNOWN
)
85 TContinentId(CONTINENT::TContinent cont
)
89 void serial(NLMISC::IStream
&s
)
91 s
.serialEnum(_Continent
);
94 bool operator < (const TContinentId
&other
) const
96 return _Continent
< other
._Continent
;
99 bool operator == (const TContinentId
&other
) const
101 return _Continent
== other
._Continent
;
105 CONTINENT::TContinent _Continent
;
108 // A container to host respawn points counters
109 typedef std::map
< TContinentId
, uint32
> TRespawnPointCounters
;
112 }; // namespace CONTINENT
114 #endif // RYZOM_CONTINENT_H
115 /* End of continent.h */