ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
Classes | Functions
named_func.hpp File Reference
#include <string>
#include <functional>
#include <ostream>
#include <vector>
#include "TString.h"
#include "core/baby.hpp"

Go to the source code of this file.

Classes

class  NamedFunc
 Combines a callable function taking a Baby and returning a scalar or vector with its string representation. More...
 

Functions

NamedFunc operator+ (NamedFunc f, NamedFunc g)
 Add two NamedFuncs. More...
 
NamedFunc operator- (NamedFunc f, NamedFunc g)
 Add a NamedFunc from another. More...
 
NamedFunc operator* (NamedFunc f, NamedFunc g)
 Multiply two NamedFuncs. More...
 
NamedFunc operator/ (NamedFunc f, NamedFunc g)
 Divide two NamedFuncs. More...
 
NamedFunc operator% (NamedFunc f, NamedFunc g)
 Get remainder form division of two NamedFuncs. More...
 
NamedFunc operator+ (NamedFunc f)
 Applied unary plus operator. Acts as identity operation. More...
 
NamedFunc operator- (NamedFunc f)
 Negates f. More...
 
NamedFunc operator== (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests for equality of results of f and g. More...
 
NamedFunc operator!= (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests for inequality of results of f and g. More...
 
NamedFunc operator> (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests if result of f is greater than result of g. More...
 
NamedFunc operator< (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests if result of f is less than result of g. More...
 
NamedFunc operator>= (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests if result of f is greater than or equal to result of g. More...
 
NamedFunc operator<= (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests if result of f is less than or equal to result of g. More...
 
NamedFunc operator&& (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests if results of both f and g are true. More...
 
NamedFunc operator|| (NamedFunc f, NamedFunc g)
 Gets NamedFunc which tests if result of f or g is true. More...
 
NamedFunc operator! (NamedFunc f)
 Gets NamedFunct returning logical inverse of result of f. More...
 
std::ostream & operator<< (std::ostream &stream, const NamedFunc &function)
 Print NamedFunc to output stream. More...
 
bool HavePass (const NamedFunc::VectorType &v)
 
bool HavePass (const std::vector< NamedFunc::VectorType > &vv)
 

Function Documentation

bool HavePass ( const NamedFunc::VectorType v)
bool HavePass ( const std::vector< NamedFunc::VectorType > &  vv)

Definition at line 837 of file named_func.cpp.

NamedFunc operator! ( NamedFunc  f)

Gets NamedFunct returning logical inverse of result of f.

Parameters
[in]fFunction whose result the logical not is applied to
Returns
NamedFunc returning logical inverse of result of f

Definition at line 812 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

Gets NamedFunc which tests for inequality of results of f and g.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f and g are not equal

Definition at line 683 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator% ( NamedFunc  f,
NamedFunc  g 
)

Get remainder form division of two NamedFuncs.

Parameters
[in]fDividend
[in]gDivisor
Returns
NamedFunc which returns the remainder from dividing the results of f and g

Definition at line 629 of file named_func.cpp.

NamedFunc operator&& ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests if results of both f and g are true.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of both f and g are true

Definition at line 778 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator* ( NamedFunc  f,
NamedFunc  g 
)

Multiply two NamedFuncs.

Parameters
[in]fMultiplier
[in]gMultiplicand
Returns
NamedFunc which returns the product of the results of f and g

Definition at line 604 of file named_func.cpp.

NamedFunc operator+ ( NamedFunc  f,
NamedFunc  g 
)

Add two NamedFuncs.

Parameters
[in]fAugend
[in]gAddend
Returns
NamedFunc which returns the sum of the results of f and g

Definition at line 580 of file named_func.cpp.

NamedFunc operator+ ( NamedFunc  f)

Applied unary plus operator. Acts as identity operation.

Parameters
[in]fNamedFunc to apply unary "+" to
Returns
f

Definition at line 639 of file named_func.cpp.

References NamedFunc::Name().

NamedFunc operator- ( NamedFunc  f,
NamedFunc  g 
)

Add a NamedFunc from another.

Parameters
[in]fMinuend
[in]gSubtrahend
Returns
NamedFunc which returns the difference of the results of f and g

Definition at line 592 of file named_func.cpp.

NamedFunc operator- ( NamedFunc  f)

Negates f.

Parameters
[in]fNamedFunc to apply unary "-" to
Returns
NamedFunc returing the negative of the result of f

Definition at line 650 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator/ ( NamedFunc  f,
NamedFunc  g 
)

Divide two NamedFuncs.

Parameters
[in]fDividend
[in]gDivisor
Returns
NamedFunc which returns the quotient of the results of f and g

Definition at line 616 of file named_func.cpp.

NamedFunc operator< ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests if result of f is less than result of g.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f is less than result of g

Definition at line 720 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

std::ostream& operator<< ( ostream &  stream,
const NamedFunc function 
)

Print NamedFunc to output stream.

Parameters
[in,out]streamOutput stream to print to
[in]functionNamedFunc to print

Definition at line 825 of file named_func.cpp.

NamedFunc operator<= ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests if result of f is less than or equal to result of g.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f is less than or equal to result of g

Definition at line 760 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator== ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests for equality of results of f and g.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f and g are equal

Definition at line 665 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator> ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests if result of f is greater than result of g.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f is greater than result of g

Definition at line 702 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator>= ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests if result of f is greater than or equal to result of g.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f is greater than or equal to result of g

Definition at line 740 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().

NamedFunc operator|| ( NamedFunc  f,
NamedFunc  g 
)

Gets NamedFunc which tests if result of f or g is true.

Parameters
[in]fLeft hand operand
[in]gRight hand operand
Returns
NamedFunc returning whether the results of f or g is true

Definition at line 796 of file named_func.cpp.

References anonymous_namespace{named_func.cpp}::ApplyOp(), NamedFunc::Function(), NamedFunc::Name(), NamedFunc::ScalarFunction(), and NamedFunc::VectorFunction().