Fission FSN
Loading...
Searching...
No Matches
gfCCatalogueParserYaml.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCCatalogueParserYaml.h
4*
5* Purpose: Parse the catalogue data file
6*
7*********************************************************************/
8
9#ifndef gfCCatalogueParserYamlhdr
10#define gfCCatalogueParserYamlhdr
11
12#include <map>
14
18class fsCResourceName;
19
20namespace YAML{
21 class Node;
22};
23
25{
26public:
27
28 gfCCatalogueCatalogue* const catalogueLoad(const fsStr& pFileName) override;
29
31 ~gfCCatalogueParserYaml() override;
32
33protected:
34
35
36 void categoryLoad(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory, const fsStr& pFileName);
37
38private:
39
40 struct SSettings
41 {
42 fsStr mIconFileBase;
43 fsStr mImageFileBase;
44 fsStr mDefaultAction;
45 fsStr mDefaultType;
46 };
47
48 void entriesCreate(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory,
49 fsCVariableTable* pVarTable, const SSettings& pSettings);
50 static fsBool itemCreate(const gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory,
51 fsCVariableTable* pVarTable, const SSettings& pSettings, fsS32 pIndex);
52 static void graphicFileBasesGet(fsCVariableTable* pVarTable, SSettings& pSettings);
53 static fsStr extensionAdd(const fsStr& pFilename);
54
55 std::map<std::string, std::string> flatten(const YAML::Node& node);
56 fsBool settingsLoad(const fsCResourceName& pResourceName, std::map<std::string, std::string>& pOutSettings);
57};
58
59#endif
Definition fsCResourceName.h:32
Definition fsCVariableTable.h:27
Definition fsStr.h:23
Definition gfCCatalogueCatalogue.h:17
gfCCatalogueParserYaml()
Definition gfCCatalogueParserYaml.cpp:242
gfCCatalogueCatalogue *const catalogueLoad(const fsStr &pFileName) override
Definition gfCCatalogueParserYaml.cpp:61
void categoryLoad(gfCCatalogueCatalogue *pCatalogue, const fsStr &pParentCategory, const fsStr &pFileName)
Definition gfCCatalogueParserYaml.cpp:143
~gfCCatalogueParserYaml() override
Definition gfCCatalogueParserYaml.cpp:246
Definition gfICatalogueEntry.h:18
gfICatalogueParser()
Definition gfICatalogueParser.h:30
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
Definition gfCCatalogueParserYaml.h:20