|
|
Class that implements atomic / locked access and operations to its shared variables
| inline SharedVars ()
| SharedVars |
Constructor
| void get (const String& name, String& rval)
| get |
Get the string value of a variable
Parameters:
| name | Name of the variable |
| rval | String to return the value into |
| void set (const String& name, const char* val)
| set |
Set the string value of a variable
Parameters:
| name | Name of the variable to set |
| val | New value to assign to a variable |
| bool create (const String& name, const char* val = 0)
| create |
Create and set a variable only if the variable is not already set
Parameters:
| name | Name of the variable to set |
| val | New value to assign to a variable |
Returns: True if a new variable was created
| void clear (const String& name)
| clear |
Clear a variable
Parameters:
| name | Name of the variable to clear |
| bool exists (const String& name)
| exists |
Check if a variable exists
Parameters:
| name | Name of the variable |
Returns: True if the variable exists
| unsigned int inc (const String& name, unsigned int wrap = 0)
| inc |
Atomically increment a variable as unsigned integer
Parameters:
| name | Name of the variable |
| wrap | Value to wrap around at, zero disables |
Returns: Value of the variable before increment, zero if it was not defined or not numeric
| unsigned int dec (const String& name, unsigned int wrap = 0)
| dec |
Atomically decrement a variable as unsigned integer
Parameters:
| name | Name of the variable |
| wrap | Value to wrap around at, zero disables (stucks at zero) |
Returns: Value of the variable after decrement, zero if it was not defined or not numeric
| Generated by: paulc on bussard on Thu Jul 24 18:41:02 2014, using kdoc 2.0a54. |