16 #ifndef __IPSDKBASEPROCESSING_VALUEPROPERTYRULEOPERATORS_H__ 17 #define __IPSDKBASEPROCESSING_VALUEPROPERTYRULEOPERATORS_H__ 20 #include <IPSDKBaseProcessing/Rule/Attribute/Value/ValueProperty/RuleValueProperty.h> 21 #include <IPSDKBaseProcessing/Attribute/Value/BaseValueAttribute.h> 32 template <
typename AttributeType>
33 inline typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
34 boost::mpl::int_<eAttributeType::eAT_Value> >::type,
36 isOdd(
const boost::shared_ptr<AttributeType>& pAttribute)
38 return isOdd(boost::weak_ptr<AttributeType>(pAttribute));
41 template <
typename AttributeType>
42 inline typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
43 boost::mpl::int_<eAttributeType::eAT_Value> >::type,
45 isOdd(
const boost::weak_ptr<AttributeType>& pAttribute)
48 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
49 pOutputRule->
init(pAttribute);
57 template <
typename AttributeType>
58 inline typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
59 boost::mpl::int_<eAttributeType::eAT_Value> >::type,
61 isEven(
const boost::shared_ptr<const AttributeType>& pAttribute)
63 return isEven(boost::weak_ptr<AttributeType>(pAttribute));
66 template <
typename AttributeType>
67 inline typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
68 boost::mpl::int_<eAttributeType::eAT_Value> >::type,
70 isEven(
const boost::weak_ptr<AttributeType>& pAttribute)
73 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
74 pOutputRule->
init(pAttribute);
86 #endif // __IPSDKBASEPROCESSING_VALUEPROPERTYRULEOPERATORS_H__ void init(const boost::weak_ptr< const AttributeType > &pAttribute)
initialization of object
Definition: RuleValueProperty.h:63
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_< 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
Concrete class for rules allowing to check attributes value properties.
Definition: RuleValueProperty.h:29