git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added "done" signature for parsers.
[stg.git]
/
stglibs
/
srvconf.lib
/
parsers
/
simple.h
diff --git
a/stglibs/srvconf.lib/parsers/simple.h
b/stglibs/srvconf.lib/parsers/simple.h
index 03c950bccb6222012d8e02bc7a898bc33b03f315..244e8ef08eef544193510b844da534870c7b0461 100644
(file)
--- a/
stglibs/srvconf.lib/parsers/simple.h
+++ b/
stglibs/srvconf.lib/parsers/simple.h
@@
-35,14
+35,16
@@
namespace SIMPLE
class PARSER: public STG::PARSER
{
public:
class PARSER: public STG::PARSER
{
public:
- PARSER(const std::string & tag, CALLBACK f, void * data);
+ PARSER(const std::string & tag, CALLBACK f, void * data
, const std::string & encoding
);
int ParseStart(const char * el, const char ** attr);
void ParseEnd(const char * el);
int ParseStart(const char * el, const char ** attr);
void ParseEnd(const char * el);
+ void Failure(const std::string & reason) { callback(false, reason, data); }
private:
std::string tag;
CALLBACK callback;
void * data;
private:
std::string tag;
CALLBACK callback;
void * data;
+ std::string encoding;
int depth;
void ParseAnswer(const char * el, const char ** attr);
int depth;
void ParseAnswer(const char * el, const char ** attr);