Package io.github.cvc5
Class OptionInfo
java.lang.Object
io.github.cvc5.OptionInfo
Holds some description about a particular option, including its name, its
aliases, whether the option was explicitly set by the user, and information
concerning its value. The
valueInfo member holds any of the following
alternatives:
-
OptionInfo.VoidInfoif the option holds no value (or the value has no native type) -
OptionInfo.ValueInfoif the option is of type boolean or String, holds the current value and the default value. -
OptionInfo.NumberInfoif the option is of type BigInteger or double, holds the current and default value, as well as the minimum and maximum. -
OptionInfo.ModeInfoif the option is a mode option, holds the current and default values, as well as a list of valid modes.
booleanValue(), stringValue(),
intValue(), and doubleValue().
They assert that the option has the respective type and return the current
value.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAbstract class for OptionInfo valuesclassInformation for mode option values.classDefault value, current value, minimum and maximum of a numeric valueclassHas the current and the default valueclassHas no value information -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanObtain the current value as a Boolean.voidFree the native resource associated with this pointer.protected voiddeletePointer(long pointer) Delete the native resource associated with the specified pointer.doubleObtain the current value as a double.String[]Get the option name aliases.Get base info.Get the category of the option.getName()Get the name of the option.longReturn the raw native pointer.booleanDetermine if the option was set by the user.intValue()Obtain the current value as as int.Obtain the current value as a string.toString()Return a string representation of the pointer.protected StringtoString(long pointer) Return a string representation of the specified native pointer.
-
Field Details
-
pointer
protected long pointerThe raw native pointer value.
-
-
Method Details
-
deletePointer
protected void deletePointer(long pointer) Delete the native resource associated with the specified pointer.Subclasses must implement this method to provide resource-specific cleanup logic.
- Parameters:
pointer- the native pointer to delete
-
toString
Return a string representation of the pointer.- Returns:
- a string representation of the pointer
-
toString
Return a string representation of the specified native pointer.Subclasses must implement this method to convert the native pointer into a meaningful string.
- Parameters:
pointer- the native pointer- Returns:
- A string representation of this OptionInfo.
-
getName
Get the name of the option.- Returns:
- The option name.
-
getAliases
Get the option name aliases.- Returns:
- An array of alias strings associated with the option.
-
getSetByUser
public boolean getSetByUser()Determine if the option was set by the user.- Returns:
- True if the option was set by the user.
-
getBaseInfo
Get base info.- Returns:
- The base info.
-
booleanValue
public boolean booleanValue()Obtain the current value as a Boolean. Asserts that valueInfo holds a Boolean.- Returns:
- The Boolean value.
-
stringValue
Obtain the current value as a string. Asserts that valueInfo holds a string.- Returns:
- The string value.
-
intValue
Obtain the current value as as int. Asserts that valueInfo holds an int.- Returns:
- The integer value.
-
doubleValue
public double doubleValue()Obtain the current value as a double. Asserts that valueInfo holds a double.- Returns:
- The double value.
-
getCategory
Get the category of the option.- Returns:
- The option category.
-
getPointer
public long getPointer()Return the raw native pointer.- Returns:
- the pointer value
-
deletePointer
public void deletePointer()Free the native resource associated with this pointer.This method should be called to explicitly clean up the underlying native resource. It removes this instance from the
Context, then invokes the subclass-defineddeletePointer(long)method to perform the actual cleanup.
-