meta: add c++ wrapper of core module

This commit is contained in:
2026-02-03 17:41:25 +00:00
parent e0efbd1ec4
commit 13136ecbd6
15 changed files with 682 additions and 3 deletions

View File

@@ -0,0 +1,40 @@
#ifndef BLUE_CORE_OBJECT_HPP_
#define BLUE_CORE_OBJECT_HPP_
#include <blue/core/object.h>
namespace blue::core
{
class type;
class object
{
public:
static const size_t MAGIC = B_OBJECT_MAGIC;
object(object &) = delete;
object(object &&);
~object();
bool operator!()
{
return ptr_ == nullptr;
}
void to_string(void) const;
bool is_type(const type &type) const;
b_object *ptr(void)
{
return ptr_;
}
const b_object *ptr(void) const
{
return ptr_;
}
protected:
object() = default;
b_object *ptr_ = nullptr;
};
}
#endif