/********************************************************************
*
* File: gfCCatalogueParserVarTable.h
*
* Purpose: Parse the catalogue data file
*
*********************************************************************/
#ifndef gfCCatalogueParserVarTablehdr
#define gfCCatalogueParserVarTablehdr
#include "../gfICatalogueParser.h"
class gfICatalogueEntry;
class gfCCatalogueCatalogue;
class fsCVariableTable;
class gfCCatalogueParserVarTable : public gfICatalogueParser
{
public:
gfCCatalogueCatalogue* const catalogueLoad(const fsStr& pFileName) override;
gfCCatalogueParserVarTable();
virtual ~gfCCatalogueParserVarTable();<--- Destructor in derived class
protected:
void categoryLoad(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory, const fsStr& pFileName);
private:
struct SSettings
{
fsStr mIconFileBase;
fsStr mImageFileBase;
fsStr mDefaultAction;
};
void entriesCreate(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory,
fsCVariableTable* pVarTable, const SSettings& pSettings);
static fsBool itemCreate(gfCCatalogueCatalogue* pCatalogue, const fsStr& pParentCategory,
fsCVariableTable* pVarTable, const SSettings& pSettings, fsS32 pIndex);
static void graphicFileBasesGet(fsCVariableTable* pVarTable, SSettings& pSettings);
static fsStr extensionAdd(const fsStr& pFilename);
};
#endif