StructuredValue
#include "StructuredValue.h"
The format of structured values is defined in the Structured Values document.
class StructuredArray
Represents an array of structured values.
DEFINITION
class StructuredArray;
constructor StructuredArray
DEFINITION
|
StructuredArray |
( |
Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
method begin
DEFINITION
|
std::vector< std::shared_ptr< StructuredValue > >::iterator begin |
( |
); |
| RETURNS | DESCRIPTION |
std::vector< std::shared_ptr< StructuredValue > >::iterator |
|
method beginconst
DEFINITION
|
std::vector< std::shared_ptr< StructuredValue > >::const_iterator begin |
( |
) const; |
| RETURNS | DESCRIPTION |
std::vector< std::shared_ptr< StructuredValue > >::const_iterator |
|
method end
DEFINITION
|
std::vector< std::shared_ptr< StructuredValue > >::iterator end |
( |
); |
| RETURNS | DESCRIPTION |
std::vector< std::shared_ptr< StructuredValue > >::iterator |
|
method endconst
DEFINITION
|
std::vector< std::shared_ptr< StructuredValue > >::const_iterator end |
( |
) const; |
| RETURNS | DESCRIPTION |
std::vector< std::shared_ptr< StructuredValue > >::const_iterator |
|
method operator[]const
DEFINITION
|
std::shared_ptr< StructuredValue > operator[] |
( |
size_t index | ) const; |
| PARAMETER | DESCRIPTION |
index |
|
| RETURNS | DESCRIPTION |
std::shared_ptr< StructuredValue > |
|
method sizeconst
| RETURNS | DESCRIPTION |
size_t |
|
method typeconstvirtual
DEFINITION
|
virtual Type type |
( |
) const; |
member entries
DEFINITION
std::vector< std::shared_ptr< StructuredValue > > entries;
class StructuredBody
Represents a body as part of a structured value.
DEFINITION
class StructuredBody;
constructor StructuredBody
DEFINITION
|
StructuredBody |
( |
Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
method typeconstvirtual
DEFINITION
|
virtual Type type |
( |
) const; |
class StructuredDictionary
Represents a dictionary of structured values. Keys are tokens and values are structured values.
DEFINITION
class StructuredDictionary;
constructor StructuredDictionary
DEFINITION
|
StructuredDictionary |
( |
Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
method begin
DEFINITION
|
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::iterator begin |
( |
); |
| RETURNS | DESCRIPTION |
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::iterator |
|
method beginconst
DEFINITION
|
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::const_iterator begin |
( |
) const; |
| RETURNS | DESCRIPTION |
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::const_iterator |
|
method end
DEFINITION
|
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::iterator end |
( |
); |
| RETURNS | DESCRIPTION |
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::iterator |
|
method endconst
DEFINITION
|
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::const_iterator end |
( |
) const; |
| RETURNS | DESCRIPTION |
std::unordered_map< Token, std::shared_ptr< StructuredValue > >::const_iterator |
|
method get_optionalconst
DEFINITION
|
std::shared_ptr< StructuredValue > get_optional |
( |
const Token & token | ) const; |
| PARAMETER | DESCRIPTION |
token |
|
| RETURNS | DESCRIPTION |
std::shared_ptr< StructuredValue > |
|
method has_keyconst
DEFINITION
|
bool has_key |
( |
const Token & token | ) const; |
| PARAMETER | DESCRIPTION |
token |
|
method operator[]const
DEFINITION
|
std::shared_ptr< StructuredValue > operator[] |
( |
const Token & token | ) const; |
| PARAMETER | DESCRIPTION |
token |
|
| RETURNS | DESCRIPTION |
std::shared_ptr< StructuredValue > |
|
method typeconstvirtual
DEFINITION
|
virtual Type type |
( |
) const; |
member entries
DEFINITION
std::unordered_map< Token, std::shared_ptr< StructuredValue > > entries;
class StructuredScalar
Represents a scalar value, which can be a single token or a list of tokens.
DEFINITION
class StructuredScalar;
constructor StructuredScalar
DEFINITION
|
StructuredScalar |
( |
Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
method begin
DEFINITION
|
std::vector< Token >::iterator begin |
( |
); |
| RETURNS | DESCRIPTION |
std::vector< Token >::iterator |
|
method beginconst
DEFINITION
|
std::vector< Token >::const_iterator begin |
( |
) const; |
| RETURNS | DESCRIPTION |
std::vector< Token >::const_iterator |
|
method end
DEFINITION
|
std::vector< Token >::iterator end |
( |
); |
| RETURNS | DESCRIPTION |
std::vector< Token >::iterator |
|
method endconst
DEFINITION
|
std::vector< Token >::const_iterator end |
( |
) const; |
| RETURNS | DESCRIPTION |
std::vector< Token >::const_iterator |
|
method operator[]const
DEFINITION
|
const Token & operator[] |
( |
size_t index | ) const; |
| PARAMETER | DESCRIPTION |
index |
|
| RETURNS | DESCRIPTION |
const Token & |
|
method sizeconst
| RETURNS | DESCRIPTION |
size_t |
|
method tokenconst
DEFINITION
|
const Token & token |
( |
) const; |
| RETURNS | DESCRIPTION |
const Token & |
|
method typeconstvirtual
DEFINITION
|
virtual Type type |
( |
) const; |
member tokens
DEFINITION
std::vector< Token > tokens;
class StructuredValue
Represents a structured value, which can be an scalar, array, dictionary, or body.
DEFINITION
class StructuredValue;
enum Type
| VALUE | DESCRIPTION |
ARRAY |
|
BODY |
|
DICTIONARY |
|
SCALAR_LIST |
|
SCALAR_SINGULAR |
|
destructor ~StructuredValuevirtual
DEFINITION
|
virtual ~StructuredValue |
( |
); |
method as_arrayconst
DEFINITION
|
const StructuredArray * as_array |
( |
) const; |
| RETURNS | DESCRIPTION |
const StructuredArray * |
|
method as_bodyconst
DEFINITION
|
const StructuredBody * as_body |
( |
) const; |
| RETURNS | DESCRIPTION |
const StructuredBody * |
|
method as_dictionaryconst
DEFINITION
|
const StructuredDictionary * as_dictionary |
( |
) const; |
| RETURNS | DESCRIPTION |
const StructuredDictionary * |
|
method as_scalarconst
DEFINITION
|
const StructuredScalar * as_scalar |
( |
) const; |
| RETURNS | DESCRIPTION |
const StructuredScalar * |
|
method as_singular_scalarconst
DEFINITION
|
const StructuredScalar * as_singular_scalar |
( |
) const; |
| RETURNS | DESCRIPTION |
const StructuredScalar * |
|
method initializestatic
DEFINITION
|
static void initialize |
( |
); |
method is_dictionaryconst
DEFINITION
|
bool is_dictionary |
( |
) const; |
method is_scalarconst
DEFINITION
|
bool is_scalar |
( |
) const; |
method is_singular_scalarconst
DEFINITION
|
bool is_singular_scalar |
( |
) const; |
method parsestatic
DEFINITION
|
static std::shared_ptr< StructuredValue > parse |
( |
Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
| RETURNS | DESCRIPTION |
std::shared_ptr< StructuredValue > |
|
method setupstatic
DEFINITION
|
static void setup |
( |
FileTokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
method typeconstvirtual
DEFINITION
|
virtual Type type |
( |
) const | = 0; |
member initializedstatic
DEFINITION
static bool initialized;
member location
DEFINITION
Location location;
member start_groupstatic
DEFINITION
static TokenGroup start_group;