Public Types | Public Member Functions | Private Attributes | List of all members
aspect::Utilities::Operator Class Reference

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

Detailed Description

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 1193 of file utilities.h.

Member Enumeration Documentation

§ operation

An enum of supported operations.


Definition at line 1199 of file utilities.h.

Constructor & Destructor Documentation

§ Operator() [1/2]

aspect::Utilities::Operator::Operator ( )

The default constructor creates an invalid operation that will fail if ever executed.

§ Operator() [2/2]

aspect::Utilities::Operator::Operator ( const operation  op)

Construct the selected operator.

Member Function Documentation

§ 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.

§ operator==()

bool aspect::Utilities::Operator::operator== ( const operation  op) const

Return the comparison result between the current operation and the one provided as argument.

Member Data Documentation

§ op

operation aspect::Utilities::Operator::op

The selected operation of this object.

Definition at line 1236 of file utilities.h.

The documentation for this class was generated from the following file: