Singleton is the Design Pattern that is over used the most.
Singleton is the Design Pattern that is over used the most.
why do you need an "Options" class at all? Such a class has low coherence (it contains data relating to many functional areas) and high coupling (it introduces a dependency between unrelated areas). Both of these are Bad Things (tm).
Why not simply allow the "option" to reside wherever it is most relevant?
"I saw a sign that said 'Drink Canada Dry', so I started"
-- Brendan Behan
Free Compiler: Visual C++ 2005 Express
If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?
I wanted to keep all options that are being read from a file (user) in a special class (for instance class user_options).
I havent thought that might be a bad idea..
So you're saying it would be better to just copy options to class, where they're needed?
In this case I would have to store references to all classes that need particular options and then copy them where they belong to..
Is this a good approach?