1 #ifndef GCP_UTIL_DATATYPETRUTHFN_H
2 #define GCP_UTIL_DATATYPETRUTHFN_H
11 #include "gcp/util/common/DataType.h"
13 #define DATATYPE_TRUTH_FN0(fn) bool (fn)(DataType& compVal)
14 #define DATATYPE_TRUTH_FN1(fn) bool (fn)(DataType& compVal, DataType& op1)
15 #define DATATYPE_TRUTH_FN2(fn) bool (fn)(DataType& compVal, DataType& op1, DataType& op2)
49 static bool alwaysTrue(
DataType& compVal);
67 bool isSingleValued();
79 DATATYPE_TRUTH_FN0(*fn0_);
80 DATATYPE_TRUTH_FN1(*fn1_);
81 DATATYPE_TRUTH_FN2(*fn2_);
90 std::string formatZeroValuedFn(std::string& reg);
91 std::string formatSingleValuedFn (std::string& reg,
DataType& op1_);
92 std::string formatDualValuedFn(std::string& reg,
DataType& op1_,
DataType& op2_);
94 std::string formatOp(DATATYPE_TRUTH_FN1(*fn_));
95 std::string formatOp1(DATATYPE_TRUTH_FN2(*fn_));
96 std::string formatOp2(DATATYPE_TRUTH_FN2(*fn_));
97 std::string formatLogical(DATATYPE_TRUTH_FN2(*fn_));
99 std::string formatVal(
DataType& val);
100 std::string formatReg(std::string& reg);
109 #endif // End #ifndef GCP_UTIL_DATATYPETRUTHFN_H
virtual ~DataTypeTruthFn()
Definition: DataTypeTruthFn.cc:33
Definition: DataTypeTruthFn.h:24
DataTypeTruthFn(DATATYPE_TRUTH_FN0(*fn)=0)
Definition: DataTypeTruthFn.cc:12
Definition: DataType.h:27