16 #ifndef __IPSDKBASEPROCESSING_LEAFCOLLVALUECOMPARISONRULEOPERATORS_H__ 17 #define __IPSDKBASEPROCESSING_LEAFCOLLVALUECOMPARISONRULEOPERATORS_H__ 20 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/LeafColl/LeafCollValueComparison/RuleLeafCollValueComparison.h> 33 template <
typename LeafType,
typename AttributeType>
34 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
35 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
36 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
37 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
39 isEqual(
const boost::shared_ptr<AttributeType>& pAttribute,
40 const typename LeafType::ValueType& value)
42 return isEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
45 template <
typename LeafType,
typename AttributeType>
46 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
47 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
48 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
49 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
51 isEqual(
const boost::weak_ptr<AttributeType>& pAttribute,
52 const typename LeafType::ValueType& value)
55 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
56 pOutputRule->
init(pAttribute, value);
67 template <
typename LeafType,
typename AttributeType>
68 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
69 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
70 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
71 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
73 isNotEqual(
const boost::shared_ptr<AttributeType>& pAttribute,
74 const typename LeafType::ValueType& value)
76 return isNotEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
79 template <
typename LeafType,
typename AttributeType>
80 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
81 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
82 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
83 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
85 isNotEqual(
const boost::weak_ptr<AttributeType>& pAttribute,
86 const typename LeafType::ValueType& value)
89 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
90 pOutputRule->
init(pAttribute, value);
101 template <
typename LeafType,
typename AttributeType>
102 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
103 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
104 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
105 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
107 isGreater(
const boost::shared_ptr<AttributeType>& pAttribute,
108 const typename LeafType::ValueType& value)
110 return isGreater<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
113 template <
typename LeafType,
typename AttributeType>
114 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
115 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
116 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
117 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
119 isGreater(
const boost::weak_ptr<AttributeType>& pAttribute,
120 const typename LeafType::ValueType& value)
123 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
124 pOutputRule->
init(pAttribute, value);
135 template <
typename LeafType,
typename AttributeType>
136 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
137 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
138 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
139 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
141 isLower(
const boost::shared_ptr<AttributeType>& pAttribute,
142 const typename LeafType::ValueType& value)
144 return isLower<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
147 template <
typename LeafType,
typename AttributeType>
148 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
149 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
150 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
151 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
153 isLower(
const boost::weak_ptr<AttributeType>& pAttribute,
154 const typename LeafType::ValueType& value)
157 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
158 pOutputRule->
init(pAttribute, value);
169 template <
typename LeafType,
typename AttributeType>
170 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
171 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
172 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
173 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
176 const typename LeafType::ValueType& value)
178 return isGreaterOrEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
181 template <
typename LeafType,
typename AttributeType>
182 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
183 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
184 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
185 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
188 const typename LeafType::ValueType& value)
191 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
192 pOutputRule->
init(pAttribute, value);
203 template <
typename LeafType,
typename AttributeType>
204 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
205 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
206 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
207 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
210 const typename LeafType::ValueType& value)
212 return isLowerOrEqual<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute), value);
215 template <
typename LeafType,
typename AttributeType>
216 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
217 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
218 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
219 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
222 const typename LeafType::ValueType& value)
225 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
226 pOutputRule->
init(pAttribute, value);
238 #endif // __IPSDKBASEPROCESSING_LEAFCOLLVALUECOMPARISONRULEOPERATORS_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
Concrete class for rule allowing to compare leaf value collection of data item attributes with a give...
Definition: RuleLeafCollValueComparison.h:30
void init(const boost::weak_ptr< const AttributeType > &pAttribute, const ValueType &value)
initialization of object
Definition: RuleLeafCollValueComparison.h:82
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
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