[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: color & radio classes
From: |
John W. Eaton |
Subject: |
Re: color & radio classes |
Date: |
Fri, 1 Jun 2007 00:39:50 -0400 |
On 1-Jun-2007, Shai Ayal wrote:
| To handle raio values you need to pass the construtor a list of the
| allowable values. I see 2 ways to do this wiht octave_values:
| 1) constructor with 2 octave_values one for the color_values and one
| for the radio_values
| 2) a cell/struct octave_value
|
| Is it essential that we have such a constructor? (wih only octave_values)
I think so, because it is the constructor that will be called from the
set function:
class line : public base_graphics_object
{
public:
class line_properties : public base_properties
{
public:
...
void set (const property_name& name, const octave_value& val)
{
...
else if (name.compare ("color"))
color = color_property (val);
...
}
...
};
...
};
Either that, or the set function will have to do the parsing. I think
it is better for the property constructor to do it.
jwe