24 #include <tulip/tulipconf.h>
40 class TLP_SCOPE YajlParseFacade {
42 YajlParseFacade(
tlp::PluginProgress* progress=NULL) : _progress(progress), _parsingSucceeded(true) {}
44 virtual ~YajlParseFacade() {
53 void parse(std::string filename);
54 void parse(QIODevice* stream);
56 virtual void parseNull();
57 virtual void parseBoolean(
bool boolVal);
58 virtual void parseInteger(
long long integerVal);
59 virtual void parseDouble(
double doubleVal);
60 virtual void parseNumber(
const char * numberVal,
size_t numberLen);
61 virtual void parseString(
const std::string& value);
62 virtual void parseMapKey(
const std::string& value);
63 virtual void parseStartMap();
64 virtual void parseEndMap();
65 virtual void parseStartArray();
66 virtual void parseEndArray();
68 bool parsingSucceeded()
const;
69 std::string errorMessage()
const;
73 bool _parsingSucceeded;
74 std::string _errorMessage;
77 class YajlWriteFacade {
82 std::string generatedString();
84 void writeInteger(
long long int number);
85 void writeDouble(
double number);
86 void writeNumber(
const char* str,
size_t len);
87 void writeString(
const std::string& text);
89 void writeBool(
bool value);
92 void writeArrayOpen();
93 void writeArrayClose();
95 yajl_gen_t* _generator;