/********************************************************************
*
* Created: 16/9/2014 10:00
*
* File: fsCStringsFile.h
*
* Author: Martin P. King
*
* Purpose: Convert the XML strings to simple VariableTable
* strings
*
*********************************************************************/
#ifndef fsCStringsFilehdr
#define fsCStringsFilehdr
#include <vector>
#include <fsCore/fsBaseTypes.h>
#include <fsCore/fsStr.h>
#include "fsCVariableTable.h"
class fsCVariableTable;
class fsCStringsFile : public fsCVariableTable
{
public:
static const fsStr mRowOpenTag;
static const fsStr mRowCloseTag;
static const fsStr mCellOpenTag;
static const fsStr mCellCloseTag;
static const fsStr mStringPropertyTag;
static const fsStr mNumberPropertyTag;
static const fsStr mEllipsisChar;
static fsBool nextKeyGet(fsStr& pOutStr, std::vector<fsStr>& pLines, std::vector<fsStr>::iterator& pLine);
static fsBool nextValueGet(fsStr& pOutStr, std::vector<fsStr>& pLines, std::vector<fsStr>::iterator& pLine);
void read();
void write();
virtual ~fsCStringsFile();<--- Destructor in derived class
protected:
fsCStringsFile();
void read(const fsStr& pFileName, fsCVariableTable* pStrings);
private:
fsStr mSrcFilename;
fsStr mOutPath;
};
#endif