Added some functionality to the DTSC::Scan class

This commit is contained in:
Thulinma 2014-08-29 17:26:02 +02:00
parent 194d1ae9a3
commit ec831a98c1
2 changed files with 88 additions and 0 deletions

View file

@ -71,17 +71,22 @@ namespace DTSC {
public:
Scan();
Scan(char * pointer, size_t len);
operator bool() const;
std::string toPrettyString(unsigned int indent = 0);
bool hasMember(std::string indice);
bool hasMember(const char * indice, const unsigned int ind_len);
Scan getMember(std::string indice);
Scan getMember(const char * indice);
Scan getMember(const char * indice, const unsigned int ind_len);
Scan getIndice(unsigned int num);
unsigned int getSize();
char getType();
bool asBool();
long long asInt();
std::string asString();
void getString(char *& result, unsigned int & len);
JSON::Value asJSON();
private:
char * p;
size_t len;