9 template <
typename T,
typename TACTIC>
class tnarr;
10 typedef tnarr<node, strTactic> narr;
21 typedef std::map<const ntype*, const ntype*> deducer;
22 typedef std::map<const ntype*, deducer> deducers;
31 nbool operator==(
const type& rhs)
const override;
38 virtual nbool isImpli(
const type& to)
const;
39 nbool isImpli(
const type* it)
const BY_SIDE_FUNC(isImpli);
41 nbool isImpli(
const typeProvidable* it)
const BY_SIDE_FUNC(isImpli);
45 template <
typename T> tstr<T> asImpli(
const node* it)
const BY_SIDE_FUNC(asImpli<T>);
47 virtual str asImpli(
const node& from,
const type& to)
const;
48 str asImpli(
const node& from,
const type* to)
const BY_SIDE_FUNC(to, asImpli(from, *to), str());
49 str asImpli(
const node* from,
const type& to)
const BY_SIDE_FUNC(from, asImpli(*from, to), str());
50 str asImpli(
const node* from,
const type* to)
const BY_SIDE_FUNC(from&& to, asImpli(*from, *to), str());
53 virtual nbool
isCustom()
const {
return false; }
55 template <
typename T> nbool is()
const {
return this->is(
ttype<T>::get()); }
57 nbool is(
const type& to)
const;
58 nbool is(
const type* it)
const BY_SIDE_FUNC(is);
60 template <
typename T> tstr<T> as(
const node& it)
const {
return this->as(it, ttype<T>::get()); }
62 template <
typename T> tstr<T> as(
const node* it)
const BY_SIDE_FUNC(as<T>);
64 str as(
const node& from,
const type& to)
const;
65 str as(
const node& from,
const type* to)
const BY_SIDE_FUNC(to, as(from, *to), str());
66 str as(
const node* from,
const type& to)
const BY_SIDE_FUNC(from, as(*from, to), str());
67 str as(
const node* from,
const type* to)
const BY_SIDE_FUNC(from&& to, as(*from, *to), str());
69 virtual nbool isImmutable()
const;
72 const ntype* deduce(
const ntype* it)
const BY_SIDE_FUNC(deduce);
80 static const ntype* deduce(
const ntype& l,
const ntype* r) BY_SIDE_FUNC(r, deduce(l, *r),
nullptr);
81 static const ntype* deduce(
const ntype* l,
const ntype& r) BY_SIDE_FUNC(l, deduce(*l, r),
nullptr);
82 static const ntype* deduce(
const ntype* l,
const ntype* r) BY_SIDE_FUNC(l&& r, deduce(*l, *r),
nullptr);
84 const params& getParams() const BY_CONST_FUNC(getParams())
85 virtual
params& getParams();
87 virtual const
node* getRet() const;
88 virtual
void setRet(const
node& new1);
89 void setRet(const
node* it) BY_SIDE_FUNC(setRet);
91 std::
string createNameWithParams() const;
93 const nchar* getMetaTypeName() const override;
97 virtual const
impliAses& _getImpliAses() const;
98 virtual const
ases& _getAses() const;
101 static deducers* _makeDeducers();
105 const static inline std::
string META_TYPENAME = "
ntype";
108 typedef std::vector<const
ntype*> ntypes;
Managed array container for byeol language.
Definition: arr.hpp:14
Collection of type converters.
Definition: ases.hpp:12
Generic type origin with type parameters.
Definition: genericOrigin.hpp:15
Implicit type conversion collection.
Definition: impliAses.hpp:11
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
Native type system for byeol language.
Definition: ntype.hpp:19
const ntype * deduce(const ntype &r) const
virtual nbool isCustom() const
Definition: ntype.hpp:53
static const ntype * deduce(const ntype &l, const ntype &r)
nbool isImpli() const
whether variable 'it' can be a subtype of T
Definition: ntype.hpp:36
Function parameter list container.
Definition: params.hpp:15
Managed sequence container for integer ranges.
Definition: seq.hpp:16
Strong reference smart pointer with strict type checking.
Definition: tstr.hpp:13
Template type wrapper for type metadata management.
Definition: ttype.hpp:16
Base class for runtime type information in byeol language.
Definition: type.hpp:12
Interface for objects that can provide their type information.
Definition: typeProvidable.hpp:12