An element.
More...
#include <element.hpp>
◆ type_category_type
The type category type.
Enumerator |
---|
primitive | A primitive.
|
structure_open | An opening structure.
|
structure_close | A closing structure.
|
◆ type_name_type
The type name type.
Enumerator |
---|
string | A string. primitive.
|
number | A number. primitive.
|
boolean | A boolean. primitive.
|
null | A null. primitive.
|
object | An object. structure.
|
member | A member. structure.
|
array | An array. structure.
|
◆ element()
tetengo::json::element::element |
( |
type_type |
type, |
|
|
std::string |
value, |
|
|
std::unordered_map< std::string, std::string > |
attributes, |
|
|
file_location |
file_location_ |
|
) |
| |
Creates an element.
- Parameters
-
type | A type. |
value | A value. |
attributes | Attributes. |
file_location_ | A file location. |
- Exceptions
-
std::invalid_argument | When the arguments are mismatched. |
◆ attributes()
const std::unordered_map< std::string, std::string > & tetengo::json::element::attributes |
( |
| ) |
const |
Returns the attributes.
- Returns
- The attributes.
◆ get_file_location()
const file_location & tetengo::json::element::get_file_location |
( |
| ) |
const |
Returns the file location.
- Returns
- The file location.
◆ type()
const type_type & tetengo::json::element::type |
( |
| ) |
const |
Returns the type.
- Returns
- The type.
◆ value()
const std::string & tetengo::json::element::value |
( |
| ) |
const |
Returns the value.
- Returns
- The value.
The documentation for this class was generated from the following file: