로딩중...
검색중...
일치하는것 없음
by::tworker< R, T > 클래스 템플릿 참조abstract

Base worker template for processing tasks 더 자세히 ...

#include <tworker.hpp>

by::tworker< R, T >에 대한 상속 다이어그램 :

Public 타입

enum  logFlag {
  LOG_ON_EX = 1 , DUMP_ON_EX = 1 << 1 , GUARD = 1 << 2 , INTERNAL = 1 << 3 ,
  LOG_ON_END = 1 << 4 , DUMP_ON_END = 1 << 5 , DEFAULT = LOG_ON_EX
}
 

Public 멤버 함수

 tworker (const errReport &rpt)
 
errReportgetReport ()
 
const errReportgetReport () const BY_CONST_FUNC(getReport()) me &setReport(errReport &rpt)
 
me & setFlag (nint newFlag)
 
me & addFlag (nint flag)
 
me & delFlag (nint clear)
 
nbool isFlag (nint flag) const
 
nint getFlag () const
 
me & setTask (const T &root)
 
me & setTask (const T *it) BY_SIDE_FUNC(it
 
T * getTask ()
 
const T * getTask () const BY_CONST_FUNC(getTask()) virtual void rel()
 
R work ()
 
const areagetArea () const BY_CONST_FUNC(_getArea()) nbool isOk() const
 

Public 속성

me setTask it
 
me setTask * this
 

Protected 멤버 함수

virtual void _prepare ()
 Protected virtual method for preparation before starting the work.
 
void _report (baseErr *e)
 
virtual void _onEndWork ()
 Protected virtual method called after the work is completed.
 
virtual R _onWork ()=0
 
area_getArea ()
 
void _onEndErrReport (const errReport &rpt) const
 

Friends

template<typename R1 , typename T1 >
struct workerAdapter
 

상세한 설명

template<typename R, typename T>
class by::tworker< R, T >

Base worker template for processing tasks

tworker is optimized for performing large batch operations. It can collect errors that occur during this process with errReport and can change some operations during work by specifying various flags. Classes that perform large operations such as verifier, visitor, and parser run based on tworker.

Work and Task

tworker exists literally to work(). At this time, the input that is the target of the work is called task. _prepare() is called before work and _onEndWork() is called when work ends.

errReport

Since large amounts of work must be performed with deep function depth, errReport must be used to sufficiently detect errors deep in the call stack. tworker can receive an errReport object from outside through setReport(). If errReport is not allocated, dummyErrReport is used instead.

Log Flag

tworker has various flags for logging during work.

  • LOG_ON_EX: Leaves a one-line log when an error occurs
  • DUMP_ON_EX: Dumps the err object including callstack when an error occurs
  • GUARD: Logs when function starts and ends
  • INTERNAL: Logs all logs except errors or GUARD
  • LOG_ON_END: When work is fully completed, leaves a one-line log for all collected errors with log()
  • DUMP_ON_END: When work is fully completed, dump() all collected errors

멤버 함수 문서화

◆ _onEndWork()

template<typename R , typename T >
virtual void by::tworker< R, T >::_onEndWork ( )
protectedvirtual

Protected virtual method called after the work is completed.

This hook allows derived classes to perform any necessary cleanup or finalization after _onWork() has finished.

by::parser, by::verifier에서 재구현되었습니다.

◆ _onWork()

template<typename R , typename T >
virtual R by::tworker< R, T >::_onWork ( )
protectedpure virtual

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

◆ _prepare()

template<typename R , typename T >
virtual void by::tworker< R, T >::_prepare ( )
protectedvirtual

Protected virtual method for preparation before starting the work.

This hook allows derived classes to perform any necessary setup or initialization before _onWork() is invoked.

by::starter, by::parser, by::verifier, by::visitor에서 재구현되었습니다.


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