Localsolver
6.0
|
Context for native functions.
Native context are used to query the values of the arguments passed to native functions.
Public Member Functions | |
bool | IsBool (int pos) |
Returns true if the value at the given position is a boolean. | |
bool | IsInt (int pos) |
Returns true if the value at the given position is an integer. | |
bool | IsDouble (int pos) |
Returns true if the value at the given position is a double. | |
long | GetIntValue (int pos) |
Returns the integer value at the given position. | |
double | GetDoubleValue (int pos) |
Returns the double value at the given position. | |
int | Count () |
Returns the number of values in the current context. |
bool localsolver.LSNativeContext.IsBool | ( | int | pos | ) |
Returns true if the value at the given position is a boolean.
You can retrieve the value with GetIntValue.
pos | Position of the value to query. |
bool localsolver.LSNativeContext.IsInt | ( | int | pos | ) |
Returns true if the value at the given position is an integer.
You can retrieve the value with GetIntValue.
pos | Position of the value to query. |
bool localsolver.LSNativeContext.IsDouble | ( | int | pos | ) |
Returns true if the value at the given position is a double.
You can retrieve the value with GetDoubleValue.
pos | Position of the value to query. |
long localsolver.LSNativeContext.GetIntValue | ( | int | pos | ) |
Returns the integer value at the given position.
If the value is neither an integer nor a boolean, an exception is thrown.
pos | Position of the value to query. |
double localsolver.LSNativeContext.GetDoubleValue | ( | int | pos | ) |
Returns the double value at the given position.
If the value is not a double, an exception is thrown.
pos | Position of the value to query. |
int localsolver.LSNativeContext.Count | ( | ) |
Returns the number of values in the current context.