Properties in subclasses



Hi.

Lets say I've written an abstract parent class that registers a property.
From this parent class I derive several subclasses. I wan't some of the these
subclasses to have read/write access to the property, but some subclasses
should only have read access to it.

Is this possible, or am I wrong from a design point-of-view ?

I think I could achieve this by using a flag which the subclasses set if
they have read/write access, or readonly acces, which set_property/get_property
in the parent class could check, but it seems like a hack to me.

/Jacob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]