|
by: stephan beal |
last post by:
Good morning, C++ users,
i've been hesitating to post this, primarily because i know that most of you
here are *way* ahead of me in C++ and i'm a little embarassed about the
possibility of some gross errors in what i'll be posting...
That said, please go easy on me. :)
About 2 weeks ago i wrote a paper, called Context Singletons, where i
discuss some of the uses of context-specific Singleton-like objects. During
|
by: Dave |
last post by:
Hello all,
I have made a class into a singleton by having a static get() method which
returns a pointer to the one-and-only instance. This method creates the
instance on the heap if it hasn't already done so in a prior call.
Constructors are private so that the class may not be instaniated from
outside. As I understand it, this is the standard approach and is nothing
new.
I have no need to ever destroy this singleton and re-create a...
|
by: Tito |
last post by:
I have two questions about the singletons' chapter of Alexei Alexandrescu's
"C++ Modern Design".
1. In the beginning of the chapter Alexei states that a "singleton" class
implementation made of static member functions has the problem that the
functions are not virtual, so that you have to touch the class' code in
order to change the behaviour. But, how is a singleton meant to be inherited
from? Is not the concrete class of the unique...
|
by: Dominik Rau |
last post by:
Hi.
I've got the following problem here: In my application, I use a lot of
Singletons, that are implemented as described in Gamma et al. (shortened):
//.h
class Singleton{
public:
static Singleton* the();
private:
static Singleton* _instance;
|
by: Yevgeny Menaker |
last post by:
I am struggling with the following:
We have legacy classes written in C++ that are compiled to static
libraries. Some of these classes are singletons. In order to make
these classes available to C#, we wrapped them with Managed C++. The
wrapper classes works fine in most of the cases. However, if they are
used in ASP.NET Web Applications a problem may arise in the following
scenario:
Step 1: The first Web Application starts in its own...
|
|
by: John Fly |
last post by:
I'm working on a large project(from scratch). The program is
essentially a data file processor, the overall view is this:
A data file is read in, validated and stored in a memory structure
similar to a database or XML representation. Rules to modify the stored
data will be executed, then the data will be transformed into an output
format.
Think something similar to FormatA -> XML -> Manipulate XML -> FormatB
|
by: subramanian |
last post by:
Suppose I have the following class:(shown only partially. Assume proper
ctors and dtors):
class Date
{
...
static Date temp_date;
static Date another_date;
|
by: Dennis Jones |
last post by:
Hello,
I have a class that will eventually look something like this:
class TTableHolder
{
private:
boost::scoped_ptr<TSessionFSession;
boost::shared_ptr<TTableFTable;
|
by: BeautifulMind |
last post by:
In case of inheritence the order of execution of constructors is in
the order of derivation and order of destructor execution is in
reverse order of derivation.
Is this case also true in case class is derived as virtual?
How does the order of construction/destruction is impacted if the base
class is derived as virtual or non virtual? just see the example
below.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|