tags:

views:

77

answers:

3

I'm currently maintaining a legacy C++ application which has put all the global application details in a static class, some of the variables stored are:

  • application name
  • registry path
  • version number
  • company name etc..

What is the recommended method for storing and accessing system application details?

+5  A: 

If it never changes then why not. However, if not I'd externalise it into data that's loaded at run time. This way it can change without rebuild.

And since you include version number, I'd suspect the latter is way to go.

From my C++ days I recall builds taking not inconsequential times.

Preet Sangha
I +1 that response.
Shakedown
A: 

no hurt, and I think to use a singleton is even better.

doudehou
+1  A: 

I'd rather use a namespace if no instances of the class will be created.

Antonio Perez