wavelength 1.0.0
Loading...
Searching...
No Matches
namedobjectregistry.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <vector>
5
6#include "os/string.h"
7
16public:
18 class Object {
19 public:
21 virtual ~Object() = default;
22 };
23
25 struct Entry {
27 std::unique_ptr<Object> mObject;
28 };
29
31 struct Group {
33 int mReserved14[2]; // +0x14, not yet identified.
34 std::vector<Object *> mMembers;
35 };
36
44
52
61
69
71 const std::vector<std::unique_ptr<Entry>> &GetEntries() const {
72 return mEntries;
73 }
74
76 const std::vector<Group> &GetGroups() const {
77 return mGroups;
78 }
79
80private:
81 std::vector<std::unique_ptr<Entry>> mEntries;
82 std::vector<Group> mGroups;
83};
84
94
An object of the registry, which the registry deletes through its virtual destructor.
Definition namedobjectregistry.h:18
virtual ~Object()=default
Release the object.
NamedObjectRegistry()
Construct an empty registry.
void DeleteEntries()
Delete every entry and its object.
const std::vector< std::unique_ptr< Entry > > & GetEntries() const
Definition namedobjectregistry.h:71
static NamedObjectRegistry * Get()
Report the registry, constructing it on first use.
const std::vector< Group > & GetGroups() const
Definition namedobjectregistry.h:76
~NamedObjectRegistry()
Release the groups and the list of entries, without deleting the objects.
Growable text buffer that is also a PrnStream.
Definition string.h:19
void NamedObjectRegistryInit()
Prepare the registry of named objects.
void NamedObjectRegistryTerminate()
Delete every entry of the registry of named objects.
A named object.
Definition namedobjectregistry.h:25
String mName
Definition namedobjectregistry.h:26
std::unique_ptr< Object > mObject
Definition namedobjectregistry.h:27
A named group of objects.
Definition namedobjectregistry.h:31
int mReserved14[2]
Definition namedobjectregistry.h:33
std::vector< Object * > mMembers
Definition namedobjectregistry.h:34
String mName
Definition namedobjectregistry.h:32