4040#include " tiledb/common/types/untyped_datum.h"
4141#include " tiledb/sm/buffer/buffer.h"
4242#include " tiledb/sm/enums/datatype.h"
43+ #include " tiledb/sm/storage_manager/context.h"
4344#include " tiledb/storage_format/serialization/serializers.h"
4445
4546namespace tiledb ::sm {
@@ -75,6 +76,7 @@ class Enumeration {
7576
7677 /* * Create a new Enumeration
7778 *
79+ * @param resources Resources for computing the enumeration value map.
7880 * @param name The name of this Enumeration as referenced by attributes.
7981 * @param type The datatype of the enumeration values.
8082 * @param cell_val_num The cell_val_num of the enumeration.
@@ -91,6 +93,7 @@ class Enumeration {
9193 * @return shared_ptr<Enumeration> The created enumeration.
9294 */
9395 static shared_ptr<const Enumeration> create (
96+ const ContextResources& resources,
9497 const std::string& name,
9598 Datatype type,
9699 uint32_t cell_val_num,
@@ -101,6 +104,7 @@ class Enumeration {
101104 uint64_t offsets_size,
102105 shared_ptr<MemoryTracker> memory_tracker) {
103106 return create (
107+ resources,
104108 name,
105109 " " ,
106110 type,
@@ -115,6 +119,7 @@ class Enumeration {
115119
116120 /* * Create a new Enumeration
117121 *
122+ * @param resources Resources for computing the enumeration value map.
118123 * @param name The name of this Enumeration as referenced by attributes.
119124 * @param path_name The last URI path component of the Enumeration.
120125 * @param type The datatype of the enumeration values.
@@ -132,6 +137,7 @@ class Enumeration {
132137 * @return shared_ptr<Enumeration> The created enumeration.
133138 */
134139 static shared_ptr<const Enumeration> create (
140+ const ContextResources& resources,
135141 const std::string& name,
136142 const std::string& path_name,
137143 Datatype type,
@@ -144,6 +150,7 @@ class Enumeration {
144150 shared_ptr<MemoryTracker> memory_tracker) {
145151 struct EnableMakeShared : public Enumeration {
146152 EnableMakeShared (
153+ const ContextResources& resources,
147154 const std::string& name,
148155 const std::string& path_name,
149156 Datatype type,
@@ -155,6 +162,7 @@ class Enumeration {
155162 uint64_t offsets_size,
156163 shared_ptr<MemoryTracker> memory_tracker)
157164 : Enumeration(
165+ resources,
158166 name,
159167 path_name,
160168 type,
@@ -169,6 +177,7 @@ class Enumeration {
169177 };
170178 return make_shared<EnableMakeShared>(
171179 HERE (),
180+ resources,
172181 name,
173182 path_name,
174183 type,
@@ -189,7 +198,9 @@ class Enumeration {
189198 * @return A new Enumeration.
190199 */
191200 static shared_ptr<const Enumeration> deserialize (
192- Deserializer& deserializer, shared_ptr<MemoryTracker> memory_tracker);
201+ const ContextResources& resources,
202+ Deserializer& deserializer,
203+ shared_ptr<MemoryTracker> memory_tracker);
193204
194205 /* *
195206 * Create a new enumeration by extending an existing enumeration's
@@ -207,6 +218,7 @@ class Enumeration {
207218 * @return shared_ptr<Enumeration> The extended enumeration.
208219 */
209220 shared_ptr<const Enumeration> extend (
221+ const ContextResources& resources,
210222 const void * data,
211223 uint64_t data_size,
212224 const void * offsets,
@@ -361,6 +373,7 @@ class Enumeration {
361373
362374 /* * Constructor
363375 *
376+ * @param resources Resources for building the enumeration value map.
364377 * @param name The name of this Enumeration as referenced by attributes.
365378 * @param path_name The last URI path component of the Enumeration.
366379 * @param type The datatype of the enumeration values.
@@ -377,6 +390,7 @@ class Enumeration {
377390 * @param memory_tracker The memory tracker.
378391 */
379392 Enumeration (
393+ const ContextResources& resources,
380394 const std::string& name,
381395 const std::string& path_name,
382396 Datatype type,
@@ -426,7 +440,7 @@ class Enumeration {
426440 /* ********************************* */
427441
428442 /* * Populate the value_map_ */
429- void generate_value_map ();
443+ void generate_value_map (const ContextResources& resources );
430444
431445 /* *
432446 * Add a value to value_map_
0 commit comments