Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » NTL - "deep copy semantics"?
Re: NTL - "deep copy semantics"? [message #11146 is a reply to message #4121] Thu, 23 August 2007 04:17 Go to previous messageGo to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi there,

Please ignore this - I found the DeepCopy thing confusing so I leave this here for those who come after me Smile

I don't see any examples of DeepCopy but if I understand correctly, my class, the declaration for which looks like this

class Mine
{
public:
Mine();

double fMember;
int nMember;

Array <Point> m_pts;
};

can be copied with the source in tact so long as I write it

class Mine
{
public:
Mine();

double fMember;
int nMember;

WithDeepCopy<Array <Point> > m_pts;
};

and this means that I can use the default copy constructors and forget about making my own unless I really want to. When I call

Mine mine;
// some initialisation
..
Mine yours(mine);

yours copies mine and they both have all the same members including in their arrays.

Nick

[Updated on: Thu, 23 August 2007 05:31]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to promote U++ ?
Next Topic: Database performance test
Goto Forum:
  


Current Time: Fri Jul 18 05:39:52 CEST 2025

Total time taken to generate the page: 0.04689 seconds