11 template<
bool Predicate,
typename TrueClass,
typename FalseClass>
14 template<
typename TrueClass,
typename FalseClass>
18 typedef TrueClass Result;
21 template<
typename TrueClass,
typename FalseClass>
25 typedef FalseClass Result;
31 enum { Value =
false };
35 template<
typename DerivedType,
typename BaseType>
44 static Yes& Test(BaseType*);
45 static Yes& Test(
const BaseType*);
49 static DerivedType* DerivedTypePtr() {
return nullptr; }
54 static constexpr bool Value =
sizeof(Test(DerivedTypePtr())) ==
sizeof(Yes);
56 static constexpr bool IsDerived = Value;
62 template<
class TClass>
70 template <
class TClassA>
91 decltype(ImplicitConv<TClassType*>(std::declval<U>()))
100 template <class TClassA, class = decltype(ImplicitConv<TClass*>((TClassA*)
nullptr))>
107 template <class TClassA, class = decltype(ImplicitConv<TClass*>((TClassA*)
nullptr))>
126 decltype(ImplicitConv<TClassType*>(std::declval<U>()))
138 if (!Class || !Class->IsChildOf(TClass::StaticClass()))
146 inline TClassType*
Get()
const
158 inline operator TClassType* ()
const
170 TBaseType* Result =
nullptr;
173 Result = Class->GetDefaultObject();
174 check(Result && Result->IsA(TClass::StaticClass()));
176 return (TClass*)Result;
194 template <
typename T>
197 enum { Value =
true };
Definition SubClassOf.h:12
Definition SubClassOf.h:64
TClassType * operator*() const
Definition SubClassOf.h:136
TClassType * operator->() const
Definition SubClassOf.h:152
TSubclassOf()
Definition SubClassOf.h:75
TSubclassOf(TClassType *From)
Definition SubClassOf.h:81
TClass * GetDefaultObject() const
Definition SubClassOf.h:168
TSubclassOf(const TSubclassOf< TClassA > &From)
Definition SubClassOf.h:101
TSubclassOf & operator=(TClassType *From)
Definition SubClassOf.h:115
TSubclassOf(U &&From)
Definition SubClassOf.h:94
TClassType * Get() const
Definition SubClassOf.h:146
The base class of all the game code relevant objects.
Definition Object.h:106
Definition SubClassOf.h:37
Definition SubClassOf.h:30