[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUI work (was: Graphical help browser)
From: |
John W. Eaton |
Subject: |
Re: GUI work (was: Graphical help browser) |
Date: |
Mon, 26 Jan 2009 14:50:42 -0500 |
On 23-Jan-2009, Ryan Rusaw wrote:
| I just use a std::stringstream << operator and the appropriate
| octave_value function, then just base64 encode the string.
|
| if (val.is_complex_type()) {
| data_type = "octave_complex";
| in << val.complex_value().real()
| << std::string(" + ")
| << val.complex_value().imag()
| << std::string("i");
| } else if (val.is_bool_type()) {
| data_type = "bool";
| in << val.bool_value();
| } else if (val.is_integer_type()) {
| data_type = "int";
| in << val.int_value();
| } else if (val.is_double_type() ||
| val.is_single_type()) {
| data_type = "float";
| in << val.double_value();
| } else ...
|
| b64.encode(in.str(), base64_encoding);
|
| Its entirely possible there is much more optimal way of doing so,
| especially when I'm iterating through matrices converting each
| element.
Doesn't something like
in << val.double_value()
already convert to ASCII? So why base64 encode it?
It seems to me that it would be better to avoid the conversion to/from
ascii when passing data between Octave and the IDE.
jwe
- Re: GUI work (was: Graphical help browser), John W. Eaton, 2009/01/22
- Re: GUI work (was: Graphical help browser), Pedro L. Lucas, 2009/01/23
- Re: GUI work (was: Graphical help browser), John Swensen, 2009/01/23
- Re: GUI work (was: Graphical help browser), Ryan Rusaw, 2009/01/23
- Re: GUI work (was: Graphical help browser), John Swensen, 2009/01/23
- Re: GUI work (was: Graphical help browser), Ryan Rusaw, 2009/01/23
- Re: GUI work (was: Graphical help browser), John Swensen, 2009/01/24
- Re: GUI work (was: Graphical help browser), Ryan Rusaw, 2009/01/24
- Re: GUI work (was: Graphical help browser),
John W. Eaton <=
- Re: GUI work (was: Graphical help browser), John Swensen, 2009/01/26
- Re: GUI work (was: Graphical help browser), Ryan Rusaw, 2009/01/26
- Re: GUI work (was: Graphical help browser), Pedro L. Lucas, 2009/01/26
- Re: GUI work (was: Graphical help browser), John W. Eaton, 2009/01/26
- Re: GUI work (was: Graphical help browser), Pedro L. Lucas, 2009/01/27
- Re: GUI work (was: Graphical help browser), Jordi GutiƩrrez Hermoso, 2009/01/27
- Re: GUI work (was: Graphical help browser), John W. Eaton, 2009/01/27
- Re: GUI work (was: Graphical help browser), Jaroslav Hajek, 2009/01/28
- Re: GUI work (was: Graphical help browser), Olaf Till, 2009/01/28
- Re: GUI work (was: Graphical help browser), John Swensen, 2009/01/28