#include <IntPropertyHandler.hpp>
Public Member Functions | |
void | acceptVisitor (PropertyHandlerVisitor *visitor) override |
int | defaultValue () const |
void | insertNames () override |
bool | isValidValue (string value) const override |
int | maxValue () const |
int | minValue () const |
PropertyHandler (const PropertyHandler &)=delete | |
PropertyHandler (Item *target, const PropertyDef *property, const SchemaDef *schema, NameManager *nameMgr) | |
void | setValue (int value) |
int | value () const |
![]() | |
PropertyHandler (const PropertyHandler &)=delete | |
PropertyHandler (Item *target, const PropertyDef *property, const SchemaDef *schema, NameManager *nameMgr) | |
virtual | ~PropertyHandler ()=default |
virtual void | acceptVisitor (PropertyHandlerVisitor *visitor)=0 |
virtual vector< Item * > | children () const |
bool | hasChanged () const |
bool | hasDefaultValue () const |
virtual void | insertNames ()=0 |
virtual bool | isCompound () const |
bool | isConfigured () |
bool | isConfiguredByUser () |
bool | isDisplayed () const |
bool | isRelevant () const |
bool | isRequired () const |
bool | isSilent () const |
virtual bool | isValidValue (string value) const =0 |
string | name () const |
NameManager * | nameManager () const |
PropertyHandler & | operator= (const PropertyHandler &)=delete |
void | rebuildNames () |
Item * | root () const |
const SchemaDef * | schema () const |
void | setConfiguredByUser (bool valid=true) |
void | setConfiguredToDefault () |
void | setNotConfigured () |
string | title () const |
string | type () const |
Additional Inherited Members | |
![]() | |
const PropertyDef * | property () const |
void | setChanged () |
Item * | target () const |
This class handles SMILE data item properties of integer types.
|
overridevirtual |
Accepts the specified property handler visitor.
Implements PropertyHandler.
int IntPropertyHandler::defaultValue | ( | ) | const |
Returns the default value for the handled property, or zero if unavailable.
|
overridevirtual |
Causes the name manager associated with this handler to insert names into the global and/or local name sets corresponding to the current value of the target property. For integer properties, the function inserts the target property's name if the current property value is nonzero, and does not insert any names if the value is zero. In addition, the function inserts the names provided in the conditional expression of the "insert" attribute of the target property, if any.
Implements PropertyHandler.
|
overridevirtual |
Returns true if the given string can be successfully converted to a value of the property's type. For integer properties, the function returns true if the string conforms to the regular syntax for a decimal integer, and false otherwise.
Implements PropertyHandler.
int IntPropertyHandler::maxValue | ( | ) | const |
Returns the maximum value for the handled property. If no maximum value is specified in the property definition, the function returns a default maximum value close to the largest representable integer.
int IntPropertyHandler::minValue | ( | ) | const |
Returns the minimum value for the handled property. If no minimum value is specified in the property definition, the function returns a default minimum value close to the smallest representable integer (i.e. a negative integer with a large absolute value).
|
delete |
Constructs a property handler for the specified target item and property, with a given schema definition.
PropertyHandler::PropertyHandler | ( | Item * | target, |
const PropertyDef * | property, | ||
const SchemaDef * | schema, | ||
NameManager * | nameMgr | ||
) |
Constructs a property handler for the specified target item and property, with a given schema definition.
void IntPropertyHandler::setValue | ( | int | value | ) |
Sets the value of the handled property in the target item.
int IntPropertyHandler::value | ( | ) | const |
Returns the value of the handled property in the target item.