-
Notifications
You must be signed in to change notification settings - Fork 0
IType
Peder Holt edited this page Oct 23, 2022
·
1 revision
IType represents a single type (Class, enum, struct, enum class, native type such as int)
class IType
{
public:
//The name of a type
virtual std::string GetName() const = 0;
//Prepares to call a method with a given name given a set of arguments. This function performs overload resolution.
virtual Members::MemberWithArgumentsPointer PrepareInvoke(const std::string& name, const std::vector<Variants::Variant>& args, Members::MemberType type = Members::MemberType::TypeAll) const = 0;
//Lookup a member with a given name on this type.
virtual Members::MemberPointer Lookup(const std::string& name) const = 0;
//Lookup a member with a given name on this type and on all base classes.
virtual Members::MemberPointer Lookup(const std::string& name, const Variants::Variant& object) const = 0;
//Returns the type conversion graph.
virtual TypeConversions::ConversionGraphPointer GetConversionGraph() const = 0;
//Returns all members on this type (ignores base classes)
virtual std::map<std::string, Members::MemberPointer> GetAllMembers() const = 0;
//Returns a list of all members in the order they were registered.
virtual std::list<std::string> GetUnsortedMembers() const = 0;
//Returns attributes (used to store additional metadata)
virtual const Attributes::AttributeCollection& GetAttributeCollection() const = 0;
virtual Attributes::AttributeCollection& GetAttributeCollection() = 0;
//Return a list of all direct base classes
virtual std::set<std::type_index> GetBaseTypes() const = 0;
//Return a list of all direct derived classes
virtual std::set<std::type_index> GetDerivedTypes() const = 0;
//Return a list of all classes united with this class (see separate documentation about this)
virtual std::set<std::type_index> GetUniteTypes() const = 0;
//Returns the std::type_info representing this type.
virtual const std::type_info& GetType() const = 0;
//Returns an extended type info representing how this object should be stored. (as a pointer/smart pointer or as a value)
virtual Types::DecoratedTypeInfo GetStorageType() const = 0;
//...
};