Linux multi-monitor fullscreen support
[ryzomcore.git] / studio / src / plugins / translation_manager / extract_bot_names.h
blob1027920a79a5e584c4bc94ece8cb50cf4479bd0e
1 // Translation Manager Plugin - OVQT Plugin <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2011 Emanuel COSTEA <cemycc@gmail.com>
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Winch Gate Property Limited
6 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
7 //
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef EXTRACT_BOT_NAMES_H
22 #define EXTRACT_BOT_NAMES_H
24 #include "nel/misc/types_nl.h"
25 #include "nel/misc/config_file.h"
26 #include "nel/misc/sheet_id.h"
27 #include "nel/misc/path.h"
28 #include "nel/misc/diff_tool.h"
29 #include "nel/georges/u_form.h"
30 #include "nel/georges/u_form_elm.h"
31 #include "nel/georges/load_form.h"
32 #include "nel/ligo/ligo_config.h"
33 #include "nel/ligo/primitive.h"
34 #include "nel/ligo/primitive_utils.h"
36 namespace TranslationManager
39 struct TCreatureInfo
41 NLMISC::CSheetId SheetId;
42 bool ForceSheetName;
43 bool DisplayName;
45 void readGeorges(const NLMISC::CSmartPtr<NLGEORGES::UForm> &form, const NLMISC::CSheetId &sheetId)
47 const NLGEORGES::UFormElm &item=form->getRootNode();
49 SheetId=sheetId;
50 item.getValueByName(ForceSheetName, "3d data.ForceDisplayCreatureName");
51 item.getValueByName(DisplayName, "3d data.DisplayName");
54 void serial(NLMISC::IStream &f)
56 f.serial(SheetId);
57 f.serial(ForceSheetName);
58 f.serial(DisplayName);
61 static uint getVersion ()
63 return 1;
66 void removed()
71 struct TEntryInfo
73 std::string SheetName;
76 struct ExtractBotNames
78 private:
79 std::vector<std::string> Filters;
80 std::map<NLMISC::CSheetId, TCreatureInfo> Creatures;
81 std::set<std::string> GenericNames;
82 std::map<std::string, TEntryInfo> SimpleNames;
83 std::set<std::string> Functions;
84 private:
85 TCreatureInfo *getCreature(const std::string &sheetName);
86 ucstring makeGroupName(const ucstring &translationName);
87 std::string removeAndStoreFunction(const std::string &fullName);
88 void addGenericName(const std::string &name, const std::string &sheetName);
89 void addSimpleName(const std::string &name, const std::string &sheetName);
90 public:
91 void extractBotNamesFromPrimitives(NLLIGO::CLigoConfig ligoConfig);
92 void setRequiredSettings(std::list<std::string> filters, std::string level_design_path);
93 std::set<std::string> getGenericNames();
94 std::map<std::string, TEntryInfo> getSimpleNames();
95 std::string cleanupName(const std::string &name);
96 ucstring cleanupUcName(const ucstring &name);
97 void cleanSimpleNames();
98 void cleanGenericNames();
102 #endif /* EXTRACT_BOT_NAMES_H */