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

Function definition in byeol language 더 자세히 ...

#include <func.hpp>

by::func에 대한 상속 다이어그램 :
by::baseFunc by::node by::frameInteractable by::ctor by::nestedFunc

Public 멤버 함수

 func (const modifier &mod, const funcType &type)
 
 func (const modifier &mod, const funcType &type, const blockExpr &newBlock)
 
 func (const modifier &mod, const funcType &type, const scope &subs, const blockExpr &newBlock)
 
const ntypegetType () const override
 
blockExprgetBlock ()
 
const blockExprgetBlock () const
 
void setBlock (const blockExpr &new1)
 
scopesubs () override
 
str eval (const args &a) override
 
void inFrame (const bicontainable *args) const override
 
void outFrame () const override
 
const baseObjgetOrigin () const override
 
endsgetEnds ()
 Gets the list of endExpr (defer-like statements) registered for this function.
 
const endsgetEnds () const BY_CONST_FUNC(getEnds()) void onCloneDeep(const clonable &from) override
 
nbool isAbstract () const
 
- by::baseFunc(으)로부터 상속된 Public 멤버 함수
priorType prioritize (const args &a) const override
 
virtual paramsgetParams ()
 
const paramsgetParams () const BY_CONST_FUNC(getParams())
 
virtual const nodegetRet () const
 
const srcgetSrc () const override
 
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 ()
 
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
 

정적 Public 속성

static const std::string LAMBDA_NAME = "@lambda"
 
static const std::string CTOR_NAME = "@ctor"
 
static const std::string GETTER_NAME = "@get"
 
static const std::string SETTER_NAME = "@set"
 
static const std::array< std::string, 4 > SPECIAL_FUNC_NAMES
 
- by::baseFunc(으)로부터 상속된 정적 Public 속성
static const std::string ME = "me"
 

Protected 멤버 함수

virtual str _interactFrame (node &meObj, scope &s, nidx exN)
 Protected virtual method to interact with the execution frame during function evaluation.
 
str _run (nidx exN)
 
- by::baseFunc(으)로부터 상속된 Protected 멤버 함수
void _setSrc (const src &newSrc) override
 
- by::node(으)로부터 상속된 Protected 멤버 함수
virtual str _onEvalSub (node &sub, const args &a)
 Protected virtual method for evaluating a sub-node.
 
void _setSrc (const src *it) BY_SIDE_FUNC(_setSrc)
 

Friends

class(ME(func, baseFunc), CLONE(func), VISIT()) typedef std coreInternal
 

추가로 상속된 멤버들

- by::baseFunc(으)로부터 상속된 정적 Public 멤버 함수
static nbool isFuncButNotClosure (const node &n)
 Checks if the given node represents a function that is not a closure.
 
static nbool isFuncButNotClosure (const node *it) BY_SIDE_FUNC(isFuncButNotClosure)
 
- by::node(으)로부터 상속된 Public 속성
T sub name
 
T sub nullptr
 
tpriorities< T > subAll< T > name
 
priorType prioritize it
 
priorType prioritize NO_MATCH
 
str eval name
 

상세한 설명

Function definition in byeol language

Represents a user-defined function with parameters, return type, and executable block. Extends baseFunc to provide concrete function implementation with actual code body. Manages function execution context, parameter handling, and return value processing.

Function Execution

When a func is evaluated:

  1. Creates a new frame and registers it with is required to run an autopod
  2. Binds arguments to parameters in the frame's scope
  3. Executes the blockExpr body
  4. Processes return value and cleans up the frame
  5. Runs any endExpr statements (cleanup code)

Frame Interaction

func implements frameInteractable, meaning it interacts with the execution frame stack. During execution, it calls inFrame() to register its scope and parameters, then outFrame() to clean up when execution completes.

Abstract Functions

func can be abstract (no body) when used in type definitions. Use isAbstract() to check. Abstract functions have no blockExpr and cannot be executed directly.

멤버 함수 문서화

◆ _interactFrame()

virtual str by::func::_interactFrame ( node & meObj,
scope & s,
nidx exN )
protectedvirtual

Protected virtual method to interact with the execution frame during function evaluation.

This method is a crucial internal mechanism for setting up the function's execution context within the current frame, managing me object and local scope.

매개변수
meObjThe "me" object (context) for this function call.
sThe scope associated with this function.
exNAn index related to exception handling.
반환값
An str object representing the result of the frame interaction.

by::nestedFunc에서 재구현되었습니다.

◆ eval()

str by::func::eval ( const args & a)
overridevirtual

by::node를 구현.

◆ getEnds()

ends & by::func::getEnds ( )

Gets the list of endExpr (defer-like statements) registered for this function.

반환값
A reference to the ends container holding the endExpr objects.

◆ getOrigin()

const baseObj & by::func::getOrigin ( ) const
overridevirtual

by::baseFunc를 구현.

◆ inFrame()

void by::func::inFrame ( const bicontainable * args) const
overridevirtual

◆ outFrame()

void by::func::outFrame ( ) const
overridevirtual

◆ subs()

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

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

멤버 데이터 문서화

◆ SPECIAL_FUNC_NAMES

const std::array<std::string, 4> by::func::SPECIAL_FUNC_NAMES
inlinestatic
초기값:
= {LAMBDA_NAME, CTOR_NAME, GETTER_NAME,
SETTER_NAME}

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