RE: [Dev-C++] Design decision in C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: P.D. v. Z. <pd...@xs...> - 2004-03-09 20:53:46
|
There's an excellent pattern for this, it's called "Singleton"... look = it up (try google for "singleton design pattern" for instance). =20 Hope this helped, =20 =20 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, =20 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? =20 thanks for your help =20 Michael Stather |