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 » U++ Library support » U++ Core » Value: no deep copy support?
Value: no deep copy support? [message #28461] Thu, 02 September 2010 15:58 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi all,

dealing with Value i noticed that it has no possibility to do a clone or DeepCopyNew of the referenced content.

this is surely by design, but what were the concepts leading to this?

i know there is workarounds for this but having it directly supported would be great. a value is Movable, DeepCopyOption would be great too.

workaround:
Value v = int(123); //initial stuff, put in there, as a copy of this int i.e.

Value v2 = v1; //would internally reference the same instance of int

Value v3 = (int)v1; //this creates a copy from the internal

http://www.ultimatepp.org/srcdoc$Core$UserValue$en-us.html

i'd be great to spare this out and use the pick'able semantic from containers..
Value v = (int)123;
Value v2(v,0); //indicate to use the deep copy

Value v3;
vs <<= v; //same


do i misunderstand somehow the concept of Value maybe? (i know that it's a referece object internally managing a 'shared' content)

EDIT: maybe it's a good idea to collect all things related to Value handling. they are spread in manual and short tutorials etc.

http://www.ultimatepp.org/reference$Value.html
http://www.ultimatepp.org/srcdoc$Core$CoreTutorial$en-us.htm l
http://www.ultimatepp.org/srcdoc$Core$UserValue$en-us.html
http://www.ultimatepp.org/src$Draw$Display$en-us.html
http://www.ultimatepp.org/www$uppweb$overview$en-us.html
http://www.ultimatepp.org/src$Core$Convert$en-us.html

[Updated on: Thu, 02 September 2010 16:21]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PolyDeepCopyNew: MSC / GCC differ in behaviour
Next Topic: RichPickToValue PROPOSAL
Goto Forum:
  


Current Time: Tue Jun 17 00:41:28 CEST 2025

Total time taken to generate the page: 0.03958 seconds