v_sim.ConfigFileEntry¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class v_sim.ConfigFileEntry¶
This is the common name of the structure.
- getKey()¶
- Returns:
the key of self.
- Return type:
An entry is defined by its key.
New in version 3.8.
- getLabel()¶
-
An entry can be defined as some values preceeded by a label. After parsing an entry, this label, if it exists can be retrieve with this function. See for instance
v_sim.ConfigFile.addBooleanArrayEntry() to define an entry with a label.New in version 3.8.
- popAllTokens()¶
- Returns:
a newly created string.
- Return type:
Join the remaining tokens of self into a string.
New in version 3.8.
- popToken()¶
- Returns:
Trueif self still has tokens to be retrieved and value has be set.- value:
a location to store a string.
- Return type:
Pop a string from a tokenified data line corresponding to self in a configuration file.
New in version 3.8.
- popTokenAsBoolean(values)¶
- Parameters:
values ([
bool]) – an array of boolean.- Returns:
Trueif self has nValues boolean tokens to be read.- Return type:
Read nValues as boolean from self and stores them in values. These tokens are poped from the current list of tokens of self.
New in version 3.8.
- popTokenAsColor()¶
- Returns:
Trueif self has a color tokens to be read.- color:
a location to store a
v_sim.Color.
- Return type:
(
bool, color:v_sim.Color)
Like
v_sim.ConfigFileEntry.popToken() but convert the token as av_sim.Color.New in version 3.8.
- popTokenAsEnum(toEnum)¶
- Parameters:
toEnum (
v_sim.ConfigFileEnumFunc) – a method to convert a string to an enum value.- Returns:
Trueif a token can be found and the conversion succeed.- value:
a location to store an enum value.
- Return type:
Parse the next non null token in self and parse it with toEnum function. The result, if valid, is stored in value.
New in version 3.8.
- popTokenAsFloat(values, clamp)¶
- Parameters:
- Returns:
Trueif self has nValues float tokens to be read.- Return type:
Like
v_sim.ConfigFileEntry.popTokenAsInt() but for floats.New in version 3.8.
- popTokenAsInt(values, clamp)¶
- Parameters:
- Returns:
Trueif self has nValues integer tokens to be read.- Return type:
Like
v_sim.ConfigFileEntry.popTokenAsBoolean() but for integers. Additionally conduct a range check using clamp.New in version 3.8.
- setReplace(oldEntry)¶
- Parameters:
oldEntry (
v_sim.ConfigFileEntry) – idem.
Use this method to declare that oldEntry has become obsolete and has been replaced by self.