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.VoidInfo
if the option holds no value (or the value has no native type) -
OptionInfo.ValueInfo
if the option is of type boolean or String, holds the current value and the default value. -
OptionInfo.NumberInfo
if the option is of type BigInteger or double, holds the current and default value, as well as the minimum and maximum. -
OptionInfo.ModeInfo
if 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 TypeClassDescriptionclass
Abstract class for OptionInfo valuesclass
Information for mode option values.class
Default value, current value, minimum and maximum of a numeric valueclass
Has the current and the default valueclass
Has no value information -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
Obtain the current value as a Boolean.void
Free the native resource associated with this pointer.protected void
deletePointer
(long pointer) Delete the native resource associated with the specified pointer.double
Obtain the current value as a double.String[]
Get the option name aliases.Get base info.getName()
Get the name of the option.long
Return the raw native pointer.boolean
Determine 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 String
toString
(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.
-
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.
-