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 » Core: Null handling incoherent?
Re: Core: Null handling incoherent? [message #32256 is a reply to message #32255] Wed, 04 May 2011 11:39 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
attached is a patch for discussion. the IsNullInstance naming issue is not adressed yet.

benefits:

* more clear coherent interface because IsNullInstance, SetNull are obligatory
* users can use RichValue<> as container for even own intrinsic types like float.., specifying themselves the null handling.
(but float f = Null; still wont work, since it has no converter, but SetNull<float>() can, which is a nice price to pay.
* specifying AsString<T> they can use the Value::ToString for it as well, i.e AsString<float> is already specified..

i'd have considered to have
template <class T> void SetNull(T& x) { x = Null; }

to make SetNull method optional, but Null is kind a wired with Value, which, at level of Defs.h isn't known yet..


  • Attachment: patch0.patch
    (Size: 5.77KB, Downloaded 229 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] String.GetCount with umlaut
Next Topic: read/write to /dev/rtp is happening .. but a small problem
Goto Forum:
  


Current Time: Sun Jul 06 01:53:08 CEST 2025

Total time taken to generate the page: 0.03514 seconds