Separate objects context and interface
This commit is contained in:
parent
e937d189df
commit
55daf0f303
32 changed files with 362 additions and 384 deletions
|
|
@ -21,9 +21,9 @@ namespace tp::obj {
|
|||
|
||||
template <typename Type>
|
||||
Type* createMember(const std::string& id) {
|
||||
auto out = NDO->create(Type::TypeData.name);
|
||||
auto out = objects_api::create(Type::TypeData.name);
|
||||
addMember(out, id);
|
||||
NDO->destroy(out);
|
||||
objects_api::destroy(out);
|
||||
return (Type*) out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "core/Object.hpp"
|
||||
#include "List.hpp"
|
||||
|
||||
namespace tp::obj {
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ namespace tp::obj {
|
|||
static void uninit();
|
||||
static Object* null_return() {
|
||||
if (!NdoNull_globalInstance) {
|
||||
NdoNull_globalInstance = NDO->create<NullObject>();
|
||||
NDO->increaseReferenceCount(NdoNull_globalInstance);
|
||||
NdoNull_globalInstance = objects_api::create<NullObject>();
|
||||
objects_api::increaseReferenceCount(NdoNull_globalInstance);
|
||||
}
|
||||
return (Object*) NdoNull_globalInstance;
|
||||
}
|
||||
|
||||
static Object* null_return_ref() {
|
||||
NDO->increaseReferenceCount(null_return());
|
||||
objects_api::increaseReferenceCount(null_return());
|
||||
return NdoNull_globalInstance;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue