Struct VTable

Struct Documentation

struct VTable

VTable structure

Holds all fields and methods (both magic and regular) associated with a given type.

Public Members

std::map<std::string, std::pair<int, Type *>> fields = {}

Fields, encoded as named (int,type) pairs. The int part is the field’s offset in the type (e.g. 0 for the int in an {int, float} structure); the type part is, well, the type.

std::map<std::string, BaseFunc *> methods = {}

Standard methods, encoded as named BaseFunc instances.

std::vector<MagicMethod> magic = {}

Magic methods (i.e. those defined within the compiler)

std::vector<MagicOverload> overloads = {}

Magic methods overload (i.e. those written by the user)