ASPECT
|
Public Types | |
enum | operation { uninitialized, add, subtract, minimum, maximum, replace_if_valid } |
Public Member Functions | |
Operator () | |
Operator (const operation op) | |
double | operator() (const double x, const double y) const |
bool | operator== (const operation op) const |
Private Attributes | |
operation | op |
A class that represents a binary operator between two doubles. The type of operation is specified on construction time, and can be checked later by using the operator ==. The operator () executes the operation on two double parameters and returns the result. This class is helpful for user specified operations that are not known at compile time.
Definition at line 894 of file utilities.h.
An enum of supported operations.
Enumerator | |
---|---|
uninitialized | |
add | |
subtract | |
minimum | |
maximum | |
replace_if_valid |
Definition at line 900 of file utilities.h.
aspect::Utilities::Operator::Operator | ( | ) |
The default constructor creates an invalid operation that will fail if ever executed.
aspect::Utilities::Operator::Operator | ( | const operation | op | ) |
Construct the selected operator.
double aspect::Utilities::Operator::operator() | ( | const double | x, |
const double | y | ||
) | const |
Execute the selected operation with the given parameters and return the result.
bool aspect::Utilities::Operator::operator== | ( | const operation | op | ) | const |
Return the comparison result between the current operation and the one provided as argument.
|
private |
The selected operation of this object.
Definition at line 937 of file utilities.h.