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

Template type wrapper providing entry point for meta information 더 자세히 ...

#include <ttype.hpp>

by::ttype< T >에 대한 상속 다이어그램 :
by::ttypeBase< T, tmetaTypeDef< T, tifHasMetaTypeDef< T >::is >::is > by::type

추가로 상속된 멤버들

- by::ttypeBase< T, tmetaTypeDef< T, tifHasMetaTypeDef< T >::is >::is >(으)로부터 상속된 Public 멤버 함수
nbool isTemplate () const override
 
nbool isAbstract () const override
 
void * make () const override
 
ncnt size () const override
 
const typegetSuper () const override
 
const nboolisInit () const override
 
- by::type(으)로부터 상속된 Public 멤버 함수
virtual nbool operator== (const me &rhs) const
 Checks if two type objects represent the same type.
 
nbool operator!= (const me &rhs) const
 
virtual const std::string & getName () const
 
template<typename T >
T * makeAs () const
 
virtual nbool init ()
 Initializes type metadata and constructs class hierarchy
 
virtual nbool rel ()
 
const types & getLeafs () const
 Returns all most derived classes (leaf nodes) from this class
 
const types & getSubs () const
 
const types & getSupers () const
 
virtual nbool isSuper (const type &it) const
 Checks if this type is a super class of the given type
 
nbool isSuper (const type *it) const BY_SIDE_FUNC(isSuper)
 
template<typename T >
nbool isSuper () const
 
nbool isSub (const type &it) const
 Checks if this type is a sub class of the given type
 
nbool isSub (const type *it) const BY_SIDE_FUNC(isSub)
 
template<typename T >
nbool isSub () const
 
const typegetStatic () const BY_CONST_FUNC(_getStatic()) virtual const nchar *getMetaTypeName() const
 Get meta type name for efficient type checking
 
- by::ttypeBase< T, tmetaTypeDef< T, tifHasMetaTypeDef< T >::is >::is >(으)로부터 상속된 정적 Public 멤버 함수
static const me & get ()
 
- by::ttypeBase< T, tmetaTypeDef< T, tifHasMetaTypeDef< T >::is >::is >(으)로부터 상속된 Protected 멤버 함수
types & _getSupers () override
 
types & _getSubs () override
 
type_getStatic () const override
 
types ** _onGetLeafs () const override
 
void _onAddSubClass (const type &subClass) override
 
const std::string & _getNativeName () const override
 
- by::type(으)로부터 상속된 Protected 멤버 함수
void _setInit (nbool newState)
 
virtual void _onAddSubClass (const me &subClass)
 Hook method called when a new subclass is registered with this type.
 
void _setLeafs (types *newLeafs) const
 

상세한 설명

template<typename T>
class by::ttype< T >

Template type wrapper providing entry point for meta information

The entry point class for users to access meta information. Always create a new object when using ttype<T>. The entire design uses the monostate pattern, so creating objects each time shares values internally with no additional cost.

To understand the overall design of the meta module, first examine the core type class.

Remarks
Custom meta type injection If a class T defines typedef metaType MyType, then ttype<T> will be based on MyType instead of the default type class. This allows modules depending on meta to inject additional type information. For example, the core module uses this to inject ntype.

Usage

Basic usage pattern:

// Always create new ttype<T> objects
ttype<MyClass> t2; // Shares internal data with t1 via monostate pattern
// Access type information
cout << t1.getName() << "\n";
cout << t1.isAbstract() << "\n";
// Check type relationships
if(t1.isSuper<BaseClass>())
cout << "MyClass derives from BaseClass\n";
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34

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