@@ -31,8 +31,7 @@ class NamespaceContainer;
3131
3232class ICEBERG_EXPORT MemoryCatalog : public Catalog {
3333 public:
34- MemoryCatalog (std::shared_ptr<FileIO> file_io,
35- std::optional<std::string> warehouse_location);
34+ MemoryCatalog (std::shared_ptr<FileIO> file_io, std::string warehouse_location);
3635
3736 void Initialize (
3837 const std::string& name,
@@ -75,13 +74,13 @@ class ICEBERG_EXPORT MemoryCatalog : public Catalog {
7574 std::string catalog_name_;
7675 std::unordered_map<std::string, std::string> properties_;
7776 std::shared_ptr<FileIO> file_io_;
78- std::optional<std:: string> warehouse_location_;
77+ std::string warehouse_location_;
7978 std::unique_ptr<NamespaceContainer> root_container_;
8079 mutable std::recursive_mutex mutex_;
8180};
8281
8382/* *
84- * @ brief A hierarchical container that manages namespaces and table metadata in-memory.
83+ * \ brief A hierarchical container that manages namespaces and table metadata in-memory.
8584 *
8685 * Each NamespaceContainer represents a namespace level and can contain properties,
8786 * tables, and child namespaces. This structure enables a tree-like representation
@@ -90,118 +89,94 @@ class ICEBERG_EXPORT MemoryCatalog : public Catalog {
9089class ICEBERG_EXPORT NamespaceContainer {
9190 public:
9291 /* *
93- * @ brief Checks whether the given namespace exists.
94- * @ param namespace_ident The namespace to check.
95- * @ return True if the namespace exists; false otherwise.
92+ * \ brief Checks whether the given namespace exists.
93+ * \ param[in] namespace_ident The namespace to check.
94+ * \ return True if the namespace exists; false otherwise.
9695 */
9796 bool NamespaceExists (const Namespace& namespace_ident) const ;
9897
9998 /* *
100- * @ brief Lists immediate child namespaces under the given parent namespace.
101- * @ param parent_namespace_ident The optional parent namespace. If not provided,
99+ * \ brief Lists immediate child namespaces under the given parent namespace.
100+ * \ param[in] parent_namespace_ident The optional parent namespace. If not provided,
102101 * the children of the root are returned.
103- * @ return A vector of child namespace names.
102+ * \ return A vector of child namespace names.
104103 */
105104 std::vector<std::string> ListChildrenNamespaces (
106105 const std::optional<Namespace>& parent_namespace_ident = std::nullopt ) const ;
107106
108107 /* *
109- * @ brief Creates a new namespace with the specified properties.
110- * @ param namespace_ident The namespace to create.
111- * @ param properties A map of key-value pairs to associate with the namespace.
112- * @ return True if the namespace was successfully created; false if it already exists.
108+ * \ brief Creates a new namespace with the specified properties.
109+ * \ param[in] namespace_ident The namespace to create.
110+ * \ param[in] properties A map of key-value pairs to associate with the namespace.
111+ * \ return True if the namespace was successfully created; false if it already exists.
113112 */
114113 bool CreateNamespace (const Namespace& namespace_ident,
115114 const std::unordered_map<std::string, std::string>& properties);
116115
117116 /* *
118- * @ brief Deletes an existing namespace.
119- * @ param namespace_ident The namespace to delete.
120- * @ return True if the namespace was successfully deleted; false if it does not exist.
117+ * \ brief Deletes an existing namespace.
118+ * \ param[in] namespace_ident The namespace to delete.
119+ * \ return True if the namespace was successfully deleted; false if it does not exist.
121120 */
122121 bool DeleteNamespace (const Namespace& namespace_ident);
123122
124123 /* *
125- * @ brief Retrieves the properties of the specified namespace.
126- * @ param namespace_ident The namespace whose properties to retrieve.
127- * @ return An optional containing the properties map if the namespace exists;
124+ * \ brief Retrieves the properties of the specified namespace.
125+ * \ param[in] namespace_ident The namespace whose properties to retrieve.
126+ * \ return An optional containing the properties map if the namespace exists;
128127 * std::nullopt otherwise.
129128 */
130129 std::optional<std::unordered_map<std::string, std::string>> GetProperties (
131130 const Namespace& namespace_ident) const ;
132131
133132 /* *
134- * @ brief Replaces all properties of the given namespace.
135- * @ param namespace_ident The namespace whose properties will be replaced.
136- * @ param properties The new properties map.
137- * @ return True if the namespace exists and properties were replaced; false otherwise.
133+ * \ brief Replaces all properties of the given namespace.
134+ * \ param[in] namespace_ident The namespace whose properties will be replaced.
135+ * \ param[in] properties The new properties map.
136+ * \ return True if the namespace exists and properties were replaced; false otherwise.
138137 */
139138 bool ReplaceProperties (const Namespace& namespace_ident,
140139 const std::unordered_map<std::string, std::string>& properties);
141140
142141 /* *
143- * @ brief Lists all table names under the specified namespace.
144- * @ param namespace_ident The namespace from which to list tables.
145- * @ return A vector of table names.
142+ * \ brief Lists all table names under the specified namespace.
143+ * \ param[in] namespace_ident The namespace from which to list tables.
144+ * \ return A vector of table names.
146145 */
147146 std::vector<std::string> ListTables (const Namespace& namespace_ident) const ;
148147
149148 /* *
150- * @ brief Registers a table in the given namespace with a metadata location.
151- * @ param table_ident The fully qualified identifier of the table.
152- * @ param metadata_location The path to the table's metadata.
153- * @ return True if the table was registered successfully; false otherwise.
149+ * \ brief Registers a table in the given namespace with a metadata location.
150+ * \ param[in] table_ident The fully qualified identifier of the table.
151+ * \ param[in] metadata_location The path to the table's metadata.
152+ * \ return True if the table was registered successfully; false otherwise.
154153 */
155154 bool RegisterTable (TableIdentifier const & table_ident,
156155 const std::string& metadata_location);
157156
158157 /* *
159- * @ brief Unregisters a table from the specified namespace.
160- * @ param table_ident The identifier of the table to unregister.
161- * @ return True if the table existed and was removed; false otherwise.
158+ * \ brief Unregisters a table from the specified namespace.
159+ * \ param[in] table_ident The identifier of the table to unregister.
160+ * \ return True if the table existed and was removed; false otherwise.
162161 */
163162 bool UnregisterTable (TableIdentifier const & table_ident);
164163
165164 /* *
166- * @ brief Checks if a table exists in the specified namespace.
167- * @ param table_ident The identifier of the table to check.
168- * @ return True if the table exists; false otherwise.
165+ * \ brief Checks if a table exists in the specified namespace.
166+ * \ param[in] table_ident The identifier of the table to check.
167+ * \ return True if the table exists; false otherwise.
169168 */
170169 bool TableExists (TableIdentifier const & table_ident) const ;
171170
172171 /* *
173- * @ brief Gets the metadata location for the specified table.
174- * @ param table_ident The identifier of the table.
175- * @ return An optional string containing the metadata location if the table exists;
172+ * \ brief Gets the metadata location for the specified table.
173+ * \ param[in] table_ident The identifier of the table.
174+ * \ return An optional string containing the metadata location if the table exists;
176175 * std::nullopt otherwise.
177176 */
178177 std::optional<std::string> GetTableMetadataLocation (
179178 TableIdentifier const & table_ident) const ;
180179
181- private:
182- /* *
183- * @brief Helper function to retrieve the container node for a given namespace.
184- * @param root The root of the tree to search.
185- * @param namespace_ident The namespace path to traverse.
186- * @return A pointer to the corresponding NamespaceContainer if it exists; nullptr
187- * otherwise.
188- */
189- static NamespaceContainer* GetNamespaceContainer (NamespaceContainer* root,
190- const Namespace& namespace_ident);
191-
192- /* *
193- * @brief Const version of GetNamespaceContainer.
194- */
195- static const NamespaceContainer* GetNamespaceContainer (
196- const NamespaceContainer* root, const Namespace& namespace_ident);
197-
198- /* *
199- * @brief Templated implementation for retrieving a NamespaceContainer node.
200- * @tparam ContainerPtr Pointer type to NamespaceContainer (const or non-const).
201- * @param root The root node.
202- * @param namespace_ident The namespace path.
203- * @return A pointer to the container node if found; nullptr otherwise.
204- */
205180 template <typename ContainerPtr>
206181 static ContainerPtr GetNamespaceContainerImpl (ContainerPtr root,
207182 const Namespace& namespace_ident) {
@@ -216,6 +191,7 @@ class ICEBERG_EXPORT NamespaceContainer {
216191 return node;
217192 }
218193
194+ private:
219195 // / Map of child namespace names to their corresponding container instances.
220196 std::unordered_map<std::string, NamespaceContainer> children_;
221197
0 commit comments