16 #ifndef __IPSDKBASEPROCESSING_LEAFCOLLSIZERULEOPERATORS_H__ 17 #define __IPSDKBASEPROCESSING_LEAFCOLLSIZERULEOPERATORS_H__ 20 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/LeafColl/Size/RuleLeafCollSize.h> 30 template <
typename LeafCollType,
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_<LeafCollType::g_itemType>,
34 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
36 isNotEmpty(
const boost::shared_ptr<AttributeType>& pAttribute)
38 return isNotEmpty<LeafCollType>(boost::weak_ptr<const AttributeType>(pAttribute));
41 template <
typename LeafCollType,
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_<LeafCollType::g_itemType>,
45 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
47 isNotEmpty(
const boost::weak_ptr<const AttributeType>& pAttribute)
50 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
51 pOutputRule->
init(pAttribute, 0);
59 template <
typename LeafCollType,
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_<LeafCollType::g_itemType>,
63 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
65 isEmpty(
const boost::shared_ptr<AttributeType>& pAttribute)
67 return isEmpty<LeafCollType>(boost::weak_ptr<const AttributeType>(pAttribute));
70 template <
typename LeafCollType,
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_<LeafCollType::g_itemType>,
74 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
76 isEmpty(
const boost::weak_ptr<const AttributeType>& pAttribute)
79 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
80 pOutputRule->
init(pAttribute, 0);
88 template <
typename LeafCollType,
typename AttributeType>
89 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
90 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
91 typename boost::is_same<boost::mpl::int_<LeafCollType::g_itemType>,
92 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
94 matchSize(
const boost::shared_ptr<AttributeType>& pAttribute,
97 return matchSize<LeafCollType>(boost::weak_ptr<const AttributeType>(pAttribute), targetSize);
100 template <
typename LeafCollType,
typename AttributeType>
101 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
102 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
103 typename boost::is_same<boost::mpl::int_<LeafCollType::g_itemType>,
104 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type,
106 matchSize(
const boost::weak_ptr<const AttributeType>& pAttribute,
110 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
111 pOutputRule->
init(pAttribute, targetSize);
123 #endif // __IPSDKBASEPROCESSING_LEAFCOLLSIZERULEOPERATORS_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base operators used to combined rules.
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_< LeafCollType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_LeafColl > >::type >::type, RulePtr >::type matchSize(const boost::shared_ptr< AttributeType > &pAttribute, const ipUInt32 targetSize)
functions allowing to check leaf collection size
Definition: LeafCollSizeRuleOperators.h:94
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_< LeafCollType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_LeafColl > >::type >::type, RulePtr >::type isNotEmpty(const boost::shared_ptr< AttributeType > &pAttribute)
functions allowing to check that a leaf collection is not empty
Definition: LeafCollSizeRuleOperators.h:36
Concrete class for rules on size of leaf collections of data item attributes.
Definition: RuleLeafCollSize.h:30
void init(const boost::weak_ptr< const AttributeType > &pAttribute, const ipUInt32 value)
initialization of object
Definition: RuleLeafCollSize.h:81
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_< LeafCollType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_LeafColl > >::type >::type, RulePtr >::type isEmpty(const boost::shared_ptr< AttributeType > &pAttribute)
functions allowing to check that a leaf collection is empty
Definition: LeafCollSizeRuleOperators.h:65
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53