|Mark Smith (mark) wrote in dw_dev_training,|
implements Foo, Bar;
class MyRealClass inherits from MyBase;
class MyOtherClass inherits from MyBase;
Elsewhere, you can say that something takes a MyBase and in reality, someone can pass it a MyRealClass. For the purpose of that function, you treat MyRealClass as MyBase... it is polymorphic. I.e., has several forms. But when you call Foo on it, it's actually calling MyRealClass::Foo, not MyBase::Foo. Even though the function in question doesn't know what a MyRealClass is.
(This is an example of late/dynamic binding, an implementation of polymorphism, -- read more at http://en.wikipedia.org/wiki/Dynamic_bi