|
by: Wolfgang Jeltsch |
last post by:
Hello,
what is the best way to prevent the user of a class from making copies of
objects of this class? Making the copy constructor private is a solution but I'm
looking for a better one.
Thanks,
Wolfgang
|
by: Aaron |
last post by:
Hi,
I've seen javascript code where a constructor function is passed an argument
"document", and inside the function itself the assignment "this.document =
document;" is made. This is the code (or the part necessary for the
example):
function ToggleButton(document) {
ToggleButton.images = new Array(4);
for(i=0;i<4;i++) {...
|
by: Jeffrey E. Forcier |
last post by:
I am attempting to write a class whose string representation changes
in response to external stimuli. While that effect is obviously
possible via other means, I attempted this method first and was
surprised when it didn't work, so I now want to know why :)
Given the following class definition:
class MyClass(object):
def Edit(self):
|
by: jsnX |
last post by:
hi,
i would like to make some code that operates on sets of points - does
convex hulls and other operations. but it looks like i will need a lot
of pointless object copies:
======================================================================================
// point cloud class
class pc : public std::vector<vec2d>
{
|
by: Markus Dehmann |
last post by:
Profiling has shown that during runtime of my program, 100 million
objects of class X are constructed and destructed.
What is the best way to optimize in such a case, both for memory and
speed (speed maybe more important)?
One idea is to make the class very small, to contain only the most
important member data, and put everything else,...
|
|
by: WayneD |
last post by:
Hi All,
Just got started in C#...
Here's some C# code:
public MyClass
{
private MyThingy m_Thingy;
|
by: films |
last post by:
I understand the concept.
Serialization of a class will add all the sub-objects of the class to
the stream if there are also serializible.
So say I have:
class Author
{
|
by: GoogleEyeJoe |
last post by:
Dear ladies and gents,
I'm trying to determine whether the .NET Framework implements a means
of transactional processing without the need for a database.
Essentially, I'd like to enlist light-weight portable business objects
within transactions so that that have the ability to roll-back if the
client of the object wishes to undo any changes...
|
by: falcon198198 |
last post by:
Greetings:
I was hoping for some advice on an application. Here is what I am
working on:
Basically I have a bigger application that is having a printing
problem making multiple copies of a pdf so I set off to write a
program that can watch a folder using filesystemwatcher. From the
events that this generates I created a class and...
|
by: Astley Le Jasper |
last post by:
Sorry for the numpty question ...
How do you find the reference name of an object?
So if i have this
bob = modulename.objectname()
how do i find that the name is 'bob'
|
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. ...
|
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
|