473,480 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What is a singleton?

I've seen several threads here about singletons and implementing them, but
what the heck are they?

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
Jul 19 '05 #1
13 2845

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:bk**********@chessie.cirr.com...
I've seen several threads here about singletons and implementing them, but
what the heck are they?


A type which can be only instantiated once.

-Mike
Jul 19 '05 #2

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message
news:bk**********@chessie.cirr.com...
I've seen several threads here about singletons and implementing them, but
what the heck are they?


A class of which you only want 1 instance created in your program.
Jul 19 '05 #3

Christopher Benson-Manica wrote:

I've seen several threads here about singletons and implementing them, but
what the heck are they?


Confederate rangers whose guerrilla bands frequently attacked and disrupted
Union supply lines in Virginia and Maryland during the American Civil War.

regards,
alexander.
Jul 19 '05 #4

"Alexander Terekhov" <te******@web.de> wrote in message news:3F***************@web.de...

Christopher Benson-Manica wrote:

I've seen several threads here about singletons and implementing them, but
what the heck are they?


Confederate rangers whose guerrilla bands frequently attacked and disrupted
Union supply lines in Virginia and Maryland during the American Civil War.

I thought it was when you only had one card in a given suit, you can count it
for two points when evaluating your bridge hand (unless you have unprotected
honors).

Jul 19 '05 #5
Ron Natalie <ro*@sensor.com> spoke thus:
I thought it was when you only had one card in a given suit, you can count it
for two points when evaluating your bridge hand (unless you have unprotected
honors).


Well, yes, I knew that. Unprotected honors get a penalty, so K is probably
around 4 points, Q is 3, and J is 2. And of course, a singleton in your
*partner's* suit is likely to lead to some unpleasantness ;)

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
Jul 19 '05 #6

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message news:bk**********@chessie.cirr.com...
Ron Natalie <ro*@sensor.com> spoke thus:
I thought it was when you only had one card in a given suit, you can count it
for two points when evaluating your bridge hand (unless you have unprotected
honors).


Well, yes, I knew that. Unprotected honors get a penalty, so K is probably
around 4 points, Q is 3, and J is 2. And of course, a singleton in your
*partner's* suit is likely to lead to some unpleasantness ;)


How's your aunt in Chicago?
Jul 19 '05 #7
Ron Natalie <ro*@sensor.com> spoke thus:
How's your aunt in Chicago?


*blinks* What?

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
Jul 19 '05 #8

Christopher Benson-Manica wrote:

Ron Natalie <ro*@sensor.com> spoke thus:
I thought it was when you only had one card in a given suit, you can count it
for two points when evaluating your bridge hand (unless you have unprotected
honors).


Well, yes, I knew that. Unprotected honors get a penalty, so K is probably
around 4 points, Q is 3, and J is 2. And of course, a singleton in your
*partner's* suit is likely to lead to some unpleasantness ;)


Yeah. K singleton, Q singleton... "Real Men play Gin".

regards,
alexander.
Jul 19 '05 #9

"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message news:bk**********@chessie.cirr.com...
Ron Natalie <ro*@sensor.com> spoke thus:
How's your aunt in Chicago?


*blinks* What?

Sorry, inside joke. Where I used to play we had an ersatz Chicago Convention
where if you had a really bad hand:

N: How's your aunt in Chicago?
S: (if they have a bad had as well) She died.
N: I only have 12 cards.
S: I have 14 cards.

Both then throw their hands face up into the middle of the table.
Jul 19 '05 #10
Ron Natalie <ro*@sensor.com> spoke thus:
Sorry, inside joke. Where I used to play we had an ersatz Chicago Convention
where if you had a really bad hand: N: How's your aunt in Chicago?
S: (if they have a bad had as well) She died.
N: I only have 12 cards.
S: I have 14 cards.


LOL!!! I'm sure that didn't work more than a couple of times ;)

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
Jul 19 '05 #11

A singleton is one of the Design Patterns which are described in the book:
Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides: Design Patterns.
Elements of Reusable Object Oriented Software. ISBN 0-201-63361-2

Ralf
www.oop-trainer.de

Jul 19 '05 #12
Christopher Benson-Manica wrote:

Ron Natalie <ro*@sensor.com> spoke thus:
How's your aunt in Chicago?


*blinks* What?

http://www.bridgeguys.com/CGlossary/GlossC.html
See "Chicago Convention".


Brian Rodenborn
Jul 19 '05 #13
"Ron Natalie" <ro*@sensor.com> wrote in message news:<3f***********************@news.newshosting.c om>...
"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote in message news:bk**********@chessie.cirr.com...
Ron Natalie <ro*@sensor.com> spoke thus:
How's your aunt in Chicago?


*blinks* What?

Sorry, inside joke. Where I used to play we had an ersatz Chicago Convention
where if you had a really bad hand:

N: How's your aunt in Chicago?
S: (if they have a bad had as well) She died.
N: I only have 12 cards.
S: I have 14 cards.

Both then throw their hands face up into the middle of the table.


LOL...too bad this won't work with Yahoo! bridge. I'm adding it to my
bidding profile pronto!
Jul 19 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
12453
by: Tim Clacy | last post by:
Is there such a thing as a Singleton template that actually saves programming effort? Is it possible to actually use a template to make an arbitrary class a singleton without having to: a)...
10
2618
by: E. Robert Tisdale | last post by:
Could somebody please help me with the definition of a singleton? > cat singleton.cc class { private: // representation int A; int B; public: //functions
16
6680
by: cppaddict | last post by:
Hi, In this tutorial on singleton class in C++ (http://gethelp.devx.com/techtips/cpp_pro/10min/10min0200.asp) the author gives two implementations of a simple singleton class, claiming that...
1
2437
by: Jim Strathmeyer | last post by:
So I'm trying to implement a singleton template class, but I'm getting a confusing 'undefined reference' when it tries to link. Here's the code and g++'s output. Any help? // singleton.h ...
7
3244
by: Ethan | last post by:
Hi, I have a class defined as a "Singleton" (Design Pattern). The codes are attached below. My questions are: 1. Does it has mem leak? If no, when did the destructor called? If yes, how can I...
3
3910
by: Harry | last post by:
Hi ppl I have a doubt on singleton class. I am writing a program below class singleton { private: singleton(){}; public: //way 1
6
2254
by: Manuel | last post by:
Consider the classic singleton (from Thinking in C++): ----------------------------------------------------- //: C10:SingletonPattern.cpp #include <iostream> using namespace std; class...
3
18221
weaknessforcats
by: weaknessforcats | last post by:
Design Pattern: The Singleton Overview Use the Singleton Design Pattern when you want to have only one instance of a class. This single instance must have a single global point of access. That...
10
2092
by: JoeC | last post by:
I have been programming for a while and I have seen this syntax before and I copied this from a book but the book didn't explain what is going on here. class engine{ protected: static engine*...
3
1772
by: stevewilliams2004 | last post by:
I am attempting to create a singleton, and was wondering if someone could give me a sanity check on the design - does it accomplish my constraints, and/or am I over complicating things. My design...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7043
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7081
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6921
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5336
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4776
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.