You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timur Gafarov edited this page Apr 26, 2017
·
2 revisions
dlib.core.oop
Prototype-based OOP system for structs. Uses some template black magic to implement:
Multiple inheritance
Parametric polymorphism (struct interfaces)
Interface inheritance.
mixin template Inherit(PT...)
Inserts structs specified by PT type tuple as members and a dispatcher method that statically transfers any method calls and member accesses to corresponding child struct.
Free functions
bool implements(T, I)() - returns true if struct T has the same members and methods as struct I. This allows to use structs as static interfaces in generic code.