🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.objects
Article #16535

Re: Dlaczego singletony?

#16535
From: Jacek Pietraszek
Date: Mon, 23 Apr 2007 22:37
13 lines
1368 bytes
 dOvOb <dovob@wytnij.gazeta.pl> napisal:
> Dlaczego singleton jest przewaznie przedstawiany w C++ jako klasa o jednej
> instancji i o metodzie dostepowej (w stylu "getInstance"), a nie jako klasa ze
> wszystkimi metodami statycznymi? (cos jak przestrzen nazw, tylko niektore
> skladowe moga byc "private")
> Czy ma to jakas zalete?

Singleton jest obiektem, ktory moze miec w szczegolnosci
pola, wiec metody statyczne nie mialyby do niego dostepu.
-- 
Pozdrawiam,

Jacek
Technical Details
Message-ID: <f0jcfq$hvc$1@srv.cyf-kr.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.cyf-kr.edu.pl!not-for-mail
References: <f0i3to$bq0$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.cyf-kr.edu.pl!not-for-mail
From: Jacek Pietraszek <pmpietraUSUNTENKAWALEK@kinga.cyf-kr.edu.pl>
Newsgroups: pl.comp.objects
Subject: Re: Dlaczego singletony?
Date: Mon, 23 Apr 2007 22:37:46 +0000 (UTC)
Organization: Academic Computer Center CYFRONET AGH
Lines: 13
Sender: Jacek Pietraszek <pmpietra@kinga.cyf-kr.edu.pl>
Message-ID: <f0jcfq$hvc$1@srv.cyf-kr.edu.pl>
References: <f0i3to$bq0$1@inews.gazeta.pl>
NNTP-Posting-Host: kinga.cyf-kr.edu.pl
X-Trace: srv.cyf-kr.edu.pl 1177367866 18412 149.156.2.32 (23 Apr 2007 22:37:46 GMT)
X-Complaints-To: news@cyf-kr.edu.pl
NNTP-Posting-Date: Mon, 23 Apr 2007 22:37:46 +0000 (UTC)
User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (HP-UX/B.11.11 (9000/800))
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit