IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
RuleAttributeComparison.h
1 // RuleAttributeComparison.h:
3 // --------------------------
4 //
14 
15 #ifndef __IPSDKBASEPROCESSING_RULEATTRIBUTECOMPARISON_H__
16 #define __IPSDKBASEPROCESSING_RULEATTRIBUTECOMPARISON_H__
17 
18 #include <IPSDKBaseProcessing/Rule/Attribute/Value/AttributeComparison/BaseTAttributeComparisonRule.h>
19 
20 namespace ipsdk {
21 namespace processor {
22 
25 
26 template <typename AttributeType1,
27  typename AttributeType2,
28  eValueComparisonRuleType::domain ValueComparisonRuleType>
29 class RuleAttributeComparison : public BaseTAttributeComparisonRule<typename AttributeType1::ValueType,
30  ValueComparisonRuleType>
31 {
32 // predefined public types
33 public:
35  typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType1::g_attributeType>,
36  boost::mpl::int_<eAttributeType::eAT_Value> >::type,
37  typename AttributeType1::ValueType>::type ValueType1;
38 
40  typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType2::g_attributeType>,
41  boost::mpl::int_<eAttributeType::eAT_Value> >::type,
42  typename AttributeType2::ValueType>::type ValueType2;
43 
45  typedef typename boost::enable_if<typename boost::is_same<ValueType1, ValueType2>::type,
47 
48 public:
54 
55 // methods
56 public:
62  void init(const boost::weak_ptr<const AttributeType1>& pAttribute1,
63  const boost::weak_ptr<const AttributeType2>& pAttribute2);
64 
65 // attributes
66 protected:
67 
68 };
69 
72 
73 template <typename AttributeType1, typename AttributeType2, eValueComparisonRuleType::domain ValueComparisonRuleType>
74 inline void
75 RuleAttributeComparison<AttributeType1, AttributeType2, ValueComparisonRuleType>::init(const boost::weak_ptr<const AttributeType1>& pAttribute1,
76  const boost::weak_ptr<const AttributeType2>& pAttribute2)
77 {
78  // call of base class initialization method
80 }
81 
84 
85 } // end of namespace processor
86 } // end of namespace ipsdk
87 
88 #endif // __IPSDKBASEPROCESSING_RULEATTRIBUTECOMPARISON_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::enable_if< typename boost::is_same< boost::mpl::int_< AttributeType2::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_Value > >::type, typename AttributeType2::ValueType >::type ValueType2
retrieve second attribute type
Definition: RuleAttributeComparison.h:42
Base template class for rules allowing to compare attributes value.
Definition: BaseTAttributeComparisonRule.h:27
void initBase()
base class initialization method
void init(const boost::weak_ptr< const AttributeType1 > &pAttribute1, const boost::weak_ptr< const AttributeType2 > &pAttribute2)
initialization of object
Definition: RuleAttributeComparison.h:75
Concrete class for rules allowing to compare attributes value.
Definition: RuleAttributeComparison.h:29
boost::enable_if< typename boost::is_same< boost::mpl::int_< AttributeType1::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_Value > >::type, typename AttributeType1::ValueType >::type ValueType1
retrieve first attribute type
Definition: RuleAttributeComparison.h:37
boost::enable_if< typename boost::is_same< ValueType1, ValueType2 >::type, ValueType1 >::type ValueType
underlying type associated to attribute
Definition: RuleAttributeComparison.h:46