20 template <
typename K,
typename V,
typename defaultContainer>
class tnchain;
22 typedef tnchain<std::string, node, tnmap<std::string, node, immutableTactic>> scope;
24 template <
typename T>
class tmock;
33 template <
typename T>
friend class tmock;
36 me& operator[](
const std::string& name);
37 const me& operator[](
const std::string& name)
const BY_CONST_FUNC(
operator[](name));
38 me& operator[](
const std::string* it);
39 const me& operator[](
const std::string* it)
const BY_CONST_FUNC(
operator[](it));
40 me& operator[](
const nchar* name);
41 const me& operator[](
const nchar* name)
const BY_CONST_FUNC(
operator[](name));
44 nbool in(
const node& elem)
const;
45 nbool in(
const node* elem)
const;
47 virtual scope& subs() = 0;
48 const scope& subs()
const BY_CONST_FUNC(subs())
56 const node* deduce(
const node* it)
const BY_SIDE_FUNC(deduce);
58 template <
typename T> T* sub(std::function<nbool(
const std::string&,
const T&)> l);
60 const T* sub(std::function<nbool(
const std::string&,
const T&)> l)
const BY_CONST_FUNC(sub<T>(l))
61 template <
typename T = me> T* sub();
62 template <
typename T = me>
const T* sub() const BY_CONST_FUNC(sub<T>())
63 template <typename T = me> T* sub(const std::
string& name);
64 template <typename T = me> T* sub(const std::
string* it) BY_SIDE_FUNC(sub);
65 template <typename T = me> const T* sub(const std::
string& name) const BY_CONST_FUNC(sub<T>(name))
66 template <typename T = me> const T* sub(const std::
string* name) const BY_CONST_FUNC(sub<T>(name))
67 template <typename T = me> T* sub(const std::
string& name, const
args& a);
68 template <typename T = me>
69 T* sub(const std::
string* name, const
args& a) BY_SIDE_FUNC(name, sub(*name, a),
nullptr);
70 template <typename T = me>
71 const T* sub(const std::
string& name, const
args& a) const BY_CONST_FUNC(sub<T>(name, a))
72 template <typename T = me>
73 const T* sub(const std::
string* name, const
args& a) const BY_CONST_FUNC(sub<T>(name, a))
75 template <typename T>
tnarr<T,
strTactic> subAll(std::function<nbool(const std::
string&, const T&)> l) const;
77 template <typename T = me>
tpriorities<T> subAll(const std::
string& name) const;
78 template <typename T = me>
79 tpriorities<T> subAll(const std::
string* it) const BY_SIDE_FUNC(subAll<T>)
90 template <typename T = me>
92 template <typename T = me>
tpriorities<T> subAll(const std::
string& name, const
args& a) const;
93 template <typename T = me>
95 BY_SIDE_FUNC(name, subAll<T>(*name, a),
tpriorities<T>());
96 template <typename T = me>
98 BY_SIDE_FUNC(name, subAll<T>(*name, a),
tpriorities<T>());
100 bool canRun(const
args& a) const;
102 priorType prioritize(const
args* it) const BY_SIDE_FUNC(it, prioritize(*it), NO_MATCH);
104 virtual
str run(const
args& a) = 0;
105 str run(const
args* it) BY_SIDE_FUNC(run);
106 str run(const std::
string& name, const
args& a);
107 str run(const std::
string& name, const
args* a) BY_SIDE_FUNC(a, run(name, a),
str());
108 str run(const std::
string* name, const
args& a) BY_SIDE_FUNC(name, run(*name, a),
str());
109 str run(const std::
string* name, const
args* a) BY_SIDE_FUNC(name&& a, run(*name, *a),
str());
110 str run(const std::
string& name);
111 str run(const std::
string* it) BY_SIDE_FUNC(run);
116 virtual
void rel() {}
118 template <
typename T> nbool is()
const {
return is(
ttype<T>::get()); }
120 nbool is(
const typeProvidable& to)
const;
121 nbool is(
const typeProvidable* it)
const BY_SIDE_FUNC(is);
122 nbool is(
const type& to)
const;
123 nbool is(
const type* it)
const BY_SIDE_FUNC(is);
125 template <
typename T> tstr<T> as()
const {
return as(ttype<T>::get()); }
127 str as(
const typeProvidable& to)
const;
128 str as(
const typeProvidable* it)
const BY_SIDE_FUNC(as);
129 str as(
const type& to)
const;
130 str as(
const type* it)
const BY_SIDE_FUNC(as);
132 template <
typename T> nbool isImpli()
const {
return isImpli(ttype<T>::get()); }
134 virtual nbool isImpli(
const type& to)
const;
135 nbool isImpli(
const typeProvidable& to)
const;
136 nbool isImpli(
const typeProvidable* it)
const BY_SIDE_FUNC(isImpli);
138 template <
typename T> tstr<T> asImpli()
const {
return asImpli(ttype<T>::get()); }
140 virtual str asImpli(
const type& to)
const;
141 str asImpli(
const typeProvidable& to)
const;
142 str asImpli(
const typeProvidable* it)
const BY_SIDE_FUNC(asImpli);
144 virtual const src& getSrc()
const;
169 using frameInteractable::inFrame;
171 using frameInteractable::outFrame;
172 void outFrame()
const override;
174 virtual const modifier& getModifier()
const;
178 virtual void _setSrc(
const src& s);
179 void _setSrc(
const src* it) BY_SIDE_FUNC(_setSrc);
Function call arguments container.
Definition: args.hpp:13
Factory for creating expressions with source location information.
Definition: exprMaker.hpp:17
Interface for frame interaction.
Definition: frameInteractable.hpp:15
Base class for all managed instances in memlite system.
Definition: instance.hpp:20
Access modifier for class members and func.
Definition: modifier.hpp:12
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
virtual nbool isComplete() const
virtual str getEval() const
const node * deduce(const node &it) const
Source location information.
Definition: src.hpp:11
Strong reference binding tactic.
Definition: strTactic.hpp:12
Template bidirectional container interface.
Definition: tbicontainable.hpp:17
Mock object template for testing and verification.
Definition: tmock.hpp:13
Collection of prioritized elements.
Definition: tpriorities.hpp:53
Strong reference smart pointer with strict type checking.
Definition: tstr.hpp:13
Template type wrapper for type metadata management.
Definition: ttype.hpp:16
Visitor context information.
Definition: visitInfo.hpp:10
Base visitor class for AST traversal.
Definition: visitor.hpp:20
priorType
the lower value, the higher priority.
Definition: tpriorities.hpp:8