Skip to content

ITypeLibrary

Peder Holt edited this page Oct 23, 2022 · 1 revision

ITypeLibrary is a collection of all the types in your system. It has the following important members:

class ITypeLibrary {
public:
    virtual ~ITypeLibrary() {}
    //Create a new type
    virtual TypePointer CreateType(const std::type_info& typeInfo,const std::string& name) = 0;
    //Lookup an existing type
    virtual TypePointer LookupType(const std::type_index& typeInfo) const = 0;
    //Get a list of all types in the system
    virtual std::map<std::type_index,TypePointer> GetAllTypes() const = 0;
    //Get the type conversion graph, a graph telling how different types are related
    virtual TypeConversions::ConversionGraphPointer GetConversionGraph() const = 0;
    //...
};
Clone this wiki locally