|
|
@@ -36,22 +36,15 @@ class URHO3D_API TypeInfo
|
|
|
{
|
|
|
public:
|
|
|
/// Construct.
|
|
|
- TypeInfo(const char* typeName, const TypeInfo* baseTypeInfo) :
|
|
|
- type_(typeName),
|
|
|
- typeName_(typeName),
|
|
|
- baseTypeInfo_(baseTypeInfo)
|
|
|
- {
|
|
|
- }
|
|
|
+ TypeInfo(const char* typeName, const TypeInfo* baseTypeInfo);
|
|
|
/// Destruct.
|
|
|
- ~TypeInfo()
|
|
|
- {
|
|
|
- }
|
|
|
+ ~TypeInfo();
|
|
|
|
|
|
- /// Return is type of.
|
|
|
- bool IsTypeOf(StringHash theType) const;
|
|
|
- /// Return is type of.
|
|
|
- bool IsTypeOf(const TypeInfo* theTypeInfo) const;
|
|
|
- /// Return is type of.
|
|
|
+ /// Check current type is type of specified type.
|
|
|
+ bool IsTypeOf(StringHash type) const;
|
|
|
+ /// Check current type is type of specified type.
|
|
|
+ bool IsTypeOf(const TypeInfo* typeInfo) const;
|
|
|
+ /// Check current type is type of specified class type.
|
|
|
template<typename T> bool IsTypeOf() const { return IsTypeOf(T::GetTypeInfoStatic()); }
|
|
|
|
|
|
/// Return type.
|
|
|
@@ -103,17 +96,17 @@ public:
|
|
|
|
|
|
/// Return type info static.
|
|
|
static const TypeInfo* GetTypeInfoStatic() { return 0; }
|
|
|
- /// Check current type is type of.
|
|
|
+ /// Check current type is type of specified type.
|
|
|
static bool IsTypeOf(StringHash type);
|
|
|
- /// Check current type is type of.
|
|
|
+ /// Check current type is type of specified type.
|
|
|
static bool IsTypeOf(const TypeInfo* typeInfo);
|
|
|
- /// Check current type is type of T.
|
|
|
+ /// Check current type is type of specified class.
|
|
|
template<typename T> static bool IsTypeOf() { return IsTypeOf(T::GetTypeInfoStatic()); }
|
|
|
- /// Check current instance is type of.
|
|
|
+ /// Check current instance is type of specified type.
|
|
|
bool IsInstanceOf(StringHash type) const;
|
|
|
- /// Check current instance is type of.
|
|
|
+ /// Check current instance is type of specified type.
|
|
|
bool IsInstanceOf(const TypeInfo* typeInfo) const;
|
|
|
- /// Check current instance is type of T.
|
|
|
+ /// Check current instance is type of specified class.
|
|
|
template<typename T> bool IsInstanceOf() const { return IsInstanceOf(T::GetTypeInfoStatic()); }
|
|
|
|
|
|
/// Subscribe to an event that can be sent by any sender.
|