Byeol runtime environment object 더 자세히 ...
#include <obj.hpp>
Public 멤버 함수 | |
| obj () | |
| Constructs an obj representing an "any" class. | |
| obj (const scope &subs) | |
| Constructs an obj from a given scope, typically representing its initial set of children. | |
| obj (const me &rhs) | |
| Copy constructor for obj. | |
| me & | operator= (const me &rhs) |
| scope & | subs () override |
| tstr< nbicontainer > | mySubs () const override |
| state | getState () const override |
| void | setState (state new1) override |
| scope & | getShares () |
| const scope &getShares() const BY_CONST_FUNC(getShares()) scope const scope::super & | getOwns () const BY_CONST_FUNC(getOwns()) const ntype &getType() const override |
| void | onCloneDeep (const clonable &from) override |
| Performs a deep clone operation, copying the contents from another clonable object. | |
| virtual node * | getCallComplete () |
| Returns the node responsible for completing the object's construction or initialization calls. | |
| const node *getCallComplete() const BY_CONST_FUNC(getCallComplete()) protected str | _onBeforeCtor () override |
| Hook method called before the object's constructor is fully executed. | |
by::baseObj(으)로부터 상속된 Public 멤버 함수 | |
| str | eval (const args &a) override |
| priorType | prioritize (const args &a) const override |
| virtual const baseObj & | getOrigin () const |
| void | inFrame (const bicontainable *args) const override |
| void | outFrame () const override |
| const src & | getSrc () const override |
| virtual const node & | getSubPod () const |
| Retrieves a sub-pod represented as a node. | |
| virtual baseObj * | make () const |
| const modifier & | getModifier () const override |
by::node(으)로부터 상속된 Public 멤버 함수 | |
| me & | operator[] (const std::string &name) |
| const me & | operator[] (const std::string &name) const BY_CONST_FUNC(operator[](name)) |
| me & | operator[] (const std::string *it) |
| const me & | operator[] (const std::string *it) const BY_CONST_FUNC(operator[](it)) |
| me & | operator[] (const nchar *name) |
| const me & | operator[] (const nchar *name) const BY_CONST_FUNC(operator[](name)) |
| nbool | in (const node &elem) const |
| nbool | in (const node *elem) const |
| const scope & | subs () const BY_CONST_FUNC(subs()) virtual tstr< nbicontainer > mySubs() const |
| Returns a tstr to a container of immediate sub-nodes (excluding inherited or chained ones). | |
| const node * | promote (const node &it) const |
| const node * | promote (const node *it) const BY_SIDE_FUNC(promote) |
| template<typename T > | |
| T * | sub (std::function< nbool(const std::string &, const T &)> l) |
| template<typename T > | |
| const T * | sub (std::function< nbool(const std::string &, const T &)> l) const BY_CONST_FUNC(sub< T >(l)) template< typename T |
| template<typename T = me> | |
| const T * | sub () const BY_CONST_FUNC(sub< T >()) template< typename T |
| template<typename T = me> | |
| T * | sub (const std::string *it) BY_SIDE_FUNC(sub) |
| template<typename T = me> | |
| const T * | sub (const std::string &name) const BY_CONST_FUNC(sub< T >(name)) template< typename T |
| template<typename T = me> | |
| T * | sub (const std::string *name, const args &a) BY_SIDE_FUNC(name |
| template<typename T = me> | |
| const T * | sub (const std::string &name, const args &a) const BY_CONST_FUNC(sub< T >(name |
| template<typename T = me> | |
| const T a const T * | sub (const std::string *name, const args &a) const BY_CONST_FUNC(sub< T >(name |
| template<typename T > | |
| const T a const T a tnarr< T, strTactic > | subAll (std::function< nbool(const std::string &, const T &)> l) const |
| template<typename T = me> | |
| tnarr< T, strTactic > | subAll () const |
| template<typename T = me> | |
| tpriorities< T > | subAll (const std::string &name) const |
| template<typename T = me> | |
| tpriorities< T > | subAll (const std::string *it) const BY_SIDE_FUNC(subAll< T >) template< typename T |
| template<typename T = me> | |
| tpriorities< T > | subAll (const std::string &name, const args &a) const |
| template<typename T = me> | |
| tpriorities< T > | subAll (const std::string *name, const args *a) const BY_SIDE_FUNC(name |
| tpriorities< T > subAll< T > | tpriorities ()) |
| template<typename T = me> | |
| tpriorities< T > | subAll (const std::string *name, const args &a) const BY_SIDE_FUNC(name |
| tpriorities< T > subAll< T > | tpriorities ()) |
| bool | canEval (const args &a) const |
| priorType | prioritize (const args *it) const BY_SIDE_FUNC(it |
| str | eval (const args *it) BY_SIDE_FUNC(eval) |
| str | eval (const std::string &name, const args &a) |
| str | eval (const std::string &name, const args *a) BY_SIDE_FUNC(a |
| str | eval (name, a) |
| str | str ()) |
| str | eval (const std::string *name, const args &a) BY_SIDE_FUNC(name |
| str eval | str ()) |
| str | eval (const std::string *name, const args *a) BY_SIDE_FUNC(name &&a |
| str eval | str ()) |
| str | eval (const std::string &name) |
| str | eval (const std::string *it) BY_SIDE_FUNC(eval) |
| str | eval () |
| virtual void | rel () |
| template<typename T > | |
| nbool | is () const |
| nbool | is (const typeProvidable &to) const |
| nbool | is (const typeProvidable *it) const BY_SIDE_FUNC(is) |
| nbool | is (const type &to) const |
| nbool | is (const type *it) const BY_SIDE_FUNC(is) |
| template<typename T > | |
| tstr< T > | as () const |
| str | as (const typeProvidable &to) const |
| str | as (const typeProvidable *it) const BY_SIDE_FUNC(as) |
| str | as (const type &to) const |
| str | as (const type *it) const BY_SIDE_FUNC(as) |
| template<typename T > | |
| nbool | isImpli () const |
| virtual nbool | isImpli (const type &to) const |
| nbool | isImpli (const typeProvidable &to) const |
| nbool | isImpli (const typeProvidable *it) const BY_SIDE_FUNC(isImpli) |
| template<typename T > | |
| tstr< T > | asImpli () const |
| virtual str | asImpli (const type &to) const |
| str | asImpli (const typeProvidable &to) const |
| str | asImpli (const typeProvidable *it) const BY_SIDE_FUNC(asImpli) |
| virtual nbool | isComplete () const |
| virtual str | infer () const |
| virtual void | accept (const visitInfo &i, visitor &v) |
| void | inFrame (const bicontainable *args) const override |
| void | outFrame () const override |
| virtual void | inFrame (const bicontainable *args) const=0 |
| void | inFrame () const |
| virtual void | outFrame () const=0 |
by::frameInteractable(으)로부터 상속된 Public 멤버 함수 | |
| void | inFrame () const |
Protected 멤버 함수 | |
| obj (const scope &shares, scope &owns) | |
| Protected constructor for obj, allowing explicit separation of shares and owns. | |
by::baseObj(으)로부터 상속된 Protected 멤버 함수 | |
| baseObj ()=default | |
| Default constructor for baseObj. | |
| baseObj (const baseObj *org, nbool isScripted) | |
| Constructs a baseObj from an existing origin object. | |
| str | _onEvalSub (node &sub, const args &a) override |
| Protected virtual method for evaluating a sub-node. | |
| void | _setSrc (const src &s) override |
| virtual void | _inFrame (frame &fr, const bicontainable *args) const |
| Enters this object's frame into the current execution stack. | |
| virtual void | _setType (const mgdType &new1) |
| Sets the script type for this base object. | |
| virtual void | _setModifier (const modifier &mod) |
by::node(으)로부터 상속된 Protected 멤버 함수 | |
| void | _setSrc (const src *it) BY_SIDE_FUNC(_setSrc) |
추가로 상속된 멤버들 | |
by::node(으)로부터 상속된 Public 속성 | |
| T sub | name |
| T sub | nullptr |
| tpriorities< T > subAll< T > | name |
| priorType prioritize | it |
| priorType prioritize | NO_MATCH |
| str eval | name |
by::baseObj(으)로부터 상속된 정적 Public 속성 | |
| static const std::string | COMMON_NAME = "@common" |
| static const std::string | EXPAND_NAME = "@expand" |
by::baseObj(으)로부터 상속된 Protected 속성 | |
| tstr< baseObj > | _org |
Byeol runtime environment object
The class representing objects in the byeol runtime environment. Extends baseObj's functionality to add scope handling and concepts for shares and owns needed only in the byeol runtime environment.
In C++, types are represented by classes, but byeol has no class concept. Since there's no distinction between objects and classes, obj itself is the type. For example, look at this C++ code:
As shown, in the byeol runtime environment, objects are just obj created via two paths: obj defined with def and obj cloned from obj. Since both are used as types, distinguishing them is meaningless.
For baseObj, since the base is a C++ native class, object creation also occurs through C++'s new and constructors, simultaneously creating member variables defined in that class. But what about writing byeol code? In the byeol runtime environment, obj representing objects can have properties like name in the example above. Since defining objects in byeol runtime environment is cloning objects from origin objects, calling clone() on origin also copies properties and funcs. At this time, funcs only need one in the system and don't need to be copied each time a func object is created. Conversely, properties like name must be copied with different values per instance. To handle this efficiently, parts shared among objs of the same type are separated into shares, and parts that get copied are separated into owns. Therefore, when obj's clone() occurs, shares only gets references to shares from the original origin, and only the owns part performs clone.
str, int, and other scalar types are all immutable types. This stems from byeol's calling strategy following by object, which operates like C-family languages like Java and C# commonly use: references to objects are shallow copied, raw types are deep copied. node is just node, and obj shouldn't know whether the node it must insert is an immutable type. Breaking this also breaks polymorphism. So whether to copy an incoming object or just point to a reference is determined through immutableTactic.
See immutableTactic or tscalar for details.
Constructs an obj from a given scope, typically representing its initial set of children.
| subs | The scope containing the initial sub-nodes (children) for this object. |
|
explicit |
Copy constructor for obj.
| rhs | The obj to copy from. |
Protected constructor for obj, allowing explicit separation of shares and owns.
This constructor is used internally to initialize an obj with distinct shared and owned scopes, which is fundamental to the object model's efficiency.
| shares | The scope containing shared properties and functions. |
| owns | The scope containing owned (instance-specific) properties. |
|
overridevirtual |
Hook method called before the object's constructor is fully executed.
This protected virtual method provides a mechanism for derived classes or the runtime to inject logic or perform setup just before the main constructor body.
str object representing a pre-constructor state or result. by::baseObj(으)로부터 재구현되었습니다.
Returns the node responsible for completing the object's construction or initialization calls.
In the Byeol language, object construction might involve specific nodes that handle the final steps or logic after the object is initially created.
by::origin에서 재구현되었습니다.
|
overridevirtual |
by::baseObj(으)로부터 재구현되었습니다.
|
override |
Performs a deep clone operation, copying the contents from another clonable object.
| from | The clonable object to copy from. |
|
overridevirtual |
by::baseObj(으)로부터 재구현되었습니다.
|
overridevirtual |
by::baseObj(으)로부터 재구현되었습니다.