69 CRITICAL_STIL_ERROR = 10,
88 STIL(
const char *stilPath = DEFAULT_PATH_TO_STIL,
const char *bugsPath = DEFAULT_PATH_TO_BUGLIST);
102 const char *getVersion();
111 float getVersionNo();
125 bool setBaseDir(
const char *pathToHVSC);
135 float getSTILVersionNo();
177 const char *getEntry(
const char *relPathToEntry,
int tuneNo = 0,
STILField field = all);
183 const char *getAbsEntry(
const char *absPathToEntry,
int tuneNo = 0,
STILField field = all);
201 const char *getGlobalComment(
const char *relPathToEntry);
207 const char *getAbsGlobalComment(
const char *absPathToEntry);
231 const char *getBug(
const char *relPathToEntry,
int tuneNo = 0);
237 const char *getAbsBug(
const char *absPathToEntry,
int tuneNo = 0);
257 return ((lastError >= CRITICAL_STIL_ERROR) ?
true :
false);
268 inline const char *
getErrorStr()
const {
return (STIL_ERROR_STR[lastError]);}
271 typedef std::map<std::string, std::streampos> dirList;
274 const char *PATH_TO_STIL;
277 const char *PATH_TO_BUGLIST;
280 std::string versionString;
305 static const char *STIL_ERROR_STR[];
310 std::string entrybuf;
313 std::string globalbuf;
319 std::string resultEntry;
320 std::string resultBug;
324 void setVersionString();
334 bool determineEOL(std::ifstream &stilFile);
350 bool getDirs(std::ifstream &inFile, dirList &dirs,
bool isSTILFile);
363 bool positionToEntry(
const char *entryStr, std::ifstream &inFile, dirList &dirs);
373 void readEntry(std::ifstream &inFile, std::string &buffer);
392 bool getField(std::string &result,
const char *buffer,
int tuneNo = 0, STILField field = all);
406 bool getOneField(std::string &result,
const char *start,
const char *end, STILField field);
417 void getStilLine(std::ifstream &infile, std::string &line);
426 static void convertSlashes(std::string &str) { std::replace(str.begin(), str.end(),
'/', SLASH); }
434 static void convertToSlashes(std::string &str) { std::replace(str.begin(), str.end(), SLASH,
'/'); }
STILerror getError() const
Definition: stil.h:246
The length of the HVSC base dir was wrong (empty string?)
Definition: stil.h:70
bool STIL_DEBUG
To turn debug output on.
Definition: stil.h:78
Failed to determine EOL char(s).
Definition: stil.h:72
INFO ONLY: failed to open BUGlist.txt.
Definition: stil.h:64
INFO ONLY: requested entry was not found in STIL.txt.
Definition: stil.h:66
INFO ONLY: path was not within HVSC base dir.
Definition: stil.h:65
INFO ONLY: section-global comment was asked for with get*Entry().
Definition: stil.h:68
const char * getErrorStr() const
Definition: stil.h:268
STILerror
Enum that describes the possible errors this class may encounter.
Definition: stil.h:61
bool hasCriticalError() const
Definition: stil.h:255
INFO ONLY: requested entry was not found in BUGlist.txt.
Definition: stil.h:67
STILField
Enum to use for asking for specific fields.
Definition: stil.h:50
Failed to get sections (subdirs) when parsing STIL.txt.
Definition: stil.h:73
Failed to open STIL.txt.
Definition: stil.h:71