![]() |
Open Lighting Architecture 0.10.9
|
Classes to deal with web services.
Classes | |
| class | AllOfValidator |
| A validator which ensures all child validators pass (allOf). More... | |
| class | AnyOfValidator |
| A validator which ensures at least one of the child validators pass (anyOf). More... | |
| class | ArrayOfJsonValuesContext |
| The context for an array of JsonValues. More... | |
| class | ArrayOfSchemaContext |
| Parse the array of objects in an 'items' property. More... | |
| class | ArrayOfStringsContext |
| The context for an array of strings. More... | |
| class | ArrayValidator |
| The validator for JsonArray. More... | |
| class | auto_ptr |
| STL class. More... | |
| class | BaseValidator |
| The base class for Json BaseValidators. All Visit methods return false. More... | |
| class | BoolItem |
| class | BoolValidator |
| The validator for JsonBool. More... | |
| class | ConjunctionValidator |
| The base class for validators that operate with a list of child validators (allOf, anyOf, oneOf). More... | |
| class | DefinitionsParseContext |
| The context for schema definitions. More... | |
| class | DependencyParseContext |
| The context for a dependency object. More... | |
| class | GenericItem |
| class | HiddenItem |
| class | IntegerValidator |
| The validator for Json integers. More... | |
| class | JsonArray |
| An array of JSON values. Arrays in JSON can contain values of different types. More... | |
| class | JsonBool |
| A Bool value. More... | |
| class | JsonData |
| Represents a JSON text as defined in section 2 of RFC7158. More... | |
| class | JsonDouble |
| A double value. More... | |
| class | JsonInt |
| A signed 32bit int value. More... | |
| class | JsonInt64 |
| A signed 64bit int value. More... | |
| class | JsonLeafValue |
| A base class used to describe values which are leafs of a JSON tree. More... | |
| class | JsonLexer |
| Parse a string containing Json data. More... | |
| class | JsonNull |
| The null value. More... | |
| class | JsonNumber |
| JsonNumber is the base class for various integer / number classes. More... | |
| class | JsonObject |
| A JSON object. JSON Objects are key : value mappings, similar to dictionaries in Python. More... | |
| class | JsonObjectPropertyVisitor |
| A class used to visit Json values within a JsonObject. More... | |
| class | JsonParser |
| A JsonParserInterface implementation that builds a tree of JsonValues. More... | |
| class | JsonParserInterface |
| The interface used to handle tokens during JSON parsing. More... | |
| class | JsonPatchAddOp |
| Add a JsonValue. More... | |
| class | JsonPatchCopyOp |
| Copy a value from one location to another. More... | |
| class | JsonPatchMoveOp |
| Move a value from one location to another. More... | |
| class | JsonPatchOp |
| A class to serialize a JSONValue to text. More... | |
| class | JsonPatchParser |
| Parse a JSON Patch document (RFC 6902). More... | |
| class | JsonPatchRemoveOp |
| Remove the value at the specified path. More... | |
| class | JsonPatchReplaceOp |
| Replace the value at the specified path. More... | |
| class | JsonPatchSet |
| An ordered collection of JsonPatchOps. More... | |
| class | JsonPatchTestOp |
| Test a path matches the specified value. More... | |
| class | JsonPointer |
| A JSON pointer (RFC 6901) refers to a possible element in a JSON data structure. More... | |
| class | JsonRawValue |
| A raw value, useful if you want to cheat. More... | |
| class | JsonSchema |
| A JsonHandlerInterface implementation that builds a parse tree. More... | |
| class | JsonSection |
| class | JsonString |
| A string value. More... | |
| class | JsonUInt |
| An unsigned 32bit int value. More... | |
| class | JsonUInt64 |
| An unsigned 64bit int value. More... | |
| class | JsonValue |
| The base class for JSON values. More... | |
| class | JsonValueConstVisitorInterface |
| The const interface for the JsonValueVisitor class. More... | |
| class | JsonValueContext |
| The context for a default value. More... | |
| class | JsonValueVisitorInterface |
| The interface for the JsonValueVisitor class. More... | |
| class | JsonWriter |
| A class to serialize a JSONValue to text. More... | |
| class | MaximumConstraint |
| Enforces a maximum. More... | |
| class | MinimumConstraint |
| Enforces a minimum. More... | |
| class | MultipleOfConstraint |
| Confirms the valid is a multiple of the specified value. More... | |
| class | NotValidator |
| A validator that inverts the result of the child (not). More... | |
| class | NullValidator |
| The validator for JsonNull. More... | |
| class | NumberConstraint |
| The base class for constraints that can be applies to the Json number type. More... | |
| class | NumberValidator |
| The validator for Json numbers. More... | |
| class | ObjectParseContext |
| A SchemaParseContext that keeps track of the last keyword / property seen. More... | |
| class | ObjectValidator |
| The validator for JsonObject. More... | |
| class | OneOfValidator |
| A validator which ensures at only one of the child validators pass (oneOf). More... | |
| class | OptionalItem |
| class | ostream |
| STL class. More... | |
| class | ostringstream |
| STL class. More... | |
| class | pair |
| STL class. More... | |
| class | PointerTracker |
| Maintains a Json Pointer (RFC 6901) given a set of Json parse events. More... | |
| class | PropertiesParseContext |
| class | ReferenceValidator |
| A reference validator holds a pointer to another schema. More... | |
| class | SchemaDefinitions |
| class | SchemaErrorLogger |
| The SchemaErrorLogger captures errors while parsing the schema. More... | |
| class | SchemaParseContext |
| class | SchemaParseContextInterface |
| The interface all SchemaParseContext classes inherit from. More... | |
| class | SchemaParser |
| Build the tree of validators and a SchemaDefinitions object from a JSON Schema. More... | |
| class | SelectItem |
| class | set |
| STL class. More... | |
| class | StrictTypedParseContext |
| A SchemaParseContext that reports errors for all types. More... | |
| class | string |
| STL class. More... | |
| class | StringItem |
| class | StringValidator |
| The validator for JsonString. More... | |
| class | UIntItem |
| class | ValidatorInterface |
| The interface Json Schema Validators. More... | |
| class | vector |
| STL class. More... | |
| class | WildcardValidator |
| The wildcard validator matches everything. This corresponds to the empty schema, i.e. {}. More... | |
Enumerations | |
| enum | SchemaKeyword { SCHEMA_UNKNOWN , SCHEMA_ID , SCHEMA_SCHEMA , SCHEMA_REF , SCHEMA_TITLE , SCHEMA_DESCRIPTION , SCHEMA_DEFAULT , SCHEMA_FORMAT , SCHEMA_MULTIPLEOF , SCHEMA_MAXIMUM , SCHEMA_EXCLUSIVE_MAXIMUM , SCHEMA_MINIMUM , SCHEMA_EXCLUSIVE_MINIMUM , SCHEMA_MAX_LENGTH , SCHEMA_MIN_LENGTH , SCHEMA_PATTERN , SCHEMA_ADDITIONAL_ITEMS , SCHEMA_ITEMS , SCHEMA_MAX_ITEMS , SCHEMA_MIN_ITEMS , SCHEMA_UNIQUE_ITEMS , SCHEMA_MAX_PROPERTIES , SCHEMA_MIN_PROPERTIES , SCHEMA_REQUIRED , SCHEMA_ADDITIONAL_PROPERTIES , SCHEMA_DEFINITIONS , SCHEMA_PROPERTIES , SCHEMA_PATTERN_PROPERTIES , SCHEMA_DEPENDENCIES , SCHEMA_ENUM , SCHEMA_TYPE , SCHEMA_ALL_OF , SCHEMA_ANY_OF , SCHEMA_ONE_OF , SCHEMA_NOT } |
| The list of valid JSon Schema keywords. More... | |
| enum | JsonType { JSON_ARRAY , JSON_BOOLEAN , JSON_INTEGER , JSON_NULL , JSON_NUMBER , JSON_OBJECT , JSON_STRING , JSON_UNDEFINED } |
| The type of JSON data element. More... | |
Functions | |
| JsonObject * | ObjectCast (JsonValue *value) |
| Downcast a JsonValue to a JsonObject. | |
| JsonArray * | ArrayCast (JsonValue *value) |
| Downcast a JsonValue to a JsonArray. | |
| std::ostream & | operator<< (std::ostream &os, const JsonString &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonUInt &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonInt &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonUInt64 &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonInt64 &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonDouble &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonBool &value) |
| std::ostream & | operator<< (std::ostream &os, const JsonNull &) |
| std::ostream & | operator<< (std::ostream &os, const JsonRawValue &value) |
| static bool | ParseTrimmedInput (const char **input, JsonParserInterface *parser) |
| static bool | TrimWhitespace (const char **input) |
| Trim leading whitespace from a string. | |
| static bool | ParseString (const char **input, string *str, JsonParserInterface *parser) |
| Extract a string token from the input. | |
| bool | ExtractDigits (const char **input, uint64_t *i, unsigned int *leading_zeros=NULL) |
| static bool | ParseNumber (const char **input, JsonParserInterface *parser) |
| static bool | ParseArray (const char **input, JsonParserInterface *parser) |
| static bool | ParseObject (const char **input, JsonParserInterface *parser) |
| bool | ParseRaw (const char *input, JsonParserInterface *parser) |
| string | JsonTypeToString (JsonType type) |
| Get the string corresponding to a JsonType. | |
| JsonType | StringToJsonType (const std::string &type) |
| Convert a string to a JsonType. | |
| string | KeywordToString (SchemaKeyword keyword) |
| SchemaKeyword | LookupKeyword (const std::string &keyword) |
| Map a string to a SchemaKeyword. | |
| template<> | |
| JsonNumber * | JsonValue::NewNumberValue< JsonDouble::DoubleRepresentation > (const JsonDouble::DoubleRepresentation &value) |
| template<> | |
| JsonValue * | JsonValue::NewValue< std::string > (const std::string &value) |
| template<> | |
| JsonValue * | JsonValue::NewValue< JsonDouble::DoubleRepresentation > (const JsonDouble::DoubleRepresentation &value) |
| template<typename T> | |
| JsonType | TypeFromValue (const T &) |
| Given a value, return the JsonType this value corresponds to. | |
| template<typename T> | |
| std::string | GetTypename (const T &t) |
| Given a value, return the string name this value corresponds to. | |
| template<> | |
| JsonType | TypeFromValue< std::string > (const std::string &) |
| template<> | |
| JsonType | TypeFromValue< bool > (const bool &) |
| template<> | |
| JsonType | TypeFromValue< uint32_t > (const uint32_t &) |
| template<> | |
| JsonType | TypeFromValue< int32_t > (const int32_t &) |
| template<> | |
| JsonType | TypeFromValue< uint64_t > (const uint64_t &) |
| template<> | |
| JsonType | TypeFromValue< int64_t > (const int64_t &) |
| template<> | |
| JsonType | TypeFromValue< double > (const double &) |
| string | EscapeString (const std::string &original) |
| Escape a string, returning a copy. | |
| enum ola::web::JsonType |
| std::string ola::EscapeString | ( | const string & | original | ) |
Escape a string, returning a copy.
| original | the string to escape. |
| std::string ola::web::JsonTypeToString | ( | JsonType | type | ) |
Get the string corresponding to a JsonType.
e.g. TypeToString(JSON_STRING) returns "string".
| std::string ola::web::KeywordToString | ( | SchemaKeyword | keyword | ) |
Return the string used by the SchemaKeyword.
| SchemaKeyword ola::web::LookupKeyword | ( | const std::string & | keyword | ) |
Map a string to a SchemaKeyword.
|
static |
Starts from the first character after the '['.
|
static |
Parse a JsonNumber
|
static |
Starts from the first character after the '{'.
|
static |
Extract a string token from the input.
| input | A pointer to a pointer with the data. This should point to the first character after the quote (") character. |
| str | A string object to store the extracted string. |
| parser | the JsonParserInterface to pass tokens to. |
| JsonType ola::web::StringToJsonType | ( | const std::string & | type | ) |
|
static |
Trim leading whitespace from a string.
| input | A pointer to a pointer with the data. This is updated to point to the first non-whitespace character. |