Question to Interfaces/Objectcatalogue



We assume, that our VB6-Project has reached the maximum numbers of Public
members (the "Not enough Memory" Problem).

We have an ActiveX-DLL, with many classes and every class exports a lot of
Members. The classes are used in the Database-Layer and the code is completly
generated with a tool. This tool creates for every Table and View in the
Database a CodeModule in the ActiveX-DLL.

Many Members in these Classes has identical signatures (exact 29 Members).
The Implementation is different - of course.
e.g.: Clear(), Save(), Load(), IsModified(), ...

Our Idea is now to write an Interface "IBaseTable", which contains all these
Members. The Classes implements the interface and offers only a Member "Base":

....
Implements IBaseTable

Public Property Base() As IBaseTable
Set Base = Me
End Property
....

Converting the existing code would be much more easier with this Member "Base"

---------------------
And now the question:
We have 414 classes in the DLL. Every Class contains 29 "identical" Members.
Therefore we cut down the Public Members at (414-1) x 29 = 11977 Members!

Is this a correct Bill?
What do you think?


Thanks in advance for answers and suggestions,

Peter.
.


Loading