Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_object_impl.h
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Interface afw_object implementation helpers.
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
9 #ifndef __AFW_OBJECT_IMPL_H__
10 #define __AFW_OBJECT_IMPL_H__
11 
12 #include "afw_interface.h"
13 
27 
28 
30  afw_object_t pub;
31  afw_object_setter_t setter;
32  const afw_object_t *owning_object;
33  afw_value_object_t meta_object_value;
34  const afw_value_t *property_value;
35  const afw_utf8_t *property_name;
36  const afw_object_t *property_type_object;
37  afw_boolean_t is_immutable;
39 
40 
41 typedef const afw_value_t *(*afw_object_impl_special_get_t) (
43  const afw_utf8_t *property_name,
44  afw_xctx_t *xctx);
45 
46 typedef void (*afw_object_impl_special_set_t) (
48  const afw_utf8_t *property_name,
49  const afw_value_t *value,
50  afw_xctx_t *xctx);
51 
52 typedef struct {
53  const afw_utf8_t *property_name;
54  afw_object_impl_special_get_t get;
55  afw_object_impl_special_set_t set;
57 
58 
59 
60 #define AFW_OBJECT_IMPL_ASSERT_SELF_MUTABLE \
61 do { \
62  if (self->immutable) { \
63  AFW_OBJECT_ERROR_OBJECT_IMMUTABLE; \
64  } \
65 } while (0)
66 
76 AFW_DECLARE(const afw_utf8_t * const *)
78  const afw_object_t * const *parents, afw_xctx_t *xctx);
79 
80 
81 
97  const afw_object_t *instance,
98  const afw_pool_t *p,
99  afw_xctx_t *xctx);
100 
101 
102 
103 
127 AFW_DECLARE(const afw_value_t *)
129  const afw_object_t *instance,
130  const afw_pool_t *p,
131  afw_xctx_t *xctx);
132 
133 
150  const afw_object_t *instance,
151  const afw_utf8_t *property_name,
152  const afw_pool_t *p,
153  afw_xctx_t *xctx);
154 
155 
156 
182 AFW_DECLARE(const afw_value_t *)
184  const afw_object_t *instance,
185  const afw_utf8_t *property_name,
186  const afw_pool_t *p,
187  afw_xctx_t *xctx);
188 
189 
190 
209  const afw_object_t *instance,
210  const afw_iterator_t **iterator,
211  const afw_utf8_t **property_name,
212  const afw_pool_t *p,
213  afw_xctx_t *xctx);
214 
215 
243 AFW_DECLARE(const afw_value_t *)
245  const afw_object_t *instance,
246  const afw_iterator_t **iterator,
247  const afw_utf8_t **property_name,
248  const afw_pool_t *p,
249  afw_xctx_t *xctx);
250 
251 
252 AFW_END_DECLARES
253 
256 #endif /* __AFW_OBJECT_IMPL_H__ */
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE_INTERNAL(type)
Declare an internal function for /src/afw/ source*.h files.
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
struct afw_iterator_s afw_iterator_t
_Bool afw_boolean_t
Definition: afw_common.h:373
const afw_value_t * afw_object_impl_get_property_meta(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_property_meta for interface afw_object that can be accessed externally.
afw_object_impl_internal_get_meta(const afw_object_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_meta for interface afw_object.
const afw_value_t * afw_object_impl_get_meta(const afw_object_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_meta for interface afw_object that can be accessed externally.
afw_object_impl_internal_get_property_meta(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_property_meta for interface afw_object.
const afw_utf8_t *const * afw_object_impl_get_parent_paths_from_parents(const afw_object_t *const *parents, afw_xctx_t *xctx)
Get list of parent paths from list of parents.
const afw_value_t * afw_object_impl_get_next_property_meta(const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_next_property_meta for interface afw_object that can be accessed externa...
afw_object_impl_internal_get_next_property_meta(const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_next_property_meta for interface afw_object.
Interface afw_object public struct.
Interface afw_object_setter public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
struct for data type object values.
Interface afw_value public struct.
Interface afw_xctx public struct.