aboutsummaryrefslogtreecommitdiffstats
path: root/include/ObjectManager.h
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-05-08 22:57:05 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-05-08 22:57:05 -0300
commit0657d6815943b5350bf4a596cd826f7a9de14a90 (patch)
tree53d4fbd03731e483f1bd83a58beab64a330c7f1d /include/ObjectManager.h
parentbe67e04f498f02c601788f2e23913827d2aa3c21 (diff)
downloadRNT-0657d6815943b5350bf4a596cd826f7a9de14a90.tar.gz
RNT-0657d6815943b5350bf4a596cd826f7a9de14a90.zip
port docs to doxygen
Diffstat (limited to 'include/ObjectManager.h')
-rw-r--r--include/ObjectManager.h47
1 files changed, 43 insertions, 4 deletions
diff --git a/include/ObjectManager.h b/include/ObjectManager.h
index 8abf44c..52ba602 100644
--- a/include/ObjectManager.h
+++ b/include/ObjectManager.h
@@ -8,40 +8,79 @@
#include <string>
#include <vector>
+/**
+ * @file ObjectManager.h
+ * @brief Declares the registry responsible for runtime-managed database objects.
+ */
+
namespace nt
{
+ /**
+ * @brief Owns the registry used to locate and reference database objects.
+ *
+ * The object manager is the central directory for runtime objects. It keeps
+ * the metadata needed to reason about object type, path, references, and
+ * handles while the concrete storage model is still being designed.
+ */
class NT_API ObjectManager
{
public:
+ /** @brief Base type for objects stored in the registry. */
class IObject {
public:
virtual ~IObject() = default;
};
+
+ /** @brief Object representing a multigroup. */
class Multigroup : IObject {};
+ /** @brief Object representing a relation. */
class Relation : IObject {};
+ /** @brief Object representing a tuple. */
class Tuple : IObject {};
+ /** @brief Object representing a transaction. */
class Transaction : IObject {};
+
+ /** @brief Describes the behavior and capabilities of an object category. */
struct object_type {
+ /** Object category label. */
OBJECT_TYPE label;
- // If the object is not durable. E.g.: TRANSACTION
+ /** True when the object is not durable. For example: TRANSACTION. */
bool disposable;
+ /** Methods supported by this object type. */
std::set<METHOD> methods;
};
+
+ /** @brief Shared metadata stored at the head of a registry entry. */
struct registry_head {
+ /** Number of object-to-object references. */
uint32_t reference_count;
+ /** Number of open handles. */
uint32_t handle_count;
+ /** Object type metadata. */
struct object_type* type;
+ /** Logical object path inside the namespace. */
std::vector<std::string> path;
- //security_descriptor to be added later, maybe also a set of labels
+ /** security_descriptor to be added later, maybe also a set of labels */
};
+
+ /** @brief Node in the object registry. */
struct registry {
+ /** Shared metadata for this object. */
struct registry_head* head;
+ /** Stored object payload. */
IObject object;
- // TODO: Treat as a list for now, but ideally it's a tree
+ /** TODO: Treat as a list for now, but ideally it is a tree. */
struct registry* next;
};
+
+ /** Root registry entries. */
struct registry** entries;
- // Looks into this registry and attempts to retrieve the entry
+
+ /**
+ * @brief Looks into this registry and attempts to retrieve an entry.
+ * @param object_path Logical path to search for.
+ * @return Matching registry entry, or nullptr when no object is found.
+ */
struct registry* Find(const std::vector<std::string> object_path);
};
}