Modules/Objects/public/primitives/EnumObject.hpp
2024-03-23 12:09:51 +03:00

34 lines
No EOL
995 B
C++

#pragma once
#include "core/Object.hpp"
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::InitialierList<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, const std::string& in);
static std::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::InitialierList<const char*> list);
};
};