TypeInfo

TypeInfo class

Represents a particular type and provides information about it.

class TypeInfo

Methods

MethodDescription
void AddAttribute(const ObjectPtr&)Adds the specified attribute to the list of type’s attributes.
void AddDefaultConstructor()Sets default constructor for the type T.
void AddDefaultConstructor(DefaultConstructor)Sets default constructor by the functor that creates class instanse.
void AddMember(const SharedPtr<System::Reflection::MemberInfo>&)Adds the specified member to the list of type’s members.
static const TypeInfo& BoxedValueType()Provides unique TypeInfo structure for BoxedValue type to be shared by multiple Boxed* classes.
bool Equals(const TypeInfo&) const
System::SharedPtr<System::Reflection::Assembly> get_Assembly() constNOT IMPLEMENTED. Returns a pointer to the assembly in which the type represented by the current object is declared.
String get_AssemblyQualifiedName() constNOT IMPLEMENTED. Returns the fully qualified name including the assembly name of the type represented by the current object.
TypeInfo get_BaseType() constReturns base type descritor.
bool get_ContainsGenericParameters() constGets a value indicating whether the current Type object has type parameters that have not been replaced by specific types.
ArrayPtr<SharedPtr<System::Reflection::MemberInfo>> get_DeclaredMember(const String&) constGets list of the members with specified name.
String get_FullName() constReturns the fully qualified name (but without the assembly name) of the type represented by the current object.
ArrayPtr<TypeInfo> get_GenericTypeArguments() constGets an array of the generic type arguments for this type.
bool get_IsAbstract() constGets a value indicating whether the Type is abstract and must be overridden.
bool get_IsArray() constGets a value that indicates whether the type is an array.
bool get_IsClass() constGets a value indicating whether the Type is a class or a delegate; that is, not a value type or interface.
bool get_IsEnum() constGets a value indicating whether the current Type represents an enumeration.
bool get_IsGenericType() const
bool get_IsGenericTypeDefinition() constGets a value indicating whether the current Type represents a generic type definition, from which other generic types can be constructed.
bool get_IsInterface() constGets a value indicating whether the Type is an interface; that is, not a class or a value type.
bool get_IsSealed() constGets a value indicating whether the Type is declared sealed.
bool get_IsValueType() constGets a value indicating whether the Type is a value type.
bool get_IsVisible() constGets a value indicating whether the Type can be accessed by code outside the assembly.
String get_Name() constReturns the name of the type represented by the current object.
String get_Namespace() constGets the namespace of the Type.
SharedPtr<System::Reflection::ConstructorInfo> GetConstructor(const ArrayPtr<TypeInfo>&) constSearches for a public instance constructor whose parameters match the types in the specified array.
ArrayPtr<SharedPtr<System::Reflection::ConstructorInfo>> GetConstructors(System::Reflection::BindingFlags) constsearches for the constructors defined for the current Type, using the specified BindingFlags.
ArrayPtr<SharedPtr<System::Reflection::ConstructorInfo>> GetConstructors() constReturns all the public constructors defined for the current Type.
ObjectPtr GetCustomAttribute(const TypeInfo&) constSearches for the custom attribute applied having the specified type and applied to the type reprsented by the current object.
ArrayPtr<ObjectPtr> GetCustomAttributes() constReturns an array containing objects that represent all custom attributes applied to the type.
ArrayPtr<ObjectPtr> GetCustomAttributes(const TypeInfo&, bool) constReturns an array containing objects that represent specific attributes applied to the type.
TypeInfo GetElementType() constNOT IMPLEMENTED.
SharedPtr<System::Reflection::FieldInfo> GetField(const System::String&, System::Reflection::BindingFlags) constSearches for the specified field, using the specified binding constraints.
ArrayPtr<SharedPtr<System::Reflection::FieldInfo>> GetFields(System::Reflection::BindingFlags) constSearches for the fields defined for the current Type, using the specified binding constraints.
ArrayPtr<TypeInfo> GetGenericArguments() constGets an array of the generic type arguments for this type.
int GetHashCode() constReturns a hash code associated with this instance.
ArrayPtr<TypeInfo> GetInterfaces() constGets all the interfaces implemented or inherited by the current Type.
ArrayPtr<SharedPtr<System::Reflection::MemberInfo>> GetMember(const String&) constGets list of the members with specified name.
SharedPtr<System::Reflection::MethodInfo> GetMethod(const String&) constGets method with specified name.
ArrayPtr<SharedPtr<System::Reflection::PropertyInfo>> GetProperties() constReturns all the public properties of the current Type.
ArrayPtr<SharedPtr<System::Reflection::PropertyInfo>> GetProperties(System::Reflection::BindingFlags) constSearches for the properties of the current Type, using the specified binding constraints.
TypeInfo GetTemplParamType() constGets template parameter type descritor.
uint32_t Hash() constReturns a hash value associated with the type represented by the current object.
bool IsAssignableFrom(const TypeInfo&) constDetermines whether an instance of a specified type can be assigned to a variable of the current type.
bool IsDefined(const TypeInfo&, bool) constNOT IMPLEMENTED. Indicates whether one or more attributes of the specified type or of its derived types is applied to this member.
bool IsInstanceOfType(const SharedPtr<Object>&) constDetermines whether the specified object is an instance of the current type.
bool IsSubclassOf(const TypeInfo&) constDetermines whether the type represented by the current object is a subclass of the specified class.
bool operator!=(const TypeInfo&) constDetermines if the current and the specified TypeInfo objects are not equal.
bool operator!=(std::nullptr_t) constDetermines if the current TypeInfo object is not a null-object, i.e. it represents some type.
bool operator==(const TypeInfo&) constDetermines if the current and the specified TypeInfo objects are equal.
bool operator==(std::nullptr_t) constDetermines if the current TypeInfo object is a null-object, i.e. does not represent any type.
void reset()Sets TypeInfo to null.
void set_IsValueType(bool)Sets a value indicating whether the Type is a value type.
void SetBaseType(GetTypeInfoFunPtr)Sets base type descritor.
void SetTemplParamType(const TypeInfo&)Sets template parameter type descritor.
static uint32_t StringHash(const char_t *)Calculates hash for specified string.
String ToString() constReturns a string containing the name of the type represented by the current object.
static const TypeInfo& Type()Returns a TypeInfo object that represent TypeInfo class.
TypeInfo()Default constructor (no type is set).
TypeInfo(std::nullptr_t)Null object constructor (no type is set).
TypeInfo(const char_t *)Constructor.
TypeInfo(const char_t *, uint32_t)Constructor.
TypeInfo(const std::type_info&)Constructor.

Fields

FieldDescription
static EmptyTypeConstant representing empty list of TypeInfo.
static EmptyTypesConstant representing empty list of TypeInfo.

Typedefs

TypedefDescription
DefaultConstructorFunction pointer to construct type.

See Also