Path: chuka.playstation.co.uk!news From: "John \( QuietBloke \)" Newsgroups: scee.yaroze.freetalk.english Subject: C++ Question Date: Wed, 11 Apr 2001 22:42:49 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 29 Message-ID: <9b2j3f$9sk3@www.netyaroze-europe.com> NNTP-Posting-Host: host213-122-25-133.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 I am just getting started on rewriting my framework in C++. I have a question that I hope someone here could either answer or point me to something that'll do it. I want to create a high level class as a sort of replacement for my Director code in the framework. This class does the actual top level screen handling ( init the screen, add entries to the WOT and refreshing the display ). What I really want is to only create 1 instance of this class. Any additional creates of this class should simply point to the existing one. Of course when destroying I want to ensure it only gets destroyed once it has truely gone out of scope. I think I know what I need to do.. ie.. keep a static instance counter and a pointer to the first 'this' and I think I almost have it working but Im also thinking this MUST be a standard requirement for an app and therefore a simple,elegant standard way of implementing it. I'm sure I read something somewhere about this very topic but for the life of me I cant currently remember where I read it. I hope this makes sense.. and yes.. as suggested in my homepage ( www.quietbloke.com ) I really am starting a new project.. it will be another 2d ( probably ) game but a lot more ambitious and of course it will be written in C++ so there will probably be more questions to follow soon. Cheers John ( QuietBloke ) PS... how is everyone else getting on ?.. anything new to show soon ?