Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_yaml.h
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Adaptive Framework YAML
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
9 #ifndef __AFW_YAML_H__
10 #define __AFW_YAML_H__
11 
12 #include "afw_minimal.h"
14 
30 
32 #define AFW_ERROR_RV_SOURCE_ID_Z_yaml_parser "yaml_parser"
33 
35 #define AFW_ERROR_RV_SOURCE_ID_Z_yaml_token_type "yaml_token_type"
36 
37 #define AFW_YAML_Q_CONTENT_TYPE "application/x-yaml"
38 #define AFW_YAML_S_CONTENT_TYPE afw_s_a_application_yaml
39 #define AFW_YAML_Q_CONTENT_TYPE_SHORT "yaml"
40 #define AFW_YAML_S_CONTENT_TYPE_SHORT afw_s_yaml
41 
42 
50 void afw_yaml_register(afw_xctx_t *xctx);
51 
58 
69  const afw_value_t *value,
70  const afw_pool_t *p, afw_xctx_t *xctx);
71 
91  const afw_memory_t *yaml,
92  const afw_utf8_t *path,
93  const afw_pool_t *p,
94  afw_xctx_t *xctx);
95 
110  const afw_memory_t * yaml,
111  const afw_utf8_t * source_location,
112  const afw_utf8_t * adaptor_id,
113  const afw_utf8_t * object_type_id,
114  const afw_utf8_t * object_id,
115  afw_boolean_t cede_p,
116  const afw_pool_t * p,
117  afw_xctx_t * xctx);
118 
119 AFW_END_DECLARES
120 
123 #endif /* __AFW_YAML_H__ */
#define AFW_BEGIN_DECLARES
Adaptive Framework Minimal Header.
Adaptive Framework register generated (afw_yaml) header.
_Bool afw_boolean_t
Definition: afw_common.h:373
void afw_yaml_register(afw_xctx_t *xctx)
Register YAML support.
Definition: afw_yaml.c:92
const afw_value_t * afw_yaml_to_value(const afw_memory_t *yaml, const afw_utf8_t *path, const afw_pool_t *p, afw_xctx_t *xctx)
Convert YAML to an adaptive value.
const afw_utf8_t * afw_yaml_from_value(const afw_value_t *value, const afw_pool_t *p, afw_xctx_t *xctx)
Convert an adaptive value to YAML.
const afw_utf8_t * afw_yaml_from_error(afw_xctx_t *xctx)
Convert error from xctx to a YAML object.
Definition: afw_yaml.c:176
const afw_object_t * afw_yaml_to_object(const afw_memory_t *yaml, const afw_utf8_t *source_location, const afw_utf8_t *adaptor_id, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_boolean_t cede_p, const afw_pool_t *p, afw_xctx_t *xctx)
Convert from YAML to adaptive object.
Struct for memory pointer and size.
Definition: afw_common.h:505
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_value public struct.
Interface afw_xctx public struct.