로딩중...
검색중...
일치하는것 없음
by::autopod 클래스 참조

Automatic pod loading pod 더 자세히 ...

#include <autopod.hpp>

by::autopod에 대한 상속 다이어그램 :
by::pod by::podMakable by::obj by::baseObj by::node by::statable by::frameInteractable

Public 멤버 함수

scopesubs () override
 
state getState () const override
 
void setState (state new1) override
 
nbool isValid () const override
 
void rel () override
 
- by::pod(으)로부터 상속된 Public 멤버 함수
manifestgetManifest ()
 
const manifestgetManifest () const
 
void rel () override
 
void addDependent (me &dependent)
 Adds a dependent pod to this slot.
 
void addDependent (me *it) BY_SIDE_FUNC(addDependent)
 
const tnarr< me > & getDependents () const
 
- by::obj(으)로부터 상속된 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)
 
scopesubs () override
 
tstr< nbicontainermySubs () const override
 
state getState () const override
 
void setState (state new1) override
 
scopegetShares ()
 
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 nodegetCallComplete ()
 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 baseObjgetOrigin () const
 
void inFrame (const bicontainable *args) const override
 
void outFrame () const override
 
const srcgetSrc () const override
 
virtual const nodegetSubPod () const
 Retrieves a sub-pod represented as a node.
 
virtual baseObjmake () const
 
const modifiergetModifier () 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 scopesubs () 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 nodepromote (const node &it) const
 
const nodepromote (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 ()
 
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 멤버 함수

void _invalidate () override
 Protected virtual method to invalidate the pod.
 
- by::obj(으)로부터 상속된 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
 

상세한 설명

Automatic pod loading pod

Inherits from pod, so see the pod class first if unfamiliar with it.

The byeol language lazily and dynamically loads pods. autopod implements this feature. When podLoader finds a pod file, it creates appropriate podLoading objects and places them in autopod. Later, when accessing autopod to retrieve contained symbols, podLoading operates lazily to load symbols from the file.

See podLoader and podLoading for details.

Multiple podLoadings

podLoading can be retrieved from the native environment (dll or so files) or from the byeol runtime environment (.byeol files). Or both may exist in a single pod. Therefore, autopod doesn't hold just one podLoading but handles them as an array.

Dynamic Verification and Dependency Issues

We cannot simply assume all pods are verified and flawless and just load them. Sometimes pods need to be verified again to ensure correctness, so some autopods must parse or verify before loading symbols. The problem is that pods very frequently depend on other pods. If a dependent pod fails verification, that fact must propagate so all dependent pods also become unusable. This is solved by an algorithm controlling the four states described below.

autopod State

Has four states total with the following loading pipeline flow:

  • pod creation: podLoader creates pod objects and adds them to the system. At this time, dependencies between pods are also recorded.
  • RELEASED: Initial state, occupies no memory. Most unused pods belong here.
  • PARSED: When autopod is accessed, code is parsed for actual use. If parsing is unnecessary (optimized pod distribution or native pod), skips directly to LINKED state.
  • EXPANDED: after parsing resolve dependencies between symbols and expressions.
  • VERIFIED: After expanding, code integrity is verified. If verification fails, isValid is set to false.
  • LINKED: If verification failed, propagates that failure to all dependents referencing it.
  • INVALID: pod loading has been failed for some reason. it's unable to recover it.

Recursive Loading

pods depending on other pods is very common. Because autopod operates lazily, loading one pod may access another autopod, causing that autopod to also recursively enter the loading sequence. This checks for duplicate initialization or incomplete pipeline traversal.

RAII

autopod points to the _pod object defined in pod. This object contains symbols loaded from the external pod file. Since autopod is responsible for pod loading through podLoading, it's also responsible for symbol and pod destruction. Using RAII, when the autopod object is destroyed, all symbols are removed first, then the podLoading object is also removed to perform operations like closing so files. See podLoading for details.

is required to run an autopod

when you try to load pod by accessing subs() of autopod instance, it processes loading and access to errReport when exception occurs during that procedure. basically, accessing to subs() of autopod happen when you eval your AST. which means, you're required to prepare a thread. so autopod will use the errReport instance in current thread::getEx().

Remarks
this doesn't mean that a thread is needed when running a podLoader that creates autopods.

멤버 함수 문서화

◆ _invalidate()

void by::autopod::_invalidate ( )
overrideprotectedvirtual

Protected virtual method to invalidate the pod.

This method is typically called internally to mark the pod as invalid, making it unusable for further operations.

by::pod(으)로부터 재구현되었습니다.

◆ getState()

state by::autopod::getState ( ) const
overridevirtual

by::statable를 구현.

◆ isValid()

nbool by::autopod::isValid ( ) const
overridevirtual

by::pod(으)로부터 재구현되었습니다.

◆ rel()

void by::autopod::rel ( )
overridevirtual

Release all held resources and prepare for termination.

Remarks
Some classes won't be able to reinitialize after rel() is called.

by::node(으)로부터 재구현되었습니다.

◆ setState()

void by::autopod::setState ( state new1)
overridevirtual

by::statable를 구현.

◆ subs()

scope & by::autopod::subs ( )
overridevirtual

by::node를 구현.


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.:
to Top