clean up object module

This commit is contained in:
IlyaShurupov 2024-03-23 12:32:57 +03:00
parent 4c66704830
commit 5d9e270aa9
68 changed files with 1223 additions and 1229 deletions

View file

@ -2,7 +2,7 @@
#include "core/Object.hpp"
namespace obj {
namespace tp::obj {
struct DictObject : Object {
static ObjectType TypeData;
@ -10,22 +10,22 @@ namespace obj {
static void destructor(Object* self);
static void constructor(Object* self);
static tp::alni save_size(DictObject* self);
static alni save_size(DictObject* self);
static void save(DictObject* self, ArchiverOut& file_self);
static void load(ArchiverIn& file_self, DictObject* self);
static tp::Buffer<Object*> childs_retrival(DictObject* self);
static tp::alni allocated_size(DictObject* self);
static tp::alni allocated_size_recursive(DictObject* self);
static Buffer<Object*> childs_retrival(DictObject* self);
static alni allocated_size(DictObject* self);
static alni allocated_size_recursive(DictObject* self);
void put(const std::string&, Object*);
void remove(const std::string&);
Object* get(const std::string&);
tp::Map<std::string, Object*>::Idx presents(const std::string&);
Object* getSlotVal(tp::Map<std::string, Object*>::Idx);
Map<std::string, Object*>::Idx presents(const std::string&);
Object* getSlotVal(Map<std::string, Object*>::Idx);
[[nodiscard]] const tp::Map<std::string, Object*>& getItems() const;
[[nodiscard]] const Map<std::string, Object*>& getItems() const;
private:
tp::Map<std::string, Object*> items;
Map<std::string, Object*> items;
};
};
}