RE: [Dev-C++] Design decision in C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2004-03-09 23:50:50
|
Oops, missed your mail ;) /Per W On Tue, 9 Mar 2004, P.D. van Zelst wrote: > There's an excellent pattern for this, it's called "Singleton"... look it= up > (try google for "singleton design pattern" for instance). > > Hope this helped, > > > Paul > > ________________________________ > > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Michael > Stather > Sent: Tuesday, March 09, 2004 9:00 PM > To: dev...@li... > Subject: [Dev-C++] Design decision in C++ > > > Hi, > > I=B4ve thought about a class-design for one of my projects. > I=B4ve several big codeblocks like "compiler" which are seperated into > classes. > However, of this classes there is only one instance, like TheCompiler. > So I thought of implementing this class using static methods rather than = a > regular class (I don=B4t need constructors/destructors). > So, is it better do use a regular class and create one instance of it or = to > use a class which has only static methods (also easier) > Where are the caveats? > > thanks for your help > > Michael Stather > > > > > ---------------------------- |