xo-reader2 xo-expression2: + DSequenceSsm ++ utest
This commit is contained in:
parent
3a290a456c
commit
cd369cf2e8
78 changed files with 898 additions and 158 deletions
|
|
@ -8,8 +8,9 @@
|
|||
#include "Expression.hpp"
|
||||
#include "TypeRef.hpp"
|
||||
#include "exprtype.hpp"
|
||||
#include <xo/reflect/TaggedPtr.hpp>
|
||||
#include <xo/gc/Collector.hpp>
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include <xo/reflect/TaggedPtr.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
|
|
@ -20,6 +21,7 @@ namespace xo {
|
|||
public:
|
||||
using TaggedPtr = xo::reflect::TaggedPtr;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using typeseq = xo::reflect::typeseq;
|
||||
|
|
@ -56,6 +58,14 @@ namespace xo {
|
|||
TypeDescr valuetype() const noexcept { return typeref_.td(); }
|
||||
void assign_valuetype(TypeDescr td) noexcept { typeref_.resolve(td); }
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-constant-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DConstant * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-constant-printable-facet **/
|
||||
///@{
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "Expression.hpp"
|
||||
#include "TypeRef.hpp"
|
||||
#include "exprtype.hpp"
|
||||
#include <xo/gc/Collector.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
//#include <vector>
|
||||
#include <string>
|
||||
|
|
@ -21,6 +22,7 @@ namespace xo {
|
|||
**/
|
||||
class DIfElseExpr {
|
||||
public:
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
|
|
@ -93,6 +95,14 @@ namespace xo {
|
|||
bool pretty(const ppindentinfo & ppii) const;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-ifelseexpr-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DIfElseExpr * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
|
||||
#ifdef NOT_YET
|
||||
virtual std::set<std::string> get_free_variables() const override {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
/** @file IGCObject_DConstant.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DConstant.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IGCObject_DConstant.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "GCObject.hpp"
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include "DConstant.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IGCObject_DConstant; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::mm::AGCObject,
|
||||
xo::scm::DConstant>
|
||||
{
|
||||
using ImplType = xo::mm::IGCObject_Xfer
|
||||
<xo::scm::DConstant,
|
||||
xo::scm::IGCObject_DConstant>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IGCObject_DConstant
|
||||
**/
|
||||
class IGCObject_DConstant {
|
||||
public:
|
||||
/** @defgroup scm-gcobject-dconstant-type-traits **/
|
||||
///@{
|
||||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-gcobject-dconstant-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** memory consumption for this instance **/
|
||||
static size_type shallow_size(const DConstant & self) noexcept;
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(const DConstant & self, obj<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DConstant & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
/** @file IGCObject_DIfElseExpr.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DIfElseExpr.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IGCObject_DIfElseExpr.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "GCObject.hpp"
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include "DIfElseExpr.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IGCObject_DIfElseExpr; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::mm::AGCObject,
|
||||
xo::scm::DIfElseExpr>
|
||||
{
|
||||
using ImplType = xo::mm::IGCObject_Xfer
|
||||
<xo::scm::DIfElseExpr,
|
||||
xo::scm::IGCObject_DIfElseExpr>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IGCObject_DIfElseExpr
|
||||
**/
|
||||
class IGCObject_DIfElseExpr {
|
||||
public:
|
||||
/** @defgroup scm-gcobject-difelseexpr-type-traits **/
|
||||
///@{
|
||||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-gcobject-difelseexpr-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** memory consumption for this instance **/
|
||||
static size_type shallow_size(const DIfElseExpr & self) noexcept;
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(const DIfElseExpr & self, obj<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DIfElseExpr & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
Loading…
Add table
Add a link
Reference in a new issue