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 » FIX: Value has Value, Value Type VALUE_V
FIX: Value has Value, Value Type VALUE_V [message #30124] Fri, 10 December 2010 08:51 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi,

this works fine
Value v = RichValue<Value>(Value(123));

and generates a Value that has a Value in it..creating a nice chicken egg problem Smile but it does not use VALUE_V as its Type.

please, add
Value.h:275
template<> inline dword ValueTypeNo(const Value*)   { return VALUE_V; }

to have this conceptually right..
Re: FIX: Value has Value, Value Type VALUE_V [message #30142 is a reply to message #30124] Sat, 11 December 2010 13:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
VALUE_V is only defined because of Ref.

Mirek
Re: FIX: Value has Value, Value Type VALUE_V [message #30143 is a reply to message #30142] Sat, 11 December 2010 18:14 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Well…, but it would only be consistant to define a known value for that case and not have it use a 'generated' value. Or would it harm any other project? Cause valuearray and valuemap have their own id's as well.
Re: FIX: Value has Value, Value Type VALUE_V [message #30146 is a reply to message #30143] Sat, 11 December 2010 18:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
ValueTypeNo is only used with Value. Value should never contain VALUE_V.
Re: FIX: Value has Value, Value Type VALUE_V [message #30156 is a reply to message #30146] Sun, 12 December 2010 12:01 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
ok, thats a word..

btw: is there any documentation on 'what is a Ref and how to use it?' i cant quite imagine what it's about

[Updated on: Sun, 12 December 2010 12:02]

Report message to a moderator

Re: FIX: Value has Value, Value Type VALUE_V [message #30160 is a reply to message #30156] Sun, 12 December 2010 15:54 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sorry, no.

Ref is AFAIK only used with Sql::Fetch. But it is a quite strong case to support its existence...

Consider:

Date date;
String name;
double price;
sql * Select(NAME, SINCE, PRICE).From(TABLE);
while(sql.Fetch(name, date, price)) {
   .....
}


Mirek
Previous Topic: Value question (memory consumption)
Next Topic: asxml...or like I would like to keep encoding...
Goto Forum:
  


Current Time: Mon Apr 29 15:25:40 CEST 2024

Total time taken to generate the page: 0.03052 seconds