Localsolver  6.5
localsolverblackbox.LSBBNativeContext Class Reference

Detailed Description

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.

Member Function Documentation

bool localsolverblackbox.LSBBNativeContext.IsBool ( int  pos)

Returns true if the value at the given position is a boolean.

You can retrieve the value with GetIntValue.

Parameters
posPosition of the value to query.
Returns
True if the value at the given position is a boolean.
bool localsolverblackbox.LSBBNativeContext.IsInt ( int  pos)

Returns true if the value at the given position is an integer.

You can retrieve the value with GetIntValue.

Parameters
posPosition of the value to query.
Returns
True if the value at the given position is an integer.
bool localsolverblackbox.LSBBNativeContext.IsDouble ( int  pos)

Returns true if the value at the given position is a double.

You can retrieve the value with GetDoubleValue.

Parameters
posPosition of the value to query.
Returns
True if the value at the given position is a double.
long localsolverblackbox.LSBBNativeContext.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.

Parameters
posPosition of the value to query.
Returns
Integer value.
double localsolverblackbox.LSBBNativeContext.GetDoubleValue ( int  pos)

Returns the double value at the given position.

If the value is not a double, an exception is thrown.

Parameters
posPosition of the value to query.
Returns
Double value.
int localsolverblackbox.LSBBNativeContext.Count ( )

Returns the number of values in the current context.