16 #ifndef __IPSDKBASEPROCESSING_LEAFVALUECOMPARISONRULEOPERATORS_H__ 17 #define __IPSDKBASEPROCESSING_LEAFVALUECOMPARISONRULEOPERATORS_H__ 20 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/Leaf/LeafValueComparison/RuleLeafValueComparison.h> 30 template <
typename LeafType,
typename AttributeType>
31 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
32 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
33 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
34 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
36 isEqual(
const boost::shared_ptr<AttributeType>& pAttribute,
37 const typename LeafType::ValueType& value)
39 return isEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
42 template <
typename LeafType,
typename AttributeType>
43 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
44 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
45 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
46 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
48 isEqual(
const boost::weak_ptr<AttributeType>& pAttribute,
49 const typename LeafType::ValueType& value)
52 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
53 pOutputRule->init(pAttribute, value);
64 template <
typename LeafType,
typename AttributeType>
65 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
66 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
67 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
68 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
70 isNotEqual(
const boost::shared_ptr<AttributeType>& pAttribute,
71 const typename LeafType::ValueType& value)
73 return isNotEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
76 template <
typename LeafType,
typename AttributeType>
77 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
78 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
79 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
80 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
82 isNotEqual(
const boost::weak_ptr<AttributeType>& pAttribute,
83 const typename LeafType::ValueType& value)
86 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
87 pOutputRule->init(pAttribute, value);
98 template <
typename LeafType,
typename AttributeType>
99 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
100 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
101 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
102 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
104 isGreater(
const boost::shared_ptr<AttributeType>& pAttribute,
105 const typename LeafType::ValueType& value)
107 return isGreater<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
110 template <
typename LeafType,
typename AttributeType>
111 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
112 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
113 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
114 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
116 isGreater(
const boost::weak_ptr<AttributeType>& pAttribute,
117 const typename LeafType::ValueType& value)
120 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
121 pOutputRule->init(pAttribute, value);
132 template <
typename LeafType,
typename AttributeType>
133 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
134 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
135 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
136 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
138 isLower(
const boost::shared_ptr<AttributeType>& pAttribute,
139 const typename LeafType::ValueType& value)
141 return isLower<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
144 template <
typename LeafType,
typename AttributeType>
145 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
146 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
147 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
148 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
150 isLower(
const boost::weak_ptr<AttributeType>& pAttribute,
151 const typename LeafType::ValueType& value)
154 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
155 pOutputRule->init(pAttribute, value);
166 template <
typename LeafType,
typename AttributeType>
167 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
168 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
169 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
170 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
173 const typename LeafType::ValueType& value)
175 return isGreaterOrEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
178 template <
typename LeafType,
typename AttributeType>
179 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
180 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
181 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
182 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
185 const typename LeafType::ValueType& value)
188 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
189 pOutputRule->init(pAttribute, value);
200 template <
typename LeafType,
typename AttributeType>
201 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
202 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
203 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
204 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
207 const typename LeafType::ValueType& value)
209 return isLowerOrEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
212 template <
typename LeafType,
typename AttributeType>
213 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
214 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
215 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
216 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
219 const typename LeafType::ValueType& value)
222 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
223 pOutputRule->init(pAttribute, value);
235 #endif // __IPSDKBASEPROCESSING_LEAFVALUECOMPARISONRULEOPERATORS_H__ boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isGreater(const boost::shared_ptr< AttributeType > &pAttribute)
Rule allowing to check whether a DataItem Leaf is greater than another.
Definition: LeafsComparisonRuleOperators.h:170
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base operators used to combined rules.
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isNotEqual(const boost::shared_ptr< AttributeType > &pAttribute)
Rule allowing to check whether a DataItem Leaf is not equal to another.
Definition: LeafsComparisonRuleOperators.h:106
boost::shared_ptr< BaseRule > RulePtr
shared pointer to rule
Definition: RuleTypes.h:104
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isGreaterOrEqual(const boost::shared_ptr< AttributeType > &pAttribute)
Rule allowing to check whether a DataItem Leaf is greater or equal to another.
Definition: LeafsComparisonRuleOperators.h:298
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isLower(const boost::shared_ptr< AttributeType > &pAttribute)
Rule allowing to check whether a DataItem Leaf is lower than another.
Definition: LeafsComparisonRuleOperators.h:234
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isEqual(const boost::shared_ptr< AttributeType > &pAttribute)
Rule allowing to check whether a DataItem Leaf is equal to another.
Definition: LeafsComparisonRuleOperators.h:42
Concrete class for rule allowing to compare leaf value of data item attributes with a given value...
Definition: RuleLeafValueComparison.h:32
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isLowerOrEqual(const boost::shared_ptr< AttributeType > &pAttribute)
Rule allowing to check whether a DataItem Leaf is lower or equal to another.
Definition: LeafsComparisonRuleOperators.h:362