
"Standards" advice needed
I am new to VC++ and I need a little advice.
I have created a program using the MFC AppWizard called DbUpdater. I
created 2 recordsets called CStockSet and CStockOptionSet. I wrote a
function that populates the Stock table called Populator. I put this
Populator function in my "app" class CDbUpdaterApp that was created by the
AppWizard (I used the StdReg sample in the MSDN library as an example,
that's where their "populator" is).
My question: Is this the "standard" place to put functions like this
(Populator)? I noticed that the AppWizard did NOT create a destructor for
the CDbUpdaterApp. This makes me think that the VC++ environment does not
"want" functions like this here because I can't do "finally" processing in a
destructor. Of course I could add a destructor but should I? I noticed in
the StdReg example that there IS a destructor, but with nothing in it.
It seems that good OOP would be to put functions like this in CStockSet or
somewhere else that is part of a "database" object.
What do you think? I really appreciate any advice anyone can give.
Thank you - Scott