로딩중...
검색중...
일치하는것 없음
by::noWrap< T > 구조체 템플릿 참조

Rich logging support with polymorphic type conversion 더 자세히 ...

#include <richLog.hpp>

Public 멤버 함수

 noWrap (T rhs)
 
unwrap () const
 

Public 속성

data
 

상세한 설명

template<typename T>
struct by::noWrap< T >

Rich logging support with polymorphic type conversion

Uses polymorphism to convert format specifier arguments into appropriate types for logging. Since the clog module is positioned at a lower level in the architecture, it cannot know what classes depend on it. Therefore, richLog is defined in each module to specify how to convert classes in that module to strings.

richLog consists of two main parts: convert and wrap.

convert

Defines how to convert each module's classes into types that are easy to log. Callers simply pass their concrete type to convert(), and the most appropriate convert is called via overloading. This means you can define both generic convert() and type-specific convert() simultaneously. A notable example is convert(void*), which is called when no other T* matches.

wrap

Wrap is needed to unpack values received from convert() so they can pass through variadic arguments. Variadic argument functions can only pass scalar types or T*, not values. Since some convert() functions create new values that need to be passed by value, wrap is essential as long as logger::log() uses variadic arguments.

convert() functions return either strWrap or noWrap<T>. noWrap returns the received value as-is without processing, while strWrap internally calls std::string::c_str().


이 구조체에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: