core: move new object system to core module
this will allow a wider range of data structures (e.g. b_error, b_stream, b_stringstream) to make use of the new object system, and other modules and library users can use the object system without depending on the blue-object or blue-ds modules. blue-ds will become a simple library of data structures (string, hashmap, etc), built on top of the core object system.
This commit is contained in:
18
core/class.h
Normal file
18
core/class.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef _CLASS_H_
|
||||
#define _CLASS_H_
|
||||
|
||||
#include <blue/core/error.h>
|
||||
#include <blue/core/misc.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct b_type_registration;
|
||||
|
||||
struct _b_class {
|
||||
uint64_t c_magic;
|
||||
const struct b_type_registration *c_type;
|
||||
};
|
||||
|
||||
extern b_result b_class_instantiate(
|
||||
struct b_type_registration *type, struct _b_class **out);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user