class operator tonumber
Aron Bierbaum <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
I have a class that uses boost::varient to hold any integer, floating point, or string value. In order to allow lua to easily handle this I would like to override the lua tostring and tonumber operators to return the correct type. Something like: "1.45" = tostring(my_variant) 1.45 = tonumber(my_variant) I believe that there is a way to do the tostring override using Luabind, but I have not been able to find anything about tonumber. Is it possible to override these operators? Thanks, Aron ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com