godot/thirdparty/openxr/src/external/jsoncpp/src/lib_json/json_reader.cpp

// Copyright 2007-2011 Baptiste Lepilleur and The JsonCpp Authors
// Copyright (C) 2016 InfoTeCS JSC. All rights reserved.
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE

#if !defined(JSON_IS_AMALGAMATION)
#include "json_tool.h"
#include <json/assertions.h>
#include <json/reader.h>
#include <json/value.h>
#endif // if !defined(JSON_IS_AMALGAMATION)
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
#include <istream>
#include <limits>
#include <memory>
#include <set>
#include <sstream>
#include <utility>

#include <cstdio>
#if __cplusplus >= 201103L

#if !defined(sscanf)
#define sscanf
#endif

#endif //__cplusplus

#if defined(_MSC_VER)
#if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
#endif //_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
#endif //_MSC_VER

#if defined(_MSC_VER)
// Disable warning about strdup being deprecated.
#pragma warning(disable : 4996)
#endif

// Define JSONCPP_DEPRECATED_STACK_LIMIT as an appropriate integer at compile
// time to change the stack limit
#if !defined(JSONCPP_DEPRECATED_STACK_LIMIT)
#define JSONCPP_DEPRECATED_STACK_LIMIT
#endif

static size_t const stackLimit_g =; // see readValue()

namespace Json {

#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
CharReaderPtr;
#else
using CharReaderPtr = std::auto_ptr<CharReader>;
#endif

// Implementation of class Features
// ////////////////////////////////

Features::Features() = default;

Features Features::all() {}

Features Features::strictMode() {}

// Implementation of class Reader
// ////////////////////////////////

bool Reader::containsNewLine(Reader::Location begin, Reader::Location end) {}

// Class Reader
// //////////////////////////////////////////////////////////////////

Reader::Reader() :{}

Reader::Reader(const Features& features) :{}

bool Reader::parse(const std::string& document, Value& root,
                   bool collectComments) {}

bool Reader::parse(std::istream& is, Value& root, bool collectComments) {}

bool Reader::parse(const char* beginDoc, const char* endDoc, Value& root,
                   bool collectComments) {}

bool Reader::readValue() {}

void Reader::skipCommentTokens(Token& token) {}

bool Reader::readToken(Token& token) {}

void Reader::skipSpaces() {}

bool Reader::match(const Char* pattern, int patternLength) {}

bool Reader::readComment() {}

String Reader::normalizeEOL(Reader::Location begin, Reader::Location end) {}

void Reader::addComment(Location begin, Location end,
                        CommentPlacement placement) {}

bool Reader::readCStyleComment() {}

bool Reader::readCppStyleComment() {}

void Reader::readNumber() {}

bool Reader::readString() {}

bool Reader::readObject(Token& token) {}

bool Reader::readArray(Token& token) {}

bool Reader::decodeNumber(Token& token) {}

bool Reader::decodeNumber(Token& token, Value& decoded) {}

bool Reader::decodeDouble(Token& token) {}

bool Reader::decodeDouble(Token& token, Value& decoded) {}

bool Reader::decodeString(Token& token) {}

bool Reader::decodeString(Token& token, String& decoded) {}

bool Reader::decodeUnicodeCodePoint(Token& token, Location& current,
                                    Location end, unsigned int& unicode) {}

bool Reader::decodeUnicodeEscapeSequence(Token& token, Location& current,
                                         Location end,
                                         unsigned int& ret_unicode) {}

bool Reader::addError(const String& message, Token& token, Location extra) {}

bool Reader::recoverFromError(TokenType skipUntilToken) {}

bool Reader::addErrorAndRecover(const String& message, Token& token,
                                TokenType skipUntilToken) {}

Value& Reader::currentValue() {}

Reader::Char Reader::getNextChar() {}

void Reader::getLocationLineAndColumn(Location location, int& line,
                                      int& column) const {}

String Reader::getLocationLineAndColumn(Location location) const {}

// Deprecated. Preserved for backward compatibility
String Reader::getFormatedErrorMessages() const {}

String Reader::getFormattedErrorMessages() const {}

std::vector<Reader::StructuredError> Reader::getStructuredErrors() const {}

bool Reader::pushError(const Value& value, const String& message) {}

bool Reader::pushError(const Value& value, const String& message,
                       const Value& extra) {}

bool Reader::good() const {}

// Originally copied from the Features class (now deprecated), used internally
// for features implementation.
class OurFeatures {}; // OurFeatures

OurFeatures OurFeatures::all() {}

// Implementation of class Reader
// ////////////////////////////////

// Originally copied from the Reader class (now deprecated), used internally
// for implementing JSON reading.
class OurReader {}; // OurReader

// complete copy of Read impl, for OurReader

bool OurReader::containsNewLine(OurReader::Location begin,
                                OurReader::Location end) {}

OurReader::OurReader(OurFeatures const& features) :{}

bool OurReader::parse(const char* beginDoc, const char* endDoc, Value& root,
                      bool collectComments) {}

bool OurReader::readValue() {}

void OurReader::skipCommentTokens(Token& token) {}

bool OurReader::readToken(Token& token) {}

void OurReader::skipSpaces() {}

void OurReader::skipBom(bool skipBom) {}

bool OurReader::match(const Char* pattern, int patternLength) {}

bool OurReader::readComment() {}

String OurReader::normalizeEOL(OurReader::Location begin,
                               OurReader::Location end) {}

void OurReader::addComment(Location begin, Location end,
                           CommentPlacement placement) {}

bool OurReader::readCStyleComment(bool* containsNewLineResult) {}

bool OurReader::readCppStyleComment() {}

bool OurReader::readNumber(bool checkInf) {}
bool OurReader::readString() {}

bool OurReader::readStringSingleQuote() {}

bool OurReader::readObject(Token& token) {}

bool OurReader::readArray(Token& token) {}

bool OurReader::decodeNumber(Token& token) {}

bool OurReader::decodeNumber(Token& token, Value& decoded) {}

bool OurReader::decodeDouble(Token& token) {}

bool OurReader::decodeDouble(Token& token, Value& decoded) {}

bool OurReader::decodeString(Token& token) {}

bool OurReader::decodeString(Token& token, String& decoded) {}

bool OurReader::decodeUnicodeCodePoint(Token& token, Location& current,
                                       Location end, unsigned int& unicode) {}

bool OurReader::decodeUnicodeEscapeSequence(Token& token, Location& current,
                                            Location end,
                                            unsigned int& ret_unicode) {}

bool OurReader::addError(const String& message, Token& token, Location extra) {}

bool OurReader::recoverFromError(TokenType skipUntilToken) {}

bool OurReader::addErrorAndRecover(const String& message, Token& token,
                                   TokenType skipUntilToken) {}

Value& OurReader::currentValue() {}

OurReader::Char OurReader::getNextChar() {}

void OurReader::getLocationLineAndColumn(Location location, int& line,
                                         int& column) const {}

String OurReader::getLocationLineAndColumn(Location location) const {}

String OurReader::getFormattedErrorMessages() const {}

std::vector<OurReader::StructuredError> OurReader::getStructuredErrors() const {}

class OurCharReader : public CharReader {};

CharReaderBuilder::CharReaderBuilder() {}
CharReaderBuilder::~CharReaderBuilder() = default;
CharReader* CharReaderBuilder::newCharReader() const {}

bool CharReaderBuilder::validate(Json::Value* invalid) const {}

Value& CharReaderBuilder::operator[](const String& key) {}
// static
void CharReaderBuilder::strictMode(Json::Value* settings) {}
// static
void CharReaderBuilder::setDefaults(Json::Value* settings) {}

//////////////////////////////////
// global functions

bool parseFromStream(CharReader::Factory const& fact, IStream& sin, Value* root,
                     String* errs) {}

IStream& operator>>(IStream& sin, Value& root) {}

} // namespace Json