Objects Initial
This commit is contained in:
parent
00bc875846
commit
803ce23169
76 changed files with 7895 additions and 17 deletions
36
Objects/public/primitives/listobject.h
Normal file
36
Objects/public/primitives/listobject.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/object.h"
|
||||
|
||||
namespace obj {
|
||||
|
||||
enum ListMethods {
|
||||
LISTOBJECT_PUSH_BACK,
|
||||
LISTOBJECT_GET_LENGTH,
|
||||
};
|
||||
|
||||
struct ListObject : Object {
|
||||
static ObjectType TypeData;
|
||||
static void constructor(Object* self);
|
||||
static void copy(Object* self, const Object* in);
|
||||
static void destructor(Object* self);
|
||||
|
||||
static tp::alni allocated_size_recursive(ListObject* self);
|
||||
static tp::alni allocated_size(ListObject* self);
|
||||
static tp::Buffer<Object*> childs_retrival(ListObject* self);
|
||||
static void load(Archiver& file_self, ListObject* self);
|
||||
static void save(ListObject* self, Archiver& file_self);
|
||||
static tp::alni save_size(ListObject* self);
|
||||
|
||||
const tp::List<Object*>& getItems() const;
|
||||
|
||||
void pushBack(Object* obj);
|
||||
void pushFront(Object* obj);
|
||||
void popBack();
|
||||
void delNode(tp::List<Object*>::Node*);
|
||||
|
||||
private:
|
||||
tp::List<Object*> items;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue