Makeprojects
Loading...
Searching...
No Matches
makeprojects.validators.VSIntegerProperty Class Reference

Value can only be integer or None. More...

Public Member Functions

 __init__ (self, name, fallback=None)
 Initialize the default values.
 get_value (self)
 Return the string representation of the integer, or None.
 __repr__ (self)
 Convert to string.
 __str__ (self)
 Convert to string.

Static Public Member Functions

 vs_validate (key, configuration, fallback=None, prefix=None)
 Check if there is an override with a vs_ prefix.

Public Attributes

 name = name
 Name of the validator.

Static Public Attributes

 value = IntegerProperty("_value")
 Integer value.

Detailed Description

Value can only be integer or None.

Constructor & Destructor Documentation

◆ __init__()

makeprojects.validators.VSIntegerProperty.__init__ ( self,
name,
fallback = None )

Initialize the default values.

Set the name (Required), value and compiler switch.

Parameters
nameName of the validator
fallbackDefault value, None is acceptable

Member Function Documentation

◆ __repr__()

makeprojects.validators.VSIntegerProperty.__repr__ ( self)

Convert to string.

Returns
Value as a string or "None"

◆ __str__()

makeprojects.validators.VSIntegerProperty.__str__ ( self)

Convert to string.

Returns
Value as a string or "None"

◆ get_value()

makeprojects.validators.VSIntegerProperty.get_value ( self)

Return the string representation of the integer, or None.

Returns
String of number or None

◆ vs_validate()

makeprojects.validators.VSIntegerProperty.vs_validate ( key,
configuration,
fallback = None,
prefix = None )
static

Check if there is an override with a vs_ prefix.

Check if the configuration has a key of "vs_" + prefix + key in the configuration and if not found or None, use the fallback as is.

Parameters
keyName of the XML attribute key
configurationconfiguration to scan for an override
fallbackValue to use in case there is no override.
prefixString to insert after "vs_"
Returns
VSIntegerProperty instance