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
18
19namespace YAML{
20 class Node;
21};
22
24{
25public:
26
27 gfCCatalogueCatalogue* const catalogueLoad(const fsStr& pFileName) override;
28
31
32protected:
33
34
35 void categoryLoad(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory, const fsStr& pFileName);
36
37private:
38
39 struct SSettings
40 {
41 fsStr mIconFileBase;
42 fsStr mImageFileBase;
43 fsStr mDefaultAction;
44 fsStr mDefaultType;
45 };
46
47 void entriesCreate(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory,
48 fsCVariableTable* pVarTable, const SSettings& pSettings);
49 static fsBool itemCreate(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory,
50 fsCVariableTable* pVarTable, const SSettings& pSettings, fsS32 pIndex);
51 static void graphicFileBasesGet(fsCVariableTable* pVarTable, SSettings& pSettings);
52 static fsStr extensionAdd(const fsStr& pFilename);
53
54 std::map<std::string, std::string> flatten(const YAML::Node& node);
55};
56
57#endif
Definition fsCVariableTable.h:27
Definition fsStr.h:23
Definition gfCCatalogueCatalogue.h:17
gfCCatalogueParserYaml()
Definition gfCCatalogueParserYaml.cpp:222
virtual ~gfCCatalogueParserYaml()
Definition gfCCatalogueParserYaml.cpp:226
gfCCatalogueCatalogue *const catalogueLoad(const fsStr &pFileName) override
Definition gfCCatalogueParserYaml.cpp:45
void categoryLoad(gfCCatalogueCatalogue *pCatalogue, const fsStr &pParentCategory, const fsStr &pFileName)
Definition gfCCatalogueParserYaml.cpp:125
Definition gfICatalogueEntry.h:18
gfICatalogueParser()
Definition gfICatalogueParser.h:30
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
Definition gfCCatalogueParserYaml.h:19