16 #ifndef __IPSDKBASEPROCESSING_NODECOLLSIZERULEOPERATORS_H__ 17 #define __IPSDKBASEPROCESSING_NODECOLLSIZERULEOPERATORS_H__ 20 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/NodeColl/Size/RuleNodeCollSize.h> 21 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/NodeColl/Size/RuleNodesCollSize.h> 31 template <
typename NodeCollType,
typename AttributeType>
32 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
33 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
34 typename boost::is_same<boost::mpl::int_<NodeCollType::g_itemType>,
35 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type>::type,
37 isNotEmpty(
const boost::shared_ptr<AttributeType>& pAttribute)
39 return isNotEmpty<NodeCollType>(boost::weak_ptr<const AttributeType>(pAttribute));
42 template <
typename NodeCollType,
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_<NodeCollType::g_itemType>,
46 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type>::type,
48 isNotEmpty(
const boost::weak_ptr<const AttributeType>& pAttribute)
51 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
52 pOutputRule->
init(pAttribute, 0);
60 template <
typename NodeCollType,
typename AttributeType>
61 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
62 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
63 typename boost::is_same<boost::mpl::int_<NodeCollType::g_itemType>,
64 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type>::type,
66 isEmpty(
const boost::shared_ptr<AttributeType>& pAttribute)
68 return isEmpty<NodeCollType>(boost::weak_ptr<const AttributeType>(pAttribute));
71 template <
typename NodeCollType,
typename AttributeType>
72 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
73 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
74 typename boost::is_same<boost::mpl::int_<NodeCollType::g_itemType>,
75 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type>::type,
77 isEmpty(
const boost::weak_ptr<const AttributeType>& pAttribute)
80 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
81 pOutputRule->
init(pAttribute, 0);
89 template <
typename NodeCollType,
typename AttributeType>
90 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType::g_attributeType>,
91 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
92 typename boost::is_same<boost::mpl::int_<NodeCollType::g_itemType>,
93 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type>::type,
95 matchSize(
const boost::shared_ptr<AttributeType>& pAttribute,
98 return matchSize<NodeCollType>(boost::weak_ptr<const AttributeType>(pAttribute), targetSize);
101 template <
typename NodeCollType,
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_<NodeCollType::g_itemType>,
105 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type>::type,
107 matchSize(
const boost::weak_ptr<const AttributeType>& pAttribute,
111 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
112 pOutputRule->
init(pAttribute, targetSize);
120 template <
typename NodeCollType1,
typename NodeCollType2,
typename AttributeType1,
typename AttributeType2>
121 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType1::g_attributeType>,
122 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
123 typename boost::is_same<boost::mpl::int_<NodeCollType1::g_itemType>,
124 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type,
125 typename boost::is_same<boost::mpl::int_<AttributeType2::g_attributeType>,
126 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
127 typename boost::mpl::or_<typename boost::is_same<boost::mpl::int_<NodeCollType2::g_itemType>,
128 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type,
129 typename boost::is_same<boost::mpl::int_<NodeCollType2::g_itemType>,
130 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type>::type,
132 matchSize(
const boost::shared_ptr<AttributeType1>& pAttribute1,
133 const boost::shared_ptr<AttributeType2>& pAttribute2)
135 return matchSize<NodeCollType1, NodeCollType2, AttributeType1, AttributeType2>(
136 boost::weak_ptr<const AttributeType1>(pAttribute1),
137 boost::weak_ptr<const AttributeType2>(pAttribute2));
140 template <
typename NodeCollType1,
typename NodeCollType2,
typename AttributeType1,
typename AttributeType2>
141 inline typename boost::enable_if<typename boost::mpl::and_<typename boost::is_same<boost::mpl::int_<AttributeType1::g_attributeType>,
142 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
143 typename boost::is_same<boost::mpl::int_<NodeCollType1::g_itemType>,
144 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type,
145 typename boost::is_same<boost::mpl::int_<AttributeType2::g_attributeType>,
146 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
147 typename boost::mpl::or_<typename boost::is_same<boost::mpl::int_<NodeCollType2::g_itemType>,
148 boost::mpl::int_<eDataItemType::eDIT_NodeColl> >::type,
149 typename boost::is_same<boost::mpl::int_<NodeCollType2::g_itemType>,
150 boost::mpl::int_<eDataItemType::eDIT_LeafColl> >::type>::type>::type,
152 matchSize(
const boost::weak_ptr<const AttributeType1>& pAttribute1,
153 const boost::weak_ptr<const AttributeType2>& pAttribute2)
156 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
157 pOutputRule->
init(pAttribute1, pAttribute2);
169 #endif // __IPSDKBASEPROCESSING_NODECOLLSIZERULEOPERATORS_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base operators used to combined rules.
void init(const boost::weak_ptr< const AttributeType1 > &pAttribute1, const boost::weak_ptr< const AttributeType2 > &pAttribute2)
initialization of object
Definition: RuleNodesCollSize.h:92
Concrete class for rules on size of node collections of data item attributes.
Definition: RuleNodeCollSize.h:30
boost::shared_ptr< BaseRule > RulePtr
shared pointer to rule
Definition: RuleTypes.h:104
void init(const boost::weak_ptr< const AttributeType > &pAttribute, const ipUInt32 value)
initialization of object
Definition: RuleNodeCollSize.h:77
Concrete class for rules on size of node collections of data item attributes.
Definition: RuleNodesCollSize.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_< 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
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