🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13364

Re: Multiple Threads & One Text File

#13364
From: dcent
Date: Mon, 13 Oct 2003 22:39
33 lines
2239 bytes
As always I stand in awe of your knowledge and wisdom.

Remy Lebeau (TeamB) wrote:
> "dcent" <DcentJ8@NetScape.net> wrote in message
> news:3F8A5437.8010207@NetScape.net...
> 
> 
>>Is the constructor REALLY a private member, Gambit? :)
> 
> 
> Yes, it is, actually.  One of the design features of a singleton is that
> nobody outside of the class is allowed to create arbitrary instances of the
> class except for itself.  If you look at the code more closely, you see that
> the Instance() method is the only one creating the actual instance of the
> class.  Since Instance() is a member of the class, it has access to the
> private members, including the private constructor.  By making it private,
> no code outside of the class can create their own instances.  That ensures
> that all code outside of the class can only access the actual class instance
> in a single manner, hense the name and design of a singleton class.
> 
> 
> Gambit
> 
> 


-- 
dcent

-----------------------------------------
Using BCB5ent (Build 12.34) Update Pack 1
Windows XP Home (SP1)
Intel P4 2.4GHz w/512MB RAM
Technical Details
Message-ID: <3F8B298F.20606@NetScape.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f88f22a@newsgroups.borland.com> <3f890078$1@newsgroups.borland.com> <3F8A5437.8010207@NetScape.net> <3f8a5b0e$3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2cf03e35cbac1db7
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-13 16:09:21 PST
Message-ID: <3F8B298F.20606@NetScape.net>
Date: Mon, 13 Oct 2003 17:39:11 -0500
From: dcent <DcentJ8@NetScape.net>
Reply-To:  DcentJ8@NetScape.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Multiple Threads & One Text File
References: <3f88f22a@newsgroups.borland.com> <3f890078$1@newsgroups.borland.com> <3F8A5437.8010207@NetScape.net> <3f8a5b0e$3@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 66.156.197.203
X-Trace: newsgroups.borland.com 1066084750 66.156.197.203 (13 Oct 2003 15:39:10 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail