Loading...
Searching...
No Matches
obj.hpp
Go to the documentation of this file.
1
2#pragma once
3
5#include "core/ast/scope.hpp"
7
8namespace by {
9
10 class mgdType;
11 class origin;
12 class evalExpr;
13
62 class _nout obj: public baseObj {
63 BY(ME(obj, baseObj), INIT_META(obj), CLONE(obj), VISIT())
64
65 public:
66 typedef ntype metaType;
67
68 public:
72 explicit obj(); // this means 'any' class.
77 explicit obj(const scope& subs);
82 explicit obj(const me& rhs);
83
84 protected:
92 explicit obj(const scope& shares, scope& owns);
93
94 public:
95 me& operator=(const me& rhs);
96
97 public:
98 using super::subs;
99 scope& subs() override;
100
101 tstr<nbicontainer> mySubs() const override;
102
103 state getState() const override;
104 void setState(state new1) override;
105
106 scope& getShares();
107 const scope& getShares() const BY_CONST_FUNC(getShares())
108 scope::super& getOwns();
109 const scope::super& getOwns() const BY_CONST_FUNC(getOwns())
110
111 const ntype& getType() const override;
112
117 void onCloneDeep(const clonable& from) override;
118
125 virtual node* getCallComplete();
126 const node* getCallComplete() const BY_CONST_FUNC(getCallComplete())
127
128 protected:
129 void _inFrame(frame& fr, const bicontainable* args) const override;
130 str _onBeforeCtor() override;
131
132 private:
133 me& _assign(const me& rhs);
134
135 private:
136 tstr<scope> _subs;
137 };
138
139#ifdef BY_BUILD_PLATFORM_IS_WINDOWS
140 // f***ing annoying another MSVC bug here:
141 // first of all, I'm so sorry to start my slang. but I couldn't help spitting it out after
142 // I used plenty hours of heading to the ground.
143 //
144 // I don't know why, but unless define below variable here, I'll observe that the
145 // member-variable
146 // '_subs' above was tried to be instantiated but failed.
147 // error message said that 'You've used undefined type "identifiertstr<scope>"'.
148 // however, MSVC definately knows about tstr<T> and scope types.
149 //
150 // clang, gcc didn't complain about this.
151 namespace {
152 static const inline scope a3;
153 }
154#endif
155} // namespace by
Function or object evaluation arguments.
Definition args.hpp:22
Base class for representing byeol objects.
Definition baseObj.hpp:73
Execution frame.
Definition frame.hpp:52
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
obj(const scope &shares, scope &owns)
Protected constructor for obj, allowing explicit separation of shares and owns.
obj()
Constructs an obj representing an "any" class.
obj(const me &rhs)
Copy constructor for obj.
obj(const scope &subs)
Constructs an obj from a given scope, typically representing its initial set of children.
Definition tnarr.hpp:9
to Top