Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_value_meta_values_list.c
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Adaptive Framework List Implementation for Meta Values of a List
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
14 #include "afw_internal.h"
15 
16 
17 
18 #define impl_afw_list_get_entry_meta afw_list_impl_get_entry_meta
19 #define impl_afw_list_get_next_entry_meta afw_list_impl_get_next_entry_meta
20 
21 /* Declares and rti/inf defines for interface afw_list */
22 #define AFW_IMPLEMENTATION_ID "afw_value_meta_values_list"
23 #include "afw_list_impl_declares.h"
24 
25 
26 /* FIXME
27  *
28  * Remove myimplname_create() if you do not need.
29  *
30  * You will probably want one or more create instance functions. Here is a
31  * skeleton. You will probably want its corresponding AFW_DECLARE() in your
32  * implementation header. For example:
33  *
34  * AFW_DECLARE(const afw_list_t *) myimplname_create(
35  * const afw_object_t *parameters, afw_xctx_t *xctx)
36  *
37  */
38 AFW_DEFINE(const afw_list_t *) myimplname_create(
39  const afw_object_t *parameters, afw_xctx_t *xctx)
40 {
42 
43  /*
44  * You may want to create a new pool for instance, but will just use
45  * xctx's pool in this example.
46  */
48  self->pub.inf = &impl_afw_list_inf;
49 
50  /* Finish processing parameters and initializing new instance. */
51 
52  /* Return new instance. */
53  return (afw_list_t *)self;
54 }
55 
56 
57 /*
58  * Implementation of method release for interface afw_list.
59  */
60 void
62  const afw_list_t *instance,
63  afw_xctx_t *xctx)
64 {
66  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
67 
68 }
69 
70 /*
71  * Implementation of method get_count for interface afw_list.
72  */
75  const afw_list_t *instance,
76  afw_xctx_t *xctx)
77 {
79  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
80 
81 }
82 
83 /*
84  * Implementation of method get_data_type for interface afw_list.
85  */
86 const afw_data_type_t *
88  const afw_list_t *instance,
89  afw_xctx_t *xctx)
90 {
92  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
93 
94 }
95 
96 /*
97  * Implementation of method get_entry_internal for interface afw_list.
98  */
101  const afw_list_t *instance,
102  afw_integer_t index,
103  const afw_data_type_t **data_type,
104  const void **internal,
105  afw_xctx_t *xctx)
106 {
108  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
109 
110 }
111 
112 /*
113  * Implementation of method get_entry_value for interface afw_list.
114  */
115 const afw_value_t *
117  const afw_list_t *instance,
118  afw_integer_t index,
119  const afw_pool_t *p,
120  afw_xctx_t *xctx)
121 {
123  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
124 
125 }
126 
127 /*
128  * Implementation of method get_next_internal for interface afw_list.
129  */
132  const afw_list_t *instance,
133  const afw_iterator_t **iterator,
134  const afw_data_type_t **data_type,
135  const void **internal,
136  afw_xctx_t *xctx)
137 {
139  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
140 
141 }
142 
143 /*
144  * Implementation of method get_next_value for interface afw_list.
145  */
146 const afw_value_t *
148  const afw_list_t *instance,
149  const afw_iterator_t **iterator,
150  const afw_pool_t *p,
151  afw_xctx_t *xctx)
152 {
154  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
155 
156 }
157 
158 /*
159  * Implementation of method get_setter for interface afw_list.
160  */
161 const afw_list_setter_t *
163  const afw_list_t *instance,
164  afw_xctx_t *xctx)
165 {
167  AFW_THROW_ERROR_Z(general, "Method not implemented.", xctx);
168 
169 }
170 
171 
173 afw_value_meta_values_list_for_list_create(
174  const afw_value_t *value,
175  const afw_pool_t *p,
176  afw_xctx_t *xctx)
177 {
179 
181  self->pub.inf = &impl_afw_list_inf;
182  self->p = p;
183  AFW_VALUE_ASSERT_IS_DATA_TYPE(value, list, xctx);
184  self->value = (const afw_value_list_t *)value;
185 
186  return afw_value_create_list((const afw_list_t *)self, p, xctx);
187 }
AFW_DEFINE(const afw_object_t *)
#define AFW_DEFINE_INTERNAL(type)
Define an internal function for /src/afw/ source*.c files.
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
afw_value_create_list(const afw_list_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type list value.
struct afw_iterator_s afw_iterator_t
_Bool afw_boolean_t
Definition: afw_common.h:373
apr_size_t afw_size_t
size_t.
Definition: afw_common.h:151
apr_int64_t afw_integer_t
typedef for big signed int.
Definition: afw_common.h:321
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
Definition: afw_error.h:283
const afw_value_t * impl_afw_list_get_next_value(const afw_list_t *instance, const afw_iterator_t **iterator, const afw_pool_t *p, afw_xctx_t *xctx)
afw_boolean_t impl_afw_list_get_entry_internal(const afw_list_t *instance, afw_integer_t index, const afw_data_type_t **data_type, const void **internal, afw_xctx_t *xctx)
const afw_data_type_t * impl_afw_list_get_data_type(const afw_list_t *instance, afw_xctx_t *xctx)
void impl_afw_list_release(const afw_list_t *instance, afw_xctx_t *xctx)
afw_boolean_t impl_afw_list_get_next_internal(const afw_list_t *instance, const afw_iterator_t **iterator, const afw_data_type_t **data_type, const void **internal, afw_xctx_t *xctx)
const afw_list_setter_t * impl_afw_list_get_setter(const afw_list_t *instance, afw_xctx_t *xctx)
afw_size_t impl_afw_list_get_count(const afw_list_t *instance, afw_xctx_t *xctx)
const afw_value_t * impl_afw_list_get_entry_value(const afw_list_t *instance, afw_integer_t index, const afw_pool_t *p, afw_xctx_t *xctx)
#define AFW_VALUE_ASSERT_IS_DATA_TYPE(A_VALUE, A_DATA_TYPE, A_SCOPE)
Throw and error if A_VALUE is not evaluated data type A_DATA_TYPE.
Definition: afw_value.h:768
#define afw_xctx_calloc_type(type, xctx)
Macro to allocate cleared memory to hold type in xctx's pool.
Definition: afw_xctx.h:199
Interface afw_data_type public struct.
Interface afw_list public struct.
Interface afw_list_setter public struct.
Interface afw_object public struct.
Interface afw_pool public struct.
struct for data type list values.
Interface afw_value public struct.
Interface afw_xctx public struct.