xo-gc: + CollectorTypeRegistry for streamlined init
This commit is contained in:
parent
929c25a7a6
commit
93429becad
16 changed files with 319 additions and 6 deletions
|
|
@ -2,13 +2,16 @@
|
|||
|
||||
set(SELF_LIB xo_expression2)
|
||||
set(SELF_SRCS
|
||||
init_expression2.cpp
|
||||
DConstant.cpp
|
||||
TypeRef.cpp
|
||||
IExpression_Any.cpp
|
||||
IExpression_DConstant.cpp
|
||||
StringTable.cpp
|
||||
DUniqueString.cpp
|
||||
IGCObject_DUniqueString.cpp
|
||||
expression2_register_facets.cpp
|
||||
expression2_register_types.cpp
|
||||
)
|
||||
|
||||
xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS})
|
||||
|
|
@ -18,4 +21,5 @@ xo_dependency(${SELF_LIB} reflect)
|
|||
xo_dependency(${SELF_LIB} xo_object2)
|
||||
xo_dependency(${SELF_LIB} xo_printable2)
|
||||
xo_dependency(${SELF_LIB} xo_flatstring)
|
||||
xo_dependency(${SELF_LIB} subsys)
|
||||
xo_dependency(${SELF_LIB} indentlog)
|
||||
|
|
|
|||
41
xo-expression2/src/expression2/init_expression2.cpp
Normal file
41
xo-expression2/src/expression2/init_expression2.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/** @file init_expression2.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Jan 2026
|
||||
**/
|
||||
|
||||
#include "init_expression2.hpp"
|
||||
#include "expression2_register_facets.hpp"
|
||||
#include "expression2_register_types.hpp"
|
||||
|
||||
#include <xo/object2/init_object2.hpp>
|
||||
#include <xo/gc/CollectorTypeRegistry.hpp>
|
||||
|
||||
namespace xo {
|
||||
using xo::scm::expression2_register_facets;
|
||||
using xo::scm::expression2_register_types;
|
||||
using xo::mm::CollectorTypeRegistry;
|
||||
|
||||
void
|
||||
InitSubsys<S_expression2_tag>::init()
|
||||
{
|
||||
expression2_register_facets();
|
||||
|
||||
CollectorTypeRegistry::instance().register_types(&expression2_register_types);
|
||||
}
|
||||
|
||||
InitEvidence
|
||||
InitSubsys<S_expression2_tag>::require()
|
||||
{
|
||||
InitEvidence retval;
|
||||
|
||||
/* direct subsystem deps for xo-object2/ */
|
||||
retval ^= InitSubsys<S_object2_tag>::require();
|
||||
|
||||
/* xo-expression2/'s own initialization code */
|
||||
retval ^= Subsystem::provide<S_expression2_tag>("expression2", &init);
|
||||
|
||||
return retval;
|
||||
}
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end init_expression2.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue