S
Søren Johansen
Hi,
I am making an application that is beginning to turn quite large.
This application has some classes that are known by almost every other class
namely CApplication, CProject and the like.
So far, I have been passing around references to these classes in the
constructors of all the other classes but it is beginning to annoy me to
have to do this.
I could easily make global variables, it wouldn't be unsafe in the sense
that I know that the instances are always present and that there is only
one. Still, this solution not pleasing to the eye and I gather there
might turn up some thread safety issues or the like (currently, everything
runs in a single thread) in the future.
Any alternative suggestions would be very welcome.
Søren
I am making an application that is beginning to turn quite large.
This application has some classes that are known by almost every other class
namely CApplication, CProject and the like.
So far, I have been passing around references to these classes in the
constructors of all the other classes but it is beginning to annoy me to
have to do this.
I could easily make global variables, it wouldn't be unsafe in the sense
that I know that the instances are always present and that there is only
one. Still, this solution not pleasing to the eye and I gather there
might turn up some thread safety issues or the like (currently, everything
runs in a single thread) in the future.
Any alternative suggestions would be very welcome.
Søren