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 CL_ENTITY_SHEET_H
20 #define CL_ENTITY_SHEET_H
26 #include "nel/misc/types_nl.h"
27 #include "nel/misc/stream.h"
28 #include "nel/misc/sheet_id.h"
46 * Class to manage an entity sheet
47 * \author Guillaume PUZIN
48 * \author Nevrax France
54 static std::vector
<std::string
> _Debug
;
74 WEATHER_FUNCTION_PARAMS
,
86 SPELL_LIST
, // obsolete
102 UNKNOWN_SHEET_TYPE
= TypeCount
105 /// Type of the sheet.
111 /// Add string to the debug stack.
112 static void debug(const std::string
&str
);
113 /// Flush the debug stack with a title parameter.
114 static void flush(const std::string
&title
);
117 CEntitySheet() { Type
= UNKNOWN_SHEET_TYPE
; }
119 virtual ~CEntitySheet() {}
121 /// Build the entity from an external script.
122 virtual void build(const NLGEORGES::UFormElm
&item
) = 0;
124 /// Return the type of the sheet.
125 inline TType
type() const {return Type
;}
128 // TType enum/string conversion
129 static const std::string
&typeToString(TType e
);
130 static TType
typeFromString(const std::string
&s
);
133 /// Serialize character sheet into binary data file.
134 virtual void serial(NLMISC::IStream
&f
) = 0;
138 #endif // CL_ENTITY_SHEET_H
140 /* End of entity_sheet.h */