Loading...
Searching...
No Matches
origin.hpp
Go to the documentation of this file.
1
2#pragma once
3
5#include "core/ast/obj.hpp"
6
7namespace by {
8
9 class src;
10 class evalExpr;
11
99 class _nout origin final: public obj {
100 BY(ME(origin, obj), INIT_META(origin))
101 friend class coreInternal;
102
103 public:
104 explicit origin(const mgdType& newType);
105 explicit origin(const mgdType& newType, node* subpod);
106 explicit origin(const me& rhs);
107
108 public:
109 me& operator=(const me& rhs);
110
111 public:
112 using super::subs;
113 scope& subs() override;
114
115 state getState() const override;
116 void setState(state new1) override;
117 const ntype& getType() const override;
118 const node& getSubPod() const override;
119 const src& getSrc() const override;
120 void onCloneDeep(const clonable& from) override;
121 baseObj* make() const override;
122
123 using super::getCallComplete;
125
126 void setCallComplete(const node& new1);
127 void setCallComplete(const node* it) BY_SIDE_FUNC(setCallComplete);
128
129 nbool isComplete() const override;
130 clonable* clone() const override;
131 clonable* cloneDeep() const override;
132
133 private:
134 void _setType(const mgdType& new1) override;
135 void _setSrc(const src& s) override;
136 void _setModifier(const modifier& mod) override;
137 me& _assign(const me& rhs);
138 void _runCallComplete();
139
140 private:
141 mgdType _type; // TODO: memory leak
142 str _subpod;
143 tstr<src> _src;
144 tstr<modifier> _mod;
145 str _callComplete;
146 state _state;
147 };
148} // namespace by
Base class for representing byeol objects.
Definition baseObj.hpp:73
Definition coreInternal.hpp:39
Script type for byeol objects.
Definition mgdType.hpp:18
Access modifier for type members.
Definition modifier.hpp:13
Base class for all AST nodes in the byeol language.
Definition node.hpp:195
represents native c++ type system for byeol language
Definition ntype.hpp:33
Byeol runtime environment object.
Definition obj.hpp:62
User-defined origin type.
Definition origin.hpp:99
nbool isComplete() const override
const node & getSubPod() const override
Retrieves a sub-pod represented as a node.
node * getCallComplete() override
Returns the node responsible for completing the object's construction or initialization calls.
Source location information.
Definition src.hpp:15
Definition tnarr.hpp:9
to Top