|
dReal4
|
Represents an optional value in dReal. More...
#include </home/soonhokong/work/dreal4/dreal/util/option_value.h>
Public Types | |
| enum | Type { DEFAULT, FROM_FILE, FROM_COMMAND_LINE, FROM_CODE } |
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. More... | |
| OptionValue & | operator= (T &&value) |
| Move-assign operator for T. More... | |
| const T & | get () const |
| Returns the value. | |
| void | set_from_command_line (const T &value) |
Sets the value to value which is given by a command-line argument. | |
| void | set_from_file (const T &value) |
Sets the value to value which is provided from a file. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Type type) |
Represents an optional value in dReal.
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.
|
strong |
|
inline |
Copy-assign operator for T.
Note: It sets value with Type::FROM_CODE type.
|
inline |
Move-assign operator for T.
Note: It sets value with Type::FROM_CODE type.
|
inline |
Sets the value to value which is provided from a file.