@head
@module reflect
@title reflect: Reflection operations
@fun GetMember(instance, id as Str) as dynamic
@desc Return a member of an instance. The id argument must be a
Str object. Raise MemberError if the member is
not defined. Example:
@example
var range = 2 to 5
GetMember(range, "start") -- 2
@end
@end
@fun SetMember(instance, id as Str, value)
@desc Set the value of a member of an instance. The id argument must
be a Str object. Raise MemberError if the member
is not defined or if it is a method or a constant.
@end
@fun HasMember(instance, id as Str) as Boolean
@desc Return a boolean indicating whether an instance has a specific member.
The id argument must be a Str object.
@end
@fun TypeOf(instance) as Type
@desc Return the type object corresponding to the class of the argument.
TypeOf works for all values except nil;
if the argument is nil, raise a @ref{ValueError} exception.
The returned object is a type object bound to the relevant class
definition. Examples:
@example
TypeOf(1) -- std::Int
TypeOf([1, 2]) -- std::Array
@end
@see @ref{std::TypeName}
@end
@end