2 * Copyright (C) 2008 Ronald Lamprecht
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef ATTRIBUTEDESCRIPTOR_HH_INCLUDED
20 #define ATTRIBUTEDESCRIPTOR_HH_INCLUDED
40 class AttributeDescriptor
{
42 AttributeDescriptor(std::string name
, validationType valType
, Value defaultValue
,
43 bool allowRead
, bool allowWrite
, Value minVal
, Value maxVal
);
44 std::string
getName();
45 validationType
getType();
48 Value
getDefaultValue();
50 ValidationResult
checkValue(Value val
);
51 void setReadable(bool allowRead
);
52 void setWritable(bool allowWrite
);
53 void setDefaultValue(const Value
&newDefault
);
54 void setMinValue(const Value
&newMin
);
55 void setMaxValue(const Value
&newMax
);
56 void setValue(const Value
&newValue
);
57 void limitToKindValue();