Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_object_internal.h
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Adaptive Framework Object Internal Header
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
9 #ifndef __AFW_OBJECT_INTERNAL_H__
10 #define __AFW_OBJECT_INTERNAL_H__
11 
12 #include "afw_interface.h"
13 #include <apr_ring.h>
14 #include <apr_hash.h>
15 
31 
34 
40 
41 
47  const afw_utf8_t *name;
48  const afw_value_t *value;
49 };
50 
51 
53  afw_object_t pub;
54  afw_object_setter_t setter;
55 
56  /*
57  * Implementation supports both property list and property hash table.
58  * See boolean use_properties_ht to determine which is being used.
59  */
60  union {
62  apr_hash_t *properties_ht;
63  };
64 
65  afw_boolean_t immutable;
66  afw_boolean_t clone_on_set;
67  afw_boolean_t unmanaged;
68  afw_boolean_t managed_by_entity;
69 
70  /* Reference_count starting at 1 on create. */
71  AFW_ATOMIC afw_integer_t reference_count;
72 };
73 
74 
75 
76 /* Self for meta accessor object. */
77 typedef struct {
78  afw_object_t pub;
79 
80  /* Mutable object or NULL if always immutable. */
81  const afw_object_t *mutable;
82 
83  /* The objects to search. */
84  const afw_object_t * *objects;
85 
86  /* Address of end of objects array. */
87  const afw_object_t * *end;
88 
89  /* Object is immutable. */
90  afw_boolean_t immutable;
91 
93 
94 
95 
96 /* Self for meta accessor object. */
97 typedef struct {
98  afw_object_t pub;
99  afw_object_setter_t setter;
100 
101  /* Passed on create. */
102  void *data;
103 
104  /* Array of callback entries. */
106 
107  /* Address of end of callback entries. */
109 
110  /* Object is immutable. */
111  afw_boolean_t immutable;
112 
114 
115 
116 
117 /* Self for meta accessor object. */
118 typedef struct {
119  afw_object_t pub;
120 
121  /* Private implementation variables */
122  const afw_object_t *instance;
123  const afw_object_options_t *options;
124  const afw_iterator_t *iterator;
125  afw_boolean_t embedded;
126  afw_boolean_t limited_meta;
127 
129 
130 
131 /* Self for meta properties object. */
132 typedef struct {
133  afw_object_t pub;
134 
136 
137 
138 /* Self for meta property object. */
139 typedef struct {
140  afw_object_t pub;
141 
143 
144 
145 /* Self for meta propertyType object. */
146 typedef struct {
147  afw_object_t pub;
148 
150 
151 
152 /* Self for meta propertyTypes object. */
153 typedef struct {
154  afw_object_t pub;
155 
157 
158 
159 /* Self typedef "const for key value string" entry. */
160 typedef struct
162  afw_utf8_t key;
163  afw_value_string_t value;
165 
166 
167 /* Self typedef "const for key value string" implementation of afw_object. */
168 typedef struct
170  afw_object_t pub;
171 
172  afw_size_t entry_count;
175 
177 
178 
179 /* Self typedef for afw_object_aggregate_external object implementation. */
180 typedef struct
182  afw_object_t pub;
183  const afw_object_t * const *object_list;
184  struct {
185  const afw_object_t * const *object;
186  const afw_iterator_t *iterator;
187  } iterator;
189 
190 AFW_END_DECLARES
191 
194 #endif /* __AFW_OBJECT_INTERNAL_H__ */
#define AFW_BEGIN_DECLARES
Interfaceafw_interface header.
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
Struct for name/value list entry.
Struct for object processing options.
Struct for afw_object_properties_callback_entry_t.
Definition: afw_object.h:839
Interface afw_object public struct.
Interface afw_object_setter public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_value public struct.
struct for data type string values.