From: Olivier M. <om...@ti...> - 2005-08-02 09:18:33
|
On 1/08/2005 23:32 GMT+1, Nando Dessena wrote: ><bigsnip /> > > >O> Logically, we will then get our Database and Service object out of that >O> Context instead of out of nowhere as with DatabaseFactory. > >OK. > >O> DatabaseFactory could take an optional additional parameter to get a >O> context, but I really don't like extending that way and prefer to >O> refactor code a bit more like with the above Context::NewDatabase. > >How do you create a Context? Is there a factory somewhere? > > For now it's coming from itself, somehow a bootstrap is needed. Consider there is a static IContext* NewContext(); in the class : Context ctx = Context::NewContext(); But regarding the bigsnip above, please understand that at this time even the class name Context and its interface and the talk about Config are moving concepts and names. Be assured that the goal is not to know about the config file itself, but to know about where to attempt to load fbclient.dll from. While at the same time taking into account that on some platforms and configurations there is no ".dll" to load (statically linked to application). I'll come back with this on ibpp-discuss list when the dust will settle... ;-) -- Olivier Mascia |