aboutsummaryrefslogtreecommitdiffstats
path: root/include/MultigroupCodec.h
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-06-05 21:40:44 -0300
committerGitHub <noreply@github.com>2026-06-05 21:40:44 -0300
commit5174fc25698cff33b03b5746bf1742e417988f7d (patch)
tree232a3acdd9b458de481dbd5cbde889505168c8e8 /include/MultigroupCodec.h
parent85ed897de3676af866cc619dc700025820c02201 (diff)
downloadRNT-5174fc25698cff33b03b5746bf1742e417988f7d.tar.gz
RNT-5174fc25698cff33b03b5746bf1742e417988f7d.zip
Project C interface, reroute FOL plan enums & format
Diffstat (limited to 'include/MultigroupCodec.h')
-rw-r--r--include/MultigroupCodec.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/MultigroupCodec.h b/include/MultigroupCodec.h
index 50f7bb8..9d003ea 100644
--- a/include/MultigroupCodec.h
+++ b/include/MultigroupCodec.h
@@ -29,8 +29,7 @@
* payloads to `Merkle<std::string>`.
*/
-namespace nt::MultigroupCodec
-{
+namespace nt::MultigroupCodec {
/** @brief One entry in a multigroup snapshot: (relation_name, root_hex). */
using RelationEntry = std::pair<std::string, std::string>;
@@ -45,8 +44,7 @@ namespace nt::MultigroupCodec
* @param relations Entries to load. Duplicates collapse to the last value.
* @return Root node hash (empty string when `relations` is empty).
*/
- std::string Build(IStorageBackend& store,
- const std::vector<RelationEntry>& relations);
+ std::string Build(IStorageBackend& store, const std::vector<RelationEntry>& relations);
/**
* @brief Enumerate all (name, root_hex) pairs at a multigroup root.
@@ -54,8 +52,7 @@ namespace nt::MultigroupCodec
* Pages the entire tree (offset 0, no limit). Returned entries are in
* key-sorted order. Empty input root yields an empty list.
*/
- std::vector<RelationEntry> List(IStorageBackend& store,
- const std::string& root_hex);
+ std::vector<RelationEntry> List(IStorageBackend& store, const std::string& root_hex);
/**
* @brief Insert or overwrite one (relation_name → root_hex) entry.
@@ -65,25 +62,21 @@ namespace nt::MultigroupCodec
* mutations. Pass an empty `root_hex` for the prior-state argument to
* start from an empty tree.
*/
- std::string InsertOne(IStorageBackend& store,
- const std::string& root_hex,
- const std::string& relation_name,
- const std::string& relation_root_hex);
+ std::string InsertOne(IStorageBackend& store, const std::string& root_hex,
+ const std::string& relation_name, const std::string& relation_root_hex);
/**
* @brief Remove one relation entry from the multigroup tree.
*
* Returns the new root hash; empty when the tree becomes empty.
*/
- std::string RemoveOne(IStorageBackend& store,
- const std::string& root_hex,
+ std::string RemoveOne(IStorageBackend& store, const std::string& root_hex,
const std::string& relation_name);
/**
* @brief Look up one relation's root hex by name.
* @return Hex root, or empty string when the name is absent.
*/
- std::string Lookup(IStorageBackend& store,
- const std::string& root_hex,
+ std::string Lookup(IStorageBackend& store, const std::string& root_hex,
const std::string& relation_name);
-}
+} // namespace nt::MultigroupCodec