FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Core::FMTOperator Class Reference

Mathematical operator usable in yield and output expressions. More...

#include <FMTOperator.h>

Public Member Functions

 FMTOperator ()
 Default constructor for FMTOperator.
 
 ~FMTOperator ()=default
 Default destructor for FMTOperator.
 
 FMTOperator (FMTokey lkey)
 Construct a FMTOperator from an operator key.
 
 FMTOperator (std::string strkey)
 Construct a FMTOperator from a string key.
 
bool operator== (const FMTOperator &rhs) const
 Equality comparison operator of FMTOperator.
 
bool operator!= (const FMTOperator &rhs) const
 Inequality comparison operator of FMTOperator.
 
double call (const double &rhs1, const double &rhs2) const
 Apply the operator to two values.
 
 FMTOperator (const FMTOperator &rhs)
 Copy constructor for FMTOperator.
 
FMTOperatoroperator= (const FMTOperator &rhs)
 Copy assignment operator for FMTOperator.
 
int precedence () const
 Return the precedence of the operator.
 
std::string associativity () const
 Return the associativity of the operator.
 
FMTOperator reverse () const
 Return the reversed operator.
 
bool valid () const
 Return true if the operator is valid.
 
size_t hash () const
 Return the hash of the operator.
 
bool isFactor () const
 Return true if the operator is a multiplication or a division.
 
bool isDivide () const
 Return true if the operator is a division.
 
FMTokey getKey () const
 Return the key of the operator.
 
 operator std::string () const
 Convert the operator to its string representation.
 

Friends

class boost::serialization::access
 

Detailed Description

Mathematical operator usable in yield and output expressions.

Constructor & Destructor Documentation

◆ FMTOperator() [1/4]

Core::FMTOperator::FMTOperator ( )

Default constructor for FMTOperator.

◆ ~FMTOperator()

Core::FMTOperator::~FMTOperator ( )
default

Default destructor for FMTOperator.

◆ FMTOperator() [2/4]

Core::FMTOperator::FMTOperator ( FMTokey  lkey)

Construct a FMTOperator from an operator key.

Parameters
[in]lkeythe operator key.

◆ FMTOperator() [3/4]

Core::FMTOperator::FMTOperator ( std::string  strkey)

Construct a FMTOperator from a string key.

Parameters
[in]strkeythe string representation of the operator.

◆ FMTOperator() [4/4]

Core::FMTOperator::FMTOperator ( const FMTOperator rhs)

Copy constructor for FMTOperator.

Parameters
[in]rhsthe FMTOperator to copy.

Member Function Documentation

◆ associativity()

std::string Core::FMTOperator::associativity ( ) const

Return the associativity of the operator.

Returns
the associativity.

◆ call()

double Core::FMTOperator::call ( const double &  rhs1,
const double &  rhs2 
) const

Apply the operator to two values.

Parameters
[in]rhs1the first operand.
[in]rhs2the second operand.
Returns
the result of the operation.

◆ getKey()

FMTokey Core::FMTOperator::getKey ( ) const

Return the key of the operator.

Returns
the operator key.

◆ hash()

size_t Core::FMTOperator::hash ( ) const

Return the hash of the operator.

Returns
the hash value.

◆ isDivide()

bool Core::FMTOperator::isDivide ( ) const

Return true if the operator is a division.

Returns
true if the operator is a division else false.

◆ isFactor()

bool Core::FMTOperator::isFactor ( ) const

Return true if the operator is a multiplication or a division.

Returns
true if the operator is a factor else false.

◆ operator std::string()

Core::FMTOperator::operator std::string ( ) const

Convert the operator to its string representation.

Returns
the string representation of the operator.

◆ operator!=()

bool Core::FMTOperator::operator!= ( const FMTOperator rhs) const

Inequality comparison operator of FMTOperator.

Parameters
[in]rhsthe FMTOperator to compare with.
Returns
true if both operators are different else false.

◆ operator=()

FMTOperator & Core::FMTOperator::operator= ( const FMTOperator rhs)

Copy assignment operator for FMTOperator.

Parameters
[in]rhsthe FMTOperator to copy.
Returns
a reference to this FMTOperator.

◆ operator==()

bool Core::FMTOperator::operator== ( const FMTOperator rhs) const

Equality comparison operator of FMTOperator.

Parameters
[in]rhsthe FMTOperator to compare with.
Returns
true if both operators are equal else false.

◆ precedence()

int Core::FMTOperator::precedence ( ) const

Return the precedence of the operator.

Returns
the precedence.

◆ reverse()

FMTOperator Core::FMTOperator::reverse ( ) const

Return the reversed operator.

Returns
the reversed operator.

◆ valid()

bool Core::FMTOperator::valid ( ) const

Return true if the operator is valid.

Returns
true if the operator is valid else false.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

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