[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUI work (was: Graphical help browser)
From: |
Ryan Rusaw |
Subject: |
Re: GUI work (was: Graphical help browser) |
Date: |
Mon, 26 Jan 2009 15:25:57 -0600 |
On Mon, Jan 26, 2009 at 3:20 PM, John Swensen <address@hidden> wrote:
>
> On Jan 26, 2009, at 2:50 PM, John W. Eaton wrote:
>
>> 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
>
> I think it is because it is what is defined by the specification for a
> protocol that is already supported by Eclipse, VI, and Emacs.
>
> John Swensen
>
I think I can get away with only encoding string values, as doubles,
integers and booleans shouldn't contain any invalid XML characters.
The spec says encoding="base64|none"
Ryan
- 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, 2009/01/26
- Re: GUI work (was: Graphical help browser), John Swensen, 2009/01/26
- Re: GUI work (was: Graphical help browser),
Ryan Rusaw <=
- 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
- Re: GUI work (was: Graphical help browser), Pedro L. Lucas, 2009/01/29
- Re: GUI work (was: Graphical help browser), Przemek Klosowski, 2009/01/28