dlinear
0.0.1
Delta-complete SMT solver for linear programming
|
Represents an optional value in dLinear. More...
#include <OptionValue.hpp>
Public Types | |
enum class | Type { DEFAULT , FROM_FILE , FROM_COMMAND_LINE , FROM_CODE } |
Type of the value. More... | |
Public Member Functions | |
OptionValue (T value) | |
Constructs an option value with value . | |
OptionValue (const OptionValue &)=default | |
Default copy constructor. | |
OptionValue (OptionValue &&) noexcept=default | |
Default move constructor. | |
OptionValue & | operator= (const OptionValue &)=default |
Default copy assign operator. | |
OptionValue & | operator= (OptionValue &&) noexcept=default |
Default move assign operator. | |
~OptionValue ()=default | |
Default destructor. | |
OptionValue & | operator= (const T &value) |
Copy-assign operator for T. | |
OptionValue & | operator= (T &&value) |
Move-assign operator for T. | |
const T & | get () const |
Get read-only access to the internal stored value of the optional value. | |
void | SetFromCommandLine (const T &value) |
Sets the value to value which is given by a command-line argument. | |
void | SetFromFile (const T &value) |
Sets the value to value which is provided from a file. | |
Private Attributes | |
T | value_ |
Value the class holds. | |
Type | type_ |
Type of the value. | |
Represents an optional value in dLinear.
There are four ways that an option can have its value – by default, by a command-line argument, by a set-info/set-option command from a .smt2 file, and a manual update in a code. We define an order in these types and make sure that an update is executed only if it is requested by the same type or a higher type. For example, a value set by command-line cannot be changed by an updated requested from a file.
T | Type of the value the class will hold. |
Definition at line 35 of file OptionValue.hpp.
|
strong |
Type of the value.
Each type encodes a priority, and an update is executed only if it is requested by the same type or a higher type.
Enumerator | |
---|---|
DEFAULT | Default value. |
FROM_FILE | Updated by a set-option/set-info in a file. |
FROM_COMMAND_LINE | Updated by a command-line argument. |
FROM_CODE | Explicitly updated from code. |
Definition at line 42 of file OptionValue.hpp.
|
inlineexplicit |
Constructs an option value with value
.
value | value to be held. |
Definition at line 53 of file OptionValue.hpp.
|
inline |
Get read-only access to the internal stored value of the optional value.
Definition at line 91 of file OptionValue.hpp.
|
inline |
Copy-assign operator for T.
Type::FROM_CODE
type. Definition at line 74 of file OptionValue.hpp.
|
inline |
Move-assign operator for T.
Type::FROM_CODE
type. Definition at line 84 of file OptionValue.hpp.
|
inline |
Sets the value to value
which is given by a command-line argument.
It sets the type to Type::FROM_COMMAND_LINE. It does nothing if the current type is Type::FROM_CODE.
value | new value, given by a command-line argument. |
Definition at line 101 of file OptionValue.hpp.
|
inline |
Sets the value to value
which is provided from a file.
It sets the type to Type::FROM_FILE. It does nothing if the current type is Type::FROM_COMMAND_LINE or Type::FROM_CODE.
value | new value, provided from a file. |
Definition at line 114 of file OptionValue.hpp.