tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
element.h
Go to the documentation of this file.
1
7#if !defined(TETENGO_JSON_ELEMENT_H)
8#define TETENGO_JSON_ELEMENT_H
9
10#include <stddef.h>
11
12
13#if defined(__cplusplus)
14extern "C" {
15#endif
16
17#if !defined(DOCUMENTATION)
18typedef struct tetengo_json_element_tag tetengo_json_element_t;
19#endif
20
21
28
35
42
49
56
63
70
77
84
91
101
111
124
136tetengo_json_element_t* tetengo_json_element_create(
137 const tetengo_json_element_type_t* p_type,
138 const char* value,
140 size_t attribute_count,
141 const tetengo_json_fileLocation_t* p_file_location);
142
150tetengo_json_element_t* tetengo_json_element_copy(const tetengo_json_element_t* p_another);
151
157void tetengo_json_element_destroy(const tetengo_json_element_t* p_element);
158
166const tetengo_json_element_type_t* tetengo_json_element_type(const tetengo_json_element_t* p_element);
167
175const char* tetengo_json_element_value(const tetengo_json_element_t* p_element);
176
185size_t tetengo_json_element_attributeKeys(const tetengo_json_element_t* p_element, const char** p_keys);
186
195const char* tetengo_json_element_attributeValueOf(const tetengo_json_element_t* p_element, const char* key);
196
204const tetengo_json_fileLocation_t* tetengo_json_element_getFileLocation(const tetengo_json_element_t* p_element);
205
206
207#if defined(__cplusplus)
208}
209#endif
210
211
212#endif
int tetengo_json_element_typeName_object()
Returns the type name of object.
int tetengo_json_element_typeName_member()
Returns the type name of member.
const char * tetengo_json_element_value(const tetengo_json_element_t *p_element)
Returns the value.
void tetengo_json_element_destroy(const tetengo_json_element_t *p_element)
Destroys an element.
int tetengo_json_element_typeName_array()
Returns the type name of array.
int tetengo_json_element_typeCategory_primitive()
Returns the type category of primitive.
struct tetengo_json_element_attributeKeyValue_tag tetengo_json_element_attributeKeyValue_t
tetengo_json_element_t * tetengo_json_element_copy(const tetengo_json_element_t *p_another)
Copies an element.
int tetengo_json_element_typeName_number()
Returns the type name of number.
int tetengo_json_element_typeName_boolean()
Returns the type name of boolean.
size_t tetengo_json_element_attributeKeys(const tetengo_json_element_t *p_element, const char **p_keys)
Returns the attribute keys.
const tetengo_json_fileLocation_t * tetengo_json_element_getFileLocation(const tetengo_json_element_t *p_element)
Returns the file location.
struct tetengo_json_element_type_tag tetengo_json_element_type_t
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.
const char * tetengo_json_element_attributeValueOf(const tetengo_json_element_t *p_element, const char *key)
Returns the attribute value.
const tetengo_json_element_type_t * tetengo_json_element_type(const tetengo_json_element_t *p_element)
Returns the type.
struct tetengo_json_fileLocation_tag tetengo_json_fileLocation_t
int tetengo_json_element_typeCategory_structureOpen()
Returns the type category of opening structure.
int tetengo_json_element_typeName_null()
Returns the type name of null.
int tetengo_json_element_typeCategory_structureClose()
Returns the type category of closing structure.
int tetengo_json_element_typeName_string()
Returns the type name of string.
const char * key
Definition element.h:106
const char * value
Definition element.h:109
Definition element.h:94
int category
Definition element.h:99
int name
Definition element.h:96
Definition element.h:114
size_t column_index
Definition element.h:122
const char * line
Definition element.h:116
size_t line_index
Definition element.h:119