16 #ifndef __IPSDKBASEPROCESSING_LEAFPROPERTYRULEOPERATORS_H__ 17 #define __IPSDKBASEPROCESSING_LEAFPROPERTYRULEOPERATORS_H__ 20 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/Leaf/LeafProperty/RuleLeafProperty.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 isOdd(
const boost::shared_ptr<AttributeType>& pAttribute)
38 return isOdd<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute));
41 template <
typename LeafType,
typename AttributeType>
42 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
43 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
44 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
45 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
47 isOdd(
const boost::weak_ptr<const AttributeType>& pAttribute)
50 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
51 pOutputRule->
init(pAttribute);
59 template <
typename LeafType,
typename AttributeType>
60 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
61 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
62 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
63 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
65 isEven(
const boost::shared_ptr<AttributeType>& pAttribute)
67 return isEven<LeafType>(boost::weak_ptr<const AttributeType>(pAttribute));
70 template <
typename LeafType,
typename AttributeType>
71 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
72 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
73 typename boost::is_same<boost::mpl::int_<LeafType::g_itemType>,
74 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type>::type,
76 isEven(
const boost::weak_ptr<const AttributeType>& pAttribute)
79 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
80 pOutputRule->
init(pAttribute);
92 #endif // __IPSDKBASEPROCESSING_LEAFPROPERTYRULEOPERATORS_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base operators used to combined rules.
Concrete class for rule allowing to check properties of leafs of data item attributes.
Definition: RuleLeafProperty.h:30
void init(const boost::weak_ptr< const AttributeType > &pAttribute)
initialization of object
Definition: RuleLeafProperty.h:77
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_< LeafType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isEven(const boost::shared_ptr< AttributeType > &pAttribute)
functions allowing to check whether attribute value is even
Definition: LeafPropertyRuleOperators.h:65
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_< LeafType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type >::type, RulePtr >::type isOdd(const boost::shared_ptr< AttributeType > &pAttribute)
functions allowing to check whether attribute value is odd
Definition: LeafPropertyRuleOperators.h:36