diff --git a/hyperon_das_atomdb_cpp/src/document_types.h b/hyperon_das_atomdb_cpp/src/document_types.h index 4e90ab9e..c4cbbff3 100644 --- a/hyperon_das_atomdb_cpp/src/document_types.h +++ b/hyperon_das_atomdb_cpp/src/document_types.h @@ -221,7 +221,6 @@ class Node : public Atom { * @param named_type The named type of the Node. * @param name The name of the Node. * @param custom_attributes Optional custom attributes for the Node. Defaults to an empty map. - * @throws invalid_argument if the name is empty. */ Node(const string& id, const string& handle, @@ -297,7 +296,7 @@ class Link : public Atom { /** * @brief Constructs a Link with a type, targets documents, and optional custom attributes. * @param type The type of the Link. - * @param targets_documents The targets documents associated with the Link. + * @param targets The targets documents associated with the Link. * @param custom_attributes Optional custom attributes for the Link. Defaults to an empty map. * @note This constructor is intended to be used only when passing in the basic building * parameters to other functions. For creating complete new Link objects, use the @@ -346,9 +345,9 @@ class Link : public Atom { * ``` */ Link(const string& type, - const TargetsDocuments& targets_documents, + const TargetsDocuments& targets, const CustomAttributes& custom_attributes = CustomAttributes{}) - : targets_documents(targets_documents), Atom(type, custom_attributes) {} + : targets_documents(targets), Atom(type, custom_attributes) {} /** * @brief Constructs a Link object with the specified parameters. diff --git a/hyperon_das_atomdb_cpp/src/nanobind/hyperon_das_atomdb_cpp_bind.cc b/hyperon_das_atomdb_cpp/src/nanobind/hyperon_das_atomdb_cpp_bind.cc index 68c993af..a7836ef1 100644 --- a/hyperon_das_atomdb_cpp/src/nanobind/hyperon_das_atomdb_cpp_bind.cc +++ b/hyperon_das_atomdb_cpp/src/nanobind/hyperon_das_atomdb_cpp_bind.cc @@ -266,7 +266,7 @@ NB_MODULE(ext, m) { nb::module_ document_types = m.def_submodule("document_types"); nb::class_(document_types, "Atom") .def_ro("_id", &Atom::_id) - .def_prop_ro("id", // RO property for having access to `_id` as `id` + .def_prop_ro("id", // read-only property for having access to `_id` as `id` [](const Atom& self) -> string { return self._id; }) .def_ro("handle", &Atom::handle) .def_ro("composite_type_hash", &Atom::composite_type_hash) @@ -313,10 +313,10 @@ NB_MODULE(ext, m) { * constructor with all parameters. */ nb::init(), // custom_attributes "type"_a, - "targets_documents"_a, + "targets"_a, "custom_attributes"_a = CustomAttributes{}) .def("__init__", &helpers::init_link, diff --git a/hyperon_das_atomdb_cpp/src/utils/expression_hasher.h b/hyperon_das_atomdb_cpp/src/utils/expression_hasher.h index fdb0334c..f8ceed2f 100644 --- a/hyperon_das_atomdb_cpp/src/utils/expression_hasher.h +++ b/hyperon_das_atomdb_cpp/src/utils/expression_hasher.h @@ -123,28 +123,6 @@ class ExpressionHasher { return move(compute_hash(hashable_string)); } - // /** - // * @brief Generates a composite hash from a list of elements. - // * - // * This function takes a vector of elements, each of which can be of any type, - // * and generates a composite hash representing the combined hash of all elements. - // * - // * @param elements A vector of elements of type std::any, representing the components to be - // * hashed. - // * @return A string representing the composite hash generated from the elements. - // */ - // static std::string composite_hash(const ListOfAny& elements) { - // StringList hashable_elements; - // for (const auto& element : elements) { - // if (auto str = any_cast(&element)) { - // hashable_elements.emplace_back(*str); - // } else { - // throw invalid_argument("Invalid composite type element."); - // } - // } - // return move(composite_hash(hashable_elements)); - // } - /** * @brief Generates a composite hash from a base hash. *