xo-expression2: + DGlobalSymtab facet support gen + files
This commit is contained in:
parent
fc4bfafa0a
commit
06521e5e79
15 changed files with 400 additions and 5 deletions
|
|
@ -58,6 +58,9 @@ set(SELF_SRCS
|
|||
IPrintable_DLocalSymtab.cpp
|
||||
|
||||
DGlobalSymtab.cpp
|
||||
ISymbolTable_DGlobalSymtab.cpp
|
||||
IGCObject_DGlobalSymtab.cpp
|
||||
IPrintable_DGlobalSymtab.cpp
|
||||
|
||||
StringTable.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,18 @@ namespace xo {
|
|||
return this->shallow_size();
|
||||
}
|
||||
|
||||
// ----- printable facet -----
|
||||
|
||||
bool
|
||||
DGlobalSymtab::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"DGlobalSymtab",
|
||||
refrtag("nsym", vars_->size()),
|
||||
refrtag("capacity", vars_->capacity()));
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
|
|
|||
39
src/expression2/IGCObject_DGlobalSymtab.cpp
Normal file
39
src/expression2/IGCObject_DGlobalSymtab.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/** @file IGCObject_DGlobalSymtab.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DGlobalSymtab.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IGCObject_DGlobalSymtab.json5]
|
||||
**/
|
||||
|
||||
#include "symtab/IGCObject_DGlobalSymtab.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DGlobalSymtab::shallow_size(const DGlobalSymtab & self) noexcept -> size_type
|
||||
{
|
||||
return self.shallow_size();
|
||||
}
|
||||
|
||||
auto
|
||||
IGCObject_DGlobalSymtab::shallow_copy(const DGlobalSymtab & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
}
|
||||
|
||||
auto
|
||||
IGCObject_DGlobalSymtab::forward_children(DGlobalSymtab & self, obj<ACollector> gc) noexcept -> size_type
|
||||
{
|
||||
return self.forward_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IGCObject_DGlobalSymtab.cpp */
|
||||
28
src/expression2/IPrintable_DGlobalSymtab.cpp
Normal file
28
src/expression2/IPrintable_DGlobalSymtab.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file IPrintable_DGlobalSymtab.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DGlobalSymtab.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DGlobalSymtab.json5]
|
||||
**/
|
||||
|
||||
#include "symtab/IPrintable_DGlobalSymtab.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IPrintable_DGlobalSymtab::pretty(const DGlobalSymtab & self, const ppindentinfo & ppii) -> bool
|
||||
{
|
||||
return self.pretty(ppii);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DGlobalSymtab.cpp */
|
||||
34
src/expression2/ISymbolTable_DGlobalSymtab.cpp
Normal file
34
src/expression2/ISymbolTable_DGlobalSymtab.cpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/** @file ISymbolTable_DGlobalSymtab.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISymbolTable_DGlobalSymtab.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISymbolTable_DGlobalSymtab.json5]
|
||||
**/
|
||||
|
||||
#include "symtab/ISymbolTable_DGlobalSymtab.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
ISymbolTable_DGlobalSymtab::is_global_symtab(const DGlobalSymtab & self) noexcept -> bool
|
||||
{
|
||||
return self.is_global_symtab();
|
||||
}
|
||||
|
||||
auto
|
||||
ISymbolTable_DGlobalSymtab::lookup_binding(const DGlobalSymtab & self, const DUniqueString * sym) noexcept -> Binding
|
||||
{
|
||||
return self.lookup_binding(sym);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISymbolTable_DGlobalSymtab.cpp */
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
#include "expression2_register_facets.hpp"
|
||||
|
||||
#include <xo/expression2/UniqueString.hpp>
|
||||
#include <xo/expression2/detail/IGCObject_DUniqueString.hpp>
|
||||
#include <xo/expression2/detail/IPrintable_DUniqueString.hpp>
|
||||
//#include <xo/expression2/detail/IGCObject_DUniqueString.hpp>
|
||||
//#include <xo/expression2/detail/IPrintable_DUniqueString.hpp>
|
||||
|
||||
#include <xo/expression2/detail/IExpression_DDefineExpr.hpp>
|
||||
//#include <xo/expression2/detail/IGCObject_DDefineExpr.hpp>
|
||||
|
|
@ -101,6 +101,10 @@ namespace xo {
|
|||
FacetRegistry::register_impl<AGCObject, DLocalSymtab>();
|
||||
FacetRegistry::register_impl<APrintable, DLocalSymtab>();
|
||||
|
||||
FacetRegistry::register_impl<ASymbolTable, DGlobalSymtab>();
|
||||
FacetRegistry::register_impl<AGCObject, DGlobalSymtab>();
|
||||
FacetRegistry::register_impl<APrintable, DGlobalSymtab>();
|
||||
|
||||
// until we register facets
|
||||
TypeRegistry::register_type<DGlobalSymtab>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue