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: why not float support?
Re: Value: why not float support? [message #30391 is a reply to message #30387] Mon, 27 December 2010 14:28 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i dont mind handling float as double in cpu context, in functions etc. but in my case, sending and receiving is done with distinct types, float and double, unfortunately not interchangeable, it's compareable to storing things Smile.

well, my problem is actually, that i wanted to use Value as a cool implicit convertable container for arbitrary values (which it is). to save me the hassle of converting them manually, since a lot is already present. but lacking float makes it difficult to use in my case ofcorse. i might need to specify own converters which support float as well beeing a RichValue<>.

use case is indeed: an OSC Method handler receives i.e a Value as parameter, which is to be sent as float: so, if it is double, its converted, if it is int, also, if it's a String, it's tried to be parsed. etc.. thus the interface is really versatile and forgiving.

so i can set up different controls, that 'generate' internally different types (editfield a String, Option a bool/int value) but are sent as float etc.. so i dont need to care about types inside the controls already. i simply specify which type the OSC message should finally be sent as.


 
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core/Path.cpp: the limitation of GetCurrentDirectory for POSIX
Next Topic: InitCaps() proposal
Goto Forum:
  


Current Time: Wed Jul 02 23:23:05 CEST 2025

Total time taken to generate the page: 0.04149 seconds