P
phl
hi,
I am kind of confused aobut interfaces and abstract classes.
In short as I understand it, an interface is like a contract between
the class and the interface, so that certain funtions must be
implemented. So if you have a class which inherits base class that
inherts an interface, then your classes will have a standard. I suppose
you can also check for interface at run time say when dll is loaded and
see if it implememts whats required by interface also before loading
it.
I have never used abstract classes, as I understand it, its for
creating a base class with function without any implementation, so that
it can be done in your inherited class. I am confused why you would
need this, as you already can override functions and also theres
interfaces.
I have probably misunderstood something, can someone please explain.
The reason i am interested is because I am writing a system which i
hope to be well maintained in the future. I want other people to add
classes with specific implementations.
thanks
I am kind of confused aobut interfaces and abstract classes.
In short as I understand it, an interface is like a contract between
the class and the interface, so that certain funtions must be
implemented. So if you have a class which inherits base class that
inherts an interface, then your classes will have a standard. I suppose
you can also check for interface at run time say when dll is loaded and
see if it implememts whats required by interface also before loading
it.
I have never used abstract classes, as I understand it, its for
creating a base class with function without any implementation, so that
it can be done in your inherited class. I am confused why you would
need this, as you already can override functions and also theres
interfaces.
I have probably misunderstood something, can someone please explain.
The reason i am interested is because I am writing a system which i
hope to be well maintained in the future. I want other people to add
classes with specific implementations.
thanks