|
Boost Users : |
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2008-01-23 06:41:21
Ovanes Markarian wrote:
> Hello,
>
> I am currently evaluating boost.singleton for our application. I hope it
> is not too late to write a review. As I understood from the docs,
> Singleton instance is immediately (when all global and static variables
> are initilized) created. In our context we need singleton to be created
> on first request (as it is described in GoF).
Singleton is created on demand.
>
> The problem is following: Our application must parse config file which
> is accessible after entering main and store the options/parameters
> parsed in a singleton class. If I initialize singleton immediately
> (before entering main) I can not parse command line options and have to
> trick around with some additional functions which do it for me (but a
> constructor would be a much better choice, when I try for the first time
> to access the singleton).
>
>
> Is that possible with the current implementation?
I think so.
Regards,
Tobias
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net