[sword-devel] C++ design question

Torsten Uhlmann sword-devel@crosswire.org
21 Jan 2000 20:33:49 +0100

I want to bother you with some boring C++ stuff :)

You know we currently totally redesign BibleTime in order to first
support MDI, KDE2 and secondly to get a much more flexible backend. The
design will allow us to view text files, audios etc. as modules and have
them along with the SWORD modules. Anyway, simple question yet I can't
find a good answer.

I have created a class CData which will hold the result of a query to a
module, module type, data type and used key, so it can hold qiet some
data. I don't know what is the proper way of returning such an
object. Possibilities are:

CData getText(key) or
getText(key, CData&) or
CData *getText(key)

In the last one the caller has to destroy the CData object itself.
I want to do it right this time so I would like you to give me advise!

Thanks for your response...


best regards,
Torsten Uhlmann


Wise men still seek him!