tetengo 1.8.1
A multipurpose library set
|
An element. More...
#include <stddef.h>
Go to the source code of this file.
Classes | |
struct | tetengo_json_element_type_tag |
struct | tetengo_json_element_attributeKeyValue_tag |
struct | tetengo_json_fileLocation_tag |
Typedefs | |
typedef struct tetengo_json_element_type_tag | tetengo_json_element_type_t |
typedef struct tetengo_json_element_attributeKeyValue_tag | tetengo_json_element_attributeKeyValue_t |
typedef struct tetengo_json_fileLocation_tag | tetengo_json_fileLocation_t |
Functions | |
int | tetengo_json_element_typeName_string () |
Returns the type name of string. | |
int | tetengo_json_element_typeName_number () |
Returns the type name of number. | |
int | tetengo_json_element_typeName_boolean () |
Returns the type name of boolean. | |
int | tetengo_json_element_typeName_null () |
Returns the type name of null. | |
int | tetengo_json_element_typeName_object () |
Returns the type name of object. | |
int | tetengo_json_element_typeName_member () |
Returns the type name of member. | |
int | tetengo_json_element_typeName_array () |
Returns the type name of array. | |
int | tetengo_json_element_typeCategory_primitive () |
Returns the type category of primitive. | |
int | tetengo_json_element_typeCategory_structureOpen () |
Returns the type category of opening structure. | |
int | tetengo_json_element_typeCategory_structureClose () |
Returns the type category of closing structure. | |
tetengo_json_element_t * | tetengo_json_element_create (const tetengo_json_element_type_t *p_type, const char *value, const tetengo_json_element_attributeKeyValue_t *p_attributes, size_t attribute_count, const tetengo_json_fileLocation_t *p_file_location) |
Creates an element. | |
tetengo_json_element_t * | tetengo_json_element_copy (const tetengo_json_element_t *p_another) |
Copies an element. | |
void | tetengo_json_element_destroy (const tetengo_json_element_t *p_element) |
Destroys an element. | |
const tetengo_json_element_type_t * | tetengo_json_element_type (const tetengo_json_element_t *p_element) |
Returns the type. | |
const char * | tetengo_json_element_value (const tetengo_json_element_t *p_element) |
Returns the value. | |
size_t | tetengo_json_element_attributeKeys (const tetengo_json_element_t *p_element, const char **p_keys) |
Returns the attribute keys. | |
const char * | tetengo_json_element_attributeValueOf (const tetengo_json_element_t *p_element, const char *key) |
Returns the attribute value. | |
const tetengo_json_fileLocation_t * | tetengo_json_element_getFileLocation (const tetengo_json_element_t *p_element) |
Returns the file location. | |
An element.
Copyright (C) 2019-2023 kaoru https://www.tetengo.org/
The attribute key-value type.
typedef struct tetengo_json_element_type_tag tetengo_json_element_type_t |
The type type.
typedef struct tetengo_json_fileLocation_tag tetengo_json_fileLocation_t |
The file location type.
size_t tetengo_json_element_attributeKeys | ( | const tetengo_json_element_t * | p_element, |
const char ** | p_keys | ||
) |
Returns the attribute keys.
p_element | A pointer to an element. |
p_keys | The storage for a keys. Can be NULL. |
const char * tetengo_json_element_attributeValueOf | ( | const tetengo_json_element_t * | p_element, |
const char * | key | ||
) |
Returns the attribute value.
p_element | A pointer to an element. |
key | A key. |
tetengo_json_element_t * tetengo_json_element_copy | ( | const tetengo_json_element_t * | p_another | ) |
Copies an element.
p_another | A pointer to another element. |
tetengo_json_element_t * tetengo_json_element_create | ( | const tetengo_json_element_type_t * | p_type, |
const char * | value, | ||
const tetengo_json_element_attributeKeyValue_t * | p_attributes, | ||
size_t | attribute_count, | ||
const tetengo_json_fileLocation_t * | p_file_location | ||
) |
Creates an element.
p_type | A pointer to a type. |
value | A value. |
p_attributes | A pointer to the head of attributes. |
attribute_count | An attribute count. |
p_file_location | A pointer to a file location. |
void tetengo_json_element_destroy | ( | const tetengo_json_element_t * | p_element | ) |
Destroys an element.
p_element | A pointer to an element. |
const tetengo_json_fileLocation_t * tetengo_json_element_getFileLocation | ( | const tetengo_json_element_t * | p_element | ) |
Returns the file location.
p_element | A pointer to an element. |
const tetengo_json_element_type_t * tetengo_json_element_type | ( | const tetengo_json_element_t * | p_element | ) |
Returns the type.
p_element | A pointer to an element. |
int tetengo_json_element_typeCategory_primitive | ( | ) |
Returns the type category of primitive.
int tetengo_json_element_typeCategory_structureClose | ( | ) |
Returns the type category of closing structure.
int tetengo_json_element_typeCategory_structureOpen | ( | ) |
Returns the type category of opening structure.
int tetengo_json_element_typeName_array | ( | ) |
Returns the type name of array.
int tetengo_json_element_typeName_boolean | ( | ) |
Returns the type name of boolean.
int tetengo_json_element_typeName_member | ( | ) |
Returns the type name of member.
int tetengo_json_element_typeName_null | ( | ) |
Returns the type name of null.
int tetengo_json_element_typeName_number | ( | ) |
Returns the type name of number.
int tetengo_json_element_typeName_object | ( | ) |
Returns the type name of object.
int tetengo_json_element_typeName_string | ( | ) |
Returns the type name of string.
const char * tetengo_json_element_value | ( | const tetengo_json_element_t * | p_element | ) |
Returns the value.
p_element | A pointer to an element. |