I have really never made use of namespaces, and am considering them at the moment.
My situation. I have a class
Reverb. It contains as members instances of other classes, declared in the same header file, above it. Now there are appearing more and more data structures, relevant to the
Reverb class e.g. 3 different representations of the user settings.
So I made a class Settings, that contains 3 sub-classes for the 3 representations and some methods to convert between them.
My question is where to place that?
- Put it inside
Reverb? Then the
ReverbAPI becomes quite bloated and scroll-heavy.
- Put it in file scope? Any user of the header will be unpleasantly surprised to find a class
Settings, that actually means
- Create a
namespace Reverband put everything in it? Then what to do with the
class Reverb? It would be strange to ask for
- Any better solution?