IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseTLeafsComparisonRule.h
1 // BaseTLeafsComparisonRule.h:
3 // ---------------------------
4 //
15 
16 #ifndef __IPSDKBASEPROCESSING_BASETLEAFSCOMPARISONRULE_H__
17 #define __IPSDKBASEPROCESSING_BASETLEAFSCOMPARISONRULE_H__
18 
19 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/Leaf/LeafsComparison/BaseLeafsComparisonRule.h>
20 
21 namespace ipsdk {
22 namespace processor {
23 
26 
27 template <typename T, eValueComparisonRuleType::domain ValueComparisonRuleType>
29 {
30 // predefined public types
31 public:
33  typedef T ValueType;
34 
36  static const eValueComparisonRuleType::domain g_valueComparisonRuleType = ValueComparisonRuleType;
37 
38 public:
42  virtual ~BaseTLeafsComparisonRule() = 0;
44 
45 // methods
46 public:
48  inline eValueComparisonRuleType getValueComparisonRuleType() const;
49 
50 protected:
53  virtual std::string getAttribute1Name() const = 0;
54  virtual std::string getAttribute2Name() const = 0;
56 
59  virtual const T& getAttribute1Value() const = 0;
60  virtual const T& getAttribute2Value() const = 0;
62 
63 private:
65  bool testRule() const;
66 
68  std::string createRuleFormalString() const;
69 
71  std::string createRuleEvaluatedString(const ipUInt32 increment) const;
72 
73 // attributes
74 protected:
75 
76 };
77 
80 
81 template <typename T, eValueComparisonRuleType::domain ValueComparisonRuleType>
84 {
85  return g_valueComparisonRuleType;
86 }
87 
90 
91 } // end of namespace processor
92 } // end of namespace ipsdk
93 
94 #endif // __IPSDKBASEPROCESSING_BASETLEAFSCOMPARISONRULE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define IPSDKBASEPROCESSING_API
Import/Export macro for library IPSDKBaseProcessing.
Definition: IPSDKBaseProcessingExports.h:27
eValueComparisonRuleType
enumerate describing value comparison rule operation type
Definition: RuleTypes.h:56
eValueComparisonRuleType getValueComparisonRuleType() const
retrieve value comparison rule operation type
Definition: BaseTLeafsComparisonRule.h:83
Base template class for rule allowing to compare leaf values of data item attributes.
Definition: BaseTLeafsComparisonRule.h:28
Base class for rule allowing to compare leaf values of data item attributes.
Definition: BaseLeafsComparisonRule.h:27
T ValueType
underlying type associated to attribute
Definition: BaseTLeafsComparisonRule.h:33
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53