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

Value can be any string. More...

Public Member Functions

 __init__ (self, name, fallback=None)
 Initialize the default value.
 get_value (self)
 Return the string representation of the string, 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 = StringProperty("_value")
 String value.

Detailed Description

Value can be any string.

Constructor & Destructor Documentation

◆ __init__()

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

Initialize the default value.

Parameters
nameName of the validator
fallbackDefault value, None is acceptable

Member Function Documentation

◆ __repr__()

makeprojects.validators.VSStringProperty.__repr__ ( self)

Convert to string.

Returns
Value as a string

◆ __str__()

makeprojects.validators.VSStringProperty.__str__ ( self)

Convert to string.

Returns
Value as a string

◆ vs_validate()

makeprojects.validators.VSStringProperty.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
VSStringProperty instance