Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Json::OurReader Class Reference

Classes

class  ErrorInfo
 
struct  StructuredError
 
class  Token
 

Public Types

typedef char Char
 

Public Member Functions

std::string getFormattedErrorMessages () const
 
std::vector< StructuredErrorgetStructuredErrors () const
 
bool good () const
 
 OurReader (OurFeatures const &features)
 
bool parse (const char *beginDoc, const char *endDoc, Value &root, bool collectComments=true)
 
bool pushError (const Value &value, const std::string &message)
 
bool pushError (const Value &value, const std::string &message, const Value &extra)
 

Public Attributes

const typedef CharLocation
 

Private Types

typedef std::deque< ErrorInfoErrors
 
typedef std::stack< Value * > Nodes
 
enum  TokenType {
  tokenEndOfStream = 0, tokenObjectBegin, tokenObjectEnd, tokenArrayBegin,
  tokenArrayEnd, tokenString, tokenNumber, tokenTrue,
  tokenFalse, tokenNull, tokenNaN, tokenPosInf,
  tokenNegInf, tokenArraySeparator, tokenMemberSeparator, tokenComment,
  tokenError
}
 

Private Member Functions

void addComment (Location begin, Location end, CommentPlacement placement)
 
bool addError (const std::string &message, Token &token, Location extra=0)
 
bool addErrorAndRecover (const std::string &message, Token &token, TokenType skipUntilToken)
 
ValuecurrentValue ()
 
bool decodeDouble (Token &token)
 
bool decodeDouble (Token &token, Value &decoded)
 
bool decodeNumber (Token &token)
 
bool decodeNumber (Token &token, Value &decoded)
 
bool decodeString (Token &token)
 
bool decodeString (Token &token, std::string &decoded)
 
bool decodeUnicodeCodePoint (Token &token, Location &current, Location end, unsigned int &unicode)
 
bool decodeUnicodeEscapeSequence (Token &token, Location &current, Location end, unsigned int &unicode)
 
std::string getLocationLineAndColumn (Location location) const
 
void getLocationLineAndColumn (Location location, int &line, int &column) const
 
Char getNextChar ()
 
bool match (Location pattern, int patternLength)
 
void operator= (OurReader const &)
 
 OurReader (OurReader const &)
 
bool readArray (Token &token)
 
bool readComment ()
 
bool readCppStyleComment ()
 
bool readCStyleComment ()
 
bool readNumber (bool checkInf)
 
bool readObject (Token &token)
 
bool readString ()
 
bool readStringSingleQuote ()
 
bool readToken (Token &token)
 
bool readValue ()
 
bool recoverFromError (TokenType skipUntilToken)
 
void skipCommentTokens (Token &token)
 
void skipSpaces ()
 
void skipUntilSpace ()
 

Private Attributes

Location begin_
 
bool collectComments_
 
std::string commentsBefore_
 
Location current_
 
std::string document_
 
Location end_
 
Errors errors_
 
const OurFeatures features_
 
ValuelastValue_
 
Location lastValueEnd_
 
Nodes nodes_
 
int stackDepth_
 

Detailed Description

Definition at line 1103 of file jsoncpp.cpp.

Member Typedef Documentation

◆ Char

typedef char Json::OurReader::Char

Definition at line 1105 of file jsoncpp.cpp.

◆ Errors

typedef std::deque<ErrorInfo> Json::OurReader::Errors
private

Definition at line 1162 of file jsoncpp.cpp.

◆ Nodes

typedef std::stack<Value*> Json::OurReader::Nodes
private

Definition at line 1204 of file jsoncpp.cpp.

Member Enumeration Documentation

◆ TokenType

Enumerator
tokenEndOfStream 
tokenObjectBegin 
tokenObjectEnd 
tokenArrayBegin 
tokenArrayEnd 
tokenString 
tokenNumber 
tokenTrue 
tokenFalse 
tokenNull 
tokenNaN 
tokenPosInf 
tokenNegInf 
tokenArraySeparator 
tokenMemberSeparator 
tokenComment 
tokenError 

Definition at line 1128 of file jsoncpp.cpp.

Constructor & Destructor Documentation

◆ OurReader() [1/2]

Json::OurReader::OurReader ( OurFeatures const &  features)

Definition at line 1222 of file jsoncpp.cpp.

◆ OurReader() [2/2]

Json::OurReader::OurReader ( OurReader const &  )
private

Member Function Documentation

◆ addComment()

void Json::OurReader::addComment ( Location  begin,
Location  end,
CommentPlacement  placement 
)
private

Definition at line 1535 of file jsoncpp.cpp.

◆ addError()

bool Json::OurReader::addError ( const std::string message,
Token token,
Location  extra = 0 
)
private

Definition at line 1940 of file jsoncpp.cpp.

◆ addErrorAndRecover()

bool Json::OurReader::addErrorAndRecover ( const std::string message,
Token token,
TokenType  skipUntilToken 
)
private

Definition at line 1962 of file jsoncpp.cpp.

◆ currentValue()

Value & Json::OurReader::currentValue ( )
private

Definition at line 1969 of file jsoncpp.cpp.

◆ decodeDouble() [1/2]

bool Json::OurReader::decodeDouble ( Token token)
private

Definition at line 1772 of file jsoncpp.cpp.

◆ decodeDouble() [2/2]

bool Json::OurReader::decodeDouble ( Token token,
Value decoded 
)
private

Definition at line 1782 of file jsoncpp.cpp.

◆ decodeNumber() [1/2]

bool Json::OurReader::decodeNumber ( Token token)
private

Definition at line 1722 of file jsoncpp.cpp.

◆ decodeNumber() [2/2]

bool Json::OurReader::decodeNumber ( Token token,
Value decoded 
)
private

Definition at line 1732 of file jsoncpp.cpp.

◆ decodeString() [1/2]

bool Json::OurReader::decodeString ( Token token)
private

Definition at line 1818 of file jsoncpp.cpp.

◆ decodeString() [2/2]

bool Json::OurReader::decodeString ( Token token,
std::string decoded 
)
private

Definition at line 1829 of file jsoncpp.cpp.

◆ decodeUnicodeCodePoint()

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

Definition at line 1882 of file jsoncpp.cpp.

◆ decodeUnicodeEscapeSequence()

bool Json::OurReader::decodeUnicodeEscapeSequence ( Token token,
Location current,
Location  end,
unsigned int &  unicode 
)
private

Definition at line 1911 of file jsoncpp.cpp.

◆ getFormattedErrorMessages()

std::string Json::OurReader::getFormattedErrorMessages ( ) const

Definition at line 2008 of file jsoncpp.cpp.

◆ getLocationLineAndColumn() [1/2]

std::string Json::OurReader::getLocationLineAndColumn ( Location  location) const
private

Definition at line 2000 of file jsoncpp.cpp.

◆ getLocationLineAndColumn() [2/2]

void Json::OurReader::getLocationLineAndColumn ( Location  location,
int &  line,
int &  column 
) const
private

Definition at line 1977 of file jsoncpp.cpp.

◆ getNextChar()

OurReader::Char Json::OurReader::getNextChar ( )
private

Definition at line 1971 of file jsoncpp.cpp.

◆ getStructuredErrors()

std::vector< OurReader::StructuredError > Json::OurReader::getStructuredErrors ( ) const

Definition at line 2024 of file jsoncpp.cpp.

◆ good()

bool Json::OurReader::good ( ) const

Definition at line 2074 of file jsoncpp.cpp.

◆ match()

bool Json::OurReader::match ( Location  pattern,
int  patternLength 
)
private

Definition at line 1500 of file jsoncpp.cpp.

◆ operator=()

void Json::OurReader::operator= ( OurReader const &  )
private

◆ parse()

bool Json::OurReader::parse ( const char *  beginDoc,
const char *  endDoc,
Value root,
bool  collectComments = true 
)

Definition at line 1229 of file jsoncpp.cpp.

◆ pushError() [1/2]

bool Json::OurReader::pushError ( const Value value,
const std::string message 
)

Definition at line 2039 of file jsoncpp.cpp.

◆ pushError() [2/2]

bool Json::OurReader::pushError ( const Value value,
const std::string message,
const Value extra 
)

Definition at line 2056 of file jsoncpp.cpp.

◆ readArray()

bool Json::OurReader::readArray ( Token token)
private

Definition at line 1684 of file jsoncpp.cpp.

◆ readComment()

bool Json::OurReader::readComment ( )
private

Definition at line 1511 of file jsoncpp.cpp.

◆ readCppStyleComment()

bool Json::OurReader::readCppStyleComment ( )
private

Definition at line 1555 of file jsoncpp.cpp.

◆ readCStyleComment()

bool Json::OurReader::readCStyleComment ( )
private

Definition at line 1546 of file jsoncpp.cpp.

◆ readNumber()

bool Json::OurReader::readNumber ( bool  checkInf)
private

Definition at line 1571 of file jsoncpp.cpp.

◆ readObject()

bool Json::OurReader::readObject ( Token token)
private

Definition at line 1622 of file jsoncpp.cpp.

◆ readString()

bool Json::OurReader::readString ( )
private

Definition at line 1597 of file jsoncpp.cpp.

◆ readStringSingleQuote()

bool Json::OurReader::readStringSingleQuote ( )
private

Definition at line 1610 of file jsoncpp.cpp.

◆ readToken()

bool Json::OurReader::readToken ( Token token)
private

Definition at line 1390 of file jsoncpp.cpp.

◆ readValue()

bool Json::OurReader::readValue ( )
private

Definition at line 1277 of file jsoncpp.cpp.

◆ recoverFromError()

bool Json::OurReader::recoverFromError ( TokenType  skipUntilToken)
private

Definition at line 1949 of file jsoncpp.cpp.

◆ skipCommentTokens()

void Json::OurReader::skipCommentTokens ( Token token)
private

Definition at line 1380 of file jsoncpp.cpp.

◆ skipSpaces()

void Json::OurReader::skipSpaces ( )
private

Definition at line 1490 of file jsoncpp.cpp.

◆ skipUntilSpace()

void Json::OurReader::skipUntilSpace ( )
private

Member Data Documentation

◆ begin_

Location Json::OurReader::begin_
private

Definition at line 1208 of file jsoncpp.cpp.

◆ collectComments_

bool Json::OurReader::collectComments_
private

Definition at line 1217 of file jsoncpp.cpp.

◆ commentsBefore_

std::string Json::OurReader::commentsBefore_
private

Definition at line 1213 of file jsoncpp.cpp.

◆ current_

Location Json::OurReader::current_
private

Definition at line 1210 of file jsoncpp.cpp.

◆ document_

std::string Json::OurReader::document_
private

Definition at line 1207 of file jsoncpp.cpp.

◆ end_

Location Json::OurReader::end_
private

Definition at line 1209 of file jsoncpp.cpp.

◆ errors_

Errors Json::OurReader::errors_
private

Definition at line 1206 of file jsoncpp.cpp.

◆ features_

const OurFeatures Json::OurReader::features_
private

Definition at line 1216 of file jsoncpp.cpp.

◆ lastValue_

Value* Json::OurReader::lastValue_
private

Definition at line 1212 of file jsoncpp.cpp.

◆ lastValueEnd_

Location Json::OurReader::lastValueEnd_
private

Definition at line 1211 of file jsoncpp.cpp.

◆ Location

const typedef Char* Json::OurReader::Location

Definition at line 1106 of file jsoncpp.cpp.

◆ nodes_

Nodes Json::OurReader::nodes_
private

Definition at line 1205 of file jsoncpp.cpp.

◆ stackDepth_

int Json::OurReader::stackDepth_
private

Definition at line 1214 of file jsoncpp.cpp.


The documentation for this class was generated from the following file:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:10