Tanoda
|
The Config class provides access to Leap Motion system configuration information. More...
Public Types | |
enum | ValueType { TYPE_UNKNOWN = 0 , TYPE_BOOLEAN = 1 , TYPE_INT32 = 2 , TYPE_FLOAT = 6 , TYPE_STRING = 8 } |
Enumerates the possible data types for configuration values. More... | |
Public Member Functions | |
Config (Connection.Key connectionKey) | |
Creates a new Config object for setting runtime configuration settings. More... | |
Config (int connectionId) | |
bool | Get< T > (string key, Action< T > onResult) |
Requests a configuration value. More... | |
bool | Set< T > (string key, T value, Action< bool > onResult) |
Sets a configuration value. More... | |
ValueType | Type (string key) |
bool | GetBool (string key) |
bool | SetBool (string key, bool value) |
bool | GetInt32 (string key) |
bool | SetInt32 (string key, int value) |
bool | GetFloat (string key) |
bool | SetFloat (string key, float value) |
bool | GetString (string key) |
bool | SetString (string key, string value) |
bool | Save () |
Leap.Config.Config | ( | Connection.Key | connectionKey | ) |
Creates a new Config object for setting runtime configuration settings.
Note that the Controller.Config provides a properly initialized Config object already.
bool Leap.Config.Get< T > | ( | string | key, |
Action< T > | onResult | ||
) |
bool Leap.Config.Set< T > | ( | string | key, |
T | value, | ||
Action< bool > | onResult | ||
) |
Sets a configuration value.
You must provide an action to take when the Leap service sets the config value. The Action delegate must take a boolean parameter. The service calls this delegate with the value true if the setting was changed successfully and false, otherwise.
T | : | IConvertible |