Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_pool_impl_declares.h
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Interface afw_interface Implementation Declares
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
10 
12 
74 #ifdef __AFW_POOL_IMPL_DECLARES_H__
75 #ifndef AFW_POOL_INF_ONLY
76 #error "afw_pool_impl_declares.h already included."
77 #endif
78 #endif
79 #ifndef __AFW_POOL_IMPL_DECLARES_H__
80 #ifdef AFW_POOL_INF_ONLY
81 #error "afw_pool_impl_declares.h must be included before AFW_POOL_INF_ONLY."
82 #endif
83 #define __AFW_POOL_IMPL_DECLARES_H__ 1
84 #endif
85 
86 #ifdef AFW_IMPLEMENTATION_ID
87 #define _AFW_IMPLEMENTATION_ID_ AFW_IMPLEMENTATION_ID
88 #else
89 #define _AFW_IMPLEMENTATION_ID_ "unspecified"
90 #endif
91 #ifdef AFW_IMPLEMENTATION_SPECIFIC
92 #define _AFW_IMPLEMENTATION_SPECIFIC_ AFW_IMPLEMENTATION_SPECIFIC
93 #else
94 #define _AFW_IMPLEMENTATION_SPECIFIC_ NULL
95 #endif
96 #ifndef AFW_POOL_INF_ONLY
97 
98 #ifndef impl_afw_pool_release
99 /* Declare method release */
100 AFW_DECLARE_STATIC(void)
102  const afw_pool_t * instance,
103  afw_xctx_t * xctx);
104 #endif
105 
106 #ifndef impl_afw_pool_add_reference
107 /* Declare method add_reference */
108 AFW_DECLARE_STATIC(void)
109 impl_afw_pool_add_reference(
110  const afw_pool_t * instance,
111  afw_xctx_t * xctx);
112 #endif
113 
114 #ifndef impl_afw_pool_destroy
115 /* Declare method destroy */
116 AFW_DECLARE_STATIC(void)
117 impl_afw_pool_destroy(
118  const afw_pool_t * instance,
119  afw_xctx_t * xctx);
120 #endif
121 
122 #ifndef impl_afw_pool_get_apr_pool
123 /* Declare method get_apr_pool */
124 AFW_DECLARE_STATIC(apr_pool_t *)
126  const afw_pool_t * instance);
127 #endif
128 
129 #ifndef impl_afw_pool_calloc
130 /* Declare method calloc */
131 AFW_DECLARE_STATIC(void *)
132 impl_afw_pool_calloc(
133  const afw_pool_t * instance,
134  afw_size_t size,
135  afw_xctx_t * xctx);
136 #endif
137 
138 #ifndef impl_afw_pool_malloc
139 /* Declare method malloc */
140 AFW_DECLARE_STATIC(void *)
141 impl_afw_pool_malloc(
142  const afw_pool_t * instance,
143  afw_size_t size,
144  afw_xctx_t * xctx);
145 #endif
146 
147 #ifndef impl_afw_pool_free
148 /* Declare method free */
149 AFW_DECLARE_STATIC(void)
151  const afw_pool_t * instance,
152  void * address,
153  afw_size_t size,
154  afw_xctx_t * xctx);
155 #endif
156 
157 #ifndef impl_afw_pool_register_cleanup_before
158 /* Declare method register_cleanup_before */
159 AFW_DECLARE_STATIC(void)
160 impl_afw_pool_register_cleanup_before(
161  const afw_pool_t * instance,
162  void * data,
163  void * data2,
165  afw_xctx_t * xctx);
166 #endif
167 
168 #ifndef impl_afw_pool_deregister_cleanup
169 /* Declare method deregister_cleanup */
170 AFW_DECLARE_STATIC(void)
171 impl_afw_pool_deregister_cleanup(
172  const afw_pool_t * instance,
173  void * data,
174  void * data2,
176  afw_xctx_t * xctx);
177 #endif
178 
179 #ifndef impl_afw_pool_release_debug
180 /* Declare method release_debug */
181 AFW_DECLARE_STATIC(void)
182 impl_afw_pool_release_debug(
183  const afw_pool_t * instance,
184  afw_xctx_t * xctx,
185  const afw_utf8_z_t * source_z);
186 #endif
187 
188 #ifndef impl_afw_pool_add_reference_debug
189 /* Declare method add_reference_debug */
190 AFW_DECLARE_STATIC(void)
191 impl_afw_pool_add_reference_debug(
192  const afw_pool_t * instance,
193  afw_xctx_t * xctx,
194  const afw_utf8_z_t * source_z);
195 #endif
196 
197 #ifndef impl_afw_pool_destroy_debug
198 /* Declare method destroy_debug */
199 AFW_DECLARE_STATIC(void)
200 impl_afw_pool_destroy_debug(
201  const afw_pool_t * instance,
202  afw_xctx_t * xctx,
203  const afw_utf8_z_t * source_z);
204 #endif
205 
206 #ifndef impl_afw_pool_calloc_debug
207 /* Declare method calloc_debug */
208 AFW_DECLARE_STATIC(void *)
209 impl_afw_pool_calloc_debug(
210  const afw_pool_t * instance,
211  afw_size_t size,
212  afw_xctx_t * xctx,
213  const afw_utf8_z_t * source_z);
214 #endif
215 
216 #ifndef impl_afw_pool_malloc_debug
217 /* Declare method malloc_debug */
218 AFW_DECLARE_STATIC(void *)
219 impl_afw_pool_malloc_debug(
220  const afw_pool_t * instance,
221  afw_size_t size,
222  afw_xctx_t * xctx,
223  const afw_utf8_z_t * source_z);
224 #endif
225 
226 #ifndef impl_afw_pool_free_debug
227 /* Declare method free_debug */
228 AFW_DECLARE_STATIC(void)
229 impl_afw_pool_free_debug(
230  const afw_pool_t * instance,
231  void * address,
232  afw_size_t size,
233  afw_xctx_t * xctx,
234  const afw_utf8_z_t * source_z);
235 #endif
236 
237 #ifndef impl_afw_pool_register_cleanup_before_debug
238 /* Declare method register_cleanup_before_debug */
239 AFW_DECLARE_STATIC(void)
240 impl_afw_pool_register_cleanup_before_debug(
241  const afw_pool_t * instance,
242  void * data,
243  void * data2,
245  afw_xctx_t * xctx,
246  const afw_utf8_z_t * source_z);
247 #endif
248 
249 #ifndef impl_afw_pool_deregister_cleanup_debug
250 /* Declare method deregister_cleanup_debug */
251 AFW_DECLARE_STATIC(void)
252 impl_afw_pool_deregister_cleanup_debug(
253  const afw_pool_t * instance,
254  void * data,
255  void * data2,
257  afw_xctx_t * xctx,
258  const afw_utf8_z_t * source_z);
259 #endif
260 #endif
261 
262 /* inf for interface afw_pool */
263 #ifdef __BASE_FILE__
264 #define _AFW_IMPLEMENTATION_SOURCE_FILE_ __BASE_FILE__
265 #else
266 #define _AFW_IMPLEMENTATION_SOURCE_FILE_ __FILE__
267 #endif
268 #ifdef AFW_IMPLEMENTATION_INF_SPECIFIER
269 AFW_IMPLEMENTATION_INF_SPECIFIER(afw_pool_inf_t)
270 #else
271 static const afw_pool_inf_t
272 #endif
273 #ifdef AFW_IMPLEMENTATION_INF_LABEL
274 AFW_IMPLEMENTATION_INF_LABEL = {
275 #else
276 impl_afw_pool_inf = {
277 #endif
278  {
279  AFW_UTF8_LITERAL("afw_pool"),
280  AFW_UTF8_LITERAL(_AFW_IMPLEMENTATION_SOURCE_FILE_),
281  AFW_UTF8_LITERAL(_AFW_IMPLEMENTATION_ID_),
282  _AFW_IMPLEMENTATION_SPECIFIC_
283  },
285  impl_afw_pool_add_reference,
286  impl_afw_pool_destroy,
288  impl_afw_pool_calloc,
289  impl_afw_pool_malloc,
291  impl_afw_pool_register_cleanup_before,
292  impl_afw_pool_deregister_cleanup,
293  impl_afw_pool_release_debug,
294  impl_afw_pool_add_reference_debug,
295  impl_afw_pool_destroy_debug,
296  impl_afw_pool_calloc_debug,
297  impl_afw_pool_malloc_debug,
298  impl_afw_pool_free_debug,
299  impl_afw_pool_register_cleanup_before_debug,
300  impl_afw_pool_deregister_cleanup_debug
301 };
302 
303 #undef _AFW_IMPLEMENTATION_ID_
304 #undef _AFW_IMPLEMENTATION_SPECIFIC_
305 #undef _AFW_IMPLEMENTATION_SOURCE_FILE_
306 
#define AFW_BEGIN_DECLARES
Interface afw_interface opaque typedefs.
#define AFW_UTF8_LITERAL(A_STRING)
String literal initializer.
Definition: afw_common.h:582
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
Definition: afw_common.h:523
apr_size_t afw_size_t
size_t.
Definition: afw_common.h:151
void(* afw_pool_cleanup_function_p_t)(void *data, void *data2, const afw_pool_t *p, afw_xctx_t *xctx)
Typedef for pool cleanup functions.
Definition: afw_common.h:954
impl_afw_pool_release(const afw_pool_t *instance, afw_xctx_t *xctx)
impl_afw_pool_free(const afw_pool_t *instance, void *address, afw_size_t size, afw_xctx_t *xctx)
impl_afw_pool_get_apr_pool(const afw_pool_t *instance)
Interface afw_pool_inf_s struct.
Interface afw_pool public struct.
Interface afw_xctx public struct.