Fix classique titles display
[ryzomcore.git] / ryzom / client / src / client_sheets / entity_sheet.h
blobbb36fc04e8a3154fca55519b78d7e33eb5a8bcdc
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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
22 /////////////
23 // INCLUDE //
24 /////////////
25 // Misc.
26 #include "nel/misc/types_nl.h"
27 #include "nel/misc/stream.h"
28 #include "nel/misc/sheet_id.h"
31 ///////////
32 // USING //
33 ///////////
36 ///////////
37 // CLASS //
38 ///////////
39 namespace NLGEORGES
41 class UFormElm;
42 class UFormLoader;
45 /**
46 * Class to manage an entity sheet
47 * \author Guillaume PUZIN
48 * \author Nevrax France
49 * \date 2001
51 class CEntitySheet
53 private:
54 static std::vector<std::string> _Debug;
56 public:
57 enum TType
59 CHAR = 0,
60 FAUNA,
61 FLORA,
62 OBJECT,
63 FX,
64 BUILDING,
65 ITEM,
66 PLANT,
67 MISSION,
68 RACE_STATS,
69 PACT,
70 LIGHT_CYCLE,
71 WEATHER_SETUP,
72 CONTINENT,
73 WORLD,
74 WEATHER_FUNCTION_PARAMS,
75 UNKNOWN,
76 BOTCHAT,
77 MISSION_ICON,
78 SBRICK,
79 SPHRASE,
80 SKILLS_TREE,
81 UNBLOCK_TITLES,
82 SUCCESS_TABLE,
83 AUTOMATON_LIST,
84 ANIMATION_SET_LIST,
85 SPELL, // obsolete
86 SPELL_LIST, // obsolete
87 CAST_FX, // obsolete
88 EMOT,
89 ANIMATION_FX,
90 ID_TO_STRING_ARRAY,
91 FORAGE_SOURCE,
92 CREATURE_ATTACK,
93 ANIMATION_FX_SET,
94 ATTACK_LIST,
95 SKY,
96 TEXT_EMOT,
97 OUTPOST,
98 OUTPOST_SQUAD,
99 OUTPOST_BUILDING,
100 FACTION,
101 TypeCount,
102 UNKNOWN_SHEET_TYPE = TypeCount
105 /// Type of the sheet.
106 TType Type;
107 /// Sheet Id.
108 NLMISC::CSheetId Id;
110 public:
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);
116 /// Constructor
117 CEntitySheet() { Type = UNKNOWN_SHEET_TYPE; }
118 /// Destructor.
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 */