Fission
FSN
Loading...
Searching...
No Matches
gameModules
gfCatalogue
src
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>
13
#include "
../gfICatalogueParser.h
"
14
15
class
gfICatalogueEntry
;
16
class
gfCCatalogueCatalogue
;
17
class
fsCVariableTable
;
18
class
fsCResourceName
;
19
20
namespace
YAML
{
21
class
Node;
22
};
23
24
class
gfCCatalogueParserYaml
:
public
gfICatalogueParser
25
{
26
public
:
27
28
gfCCatalogueCatalogue
*
const
catalogueLoad
(
const
fsStr
& pFileName)
override
;
29
30
gfCCatalogueParserYaml
();
31
~gfCCatalogueParserYaml
()
override
;
32
33
protected
:
34
35
36
void
categoryLoad
(
gfCCatalogueCatalogue
* pCatalogue,
const
fsStr
& pParentCategory,
const
fsStr
& pFileName);
37
38
private
:
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
fsCResourceName
Definition
fsCResourceName.h:32
fsCVariableTable
Definition
fsCVariableTable.h:27
fsStr
Definition
fsStr.h:23
gfCCatalogueCatalogue
Definition
gfCCatalogueCatalogue.h:17
gfCCatalogueParserYaml::gfCCatalogueParserYaml
gfCCatalogueParserYaml()
Definition
gfCCatalogueParserYaml.cpp:242
gfCCatalogueParserYaml::catalogueLoad
gfCCatalogueCatalogue *const catalogueLoad(const fsStr &pFileName) override
Definition
gfCCatalogueParserYaml.cpp:61
gfCCatalogueParserYaml::categoryLoad
void categoryLoad(gfCCatalogueCatalogue *pCatalogue, const fsStr &pParentCategory, const fsStr &pFileName)
Definition
gfCCatalogueParserYaml.cpp:143
gfCCatalogueParserYaml::~gfCCatalogueParserYaml
~gfCCatalogueParserYaml() override
Definition
gfCCatalogueParserYaml.cpp:246
gfICatalogueEntry
Definition
gfICatalogueEntry.h:18
gfICatalogueParser::gfICatalogueParser
gfICatalogueParser()
Definition
gfICatalogueParser.h:30
gfICatalogueParser.h
fsBool
bool fsBool
Definition
fsBaseTypes.h:26
fsS32
int fsS32
Definition
fsBaseTypes.h:20
YAML
Definition
gfCCatalogueParserYaml.h:20
Generated on
for Fission by
1.16.1