Objects Initial
This commit is contained in:
parent
00bc875846
commit
803ce23169
76 changed files with 7895 additions and 17 deletions
34
Objects/public/primitives/enumobject.h
Normal file
34
Objects/public/primitives/enumobject.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/object.h"
|
||||
|
||||
namespace obj {
|
||||
|
||||
struct EnumObject : Object {
|
||||
|
||||
// one entry is 2 * sizeof(alni) in size
|
||||
tp::uhalni active;
|
||||
tp::uhalni nentries;
|
||||
tp::alni* entries;
|
||||
|
||||
static ObjectType TypeData;
|
||||
static void constructor(EnumObject* self);
|
||||
static void destructor(EnumObject* self);
|
||||
static void copy(EnumObject* self, const EnumObject* in);
|
||||
|
||||
void init(tp::init_list<const char*> list);
|
||||
const char* getActiveName();
|
||||
const char* getItemName(tp::uhalni idx);
|
||||
|
||||
static void from_int(EnumObject* self, tp::alni in);
|
||||
static void from_float(EnumObject* self, tp::alnf in);
|
||||
static void from_string(EnumObject* self, tp::String in);
|
||||
static tp::String to_string(EnumObject* self);
|
||||
static tp::alni to_int(EnumObject* self);
|
||||
static tp::alnf to_float(EnumObject* self);
|
||||
|
||||
static bool compare(EnumObject* first, EnumObject* second);
|
||||
static EnumObject* create(tp::init_list<const char*> list);
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue