16 #ifndef __IPSDKBASEPROCESSING_RULELEAFSCOMPARISON_H__ 17 #define __IPSDKBASEPROCESSING_RULELEAFSCOMPARISON_H__ 19 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/Leaf/LeafsComparison/BaseTLeafsComparisonRule.h> 27 template <
typename AttributeType1,
29 typename AttributeType2,
31 eValueComparisonRuleType::domain ValueComparisonRuleType>
33 ValueComparisonRuleType>
39 typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType1::g_attributeType>,
40 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
42 typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<AttributeType2::g_attributeType>,
43 boost::mpl::int_<eAttributeType::eAT_DataItem> >::type,
49 typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<LeafType1::g_itemType>,
50 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type,
52 typedef typename boost::enable_if<typename boost::is_same<boost::mpl::int_<LeafType2::g_itemType>,
53 boost::mpl::int_<eDataItemType::eDIT_Leaf> >::type,
60 typedef typename boost::enable_if<typename boost::is_same<ValueType1, ValueType2>::type,
78 void init(
const boost::weak_ptr<const AttributeType1>& pAttribute1,
79 const boost::weak_ptr<const AttributeType2>& pAttribute2);
102 template <
typename AttributeType1,
typename LeafType1,
typename AttributeType2,
typename LeafType2, eValueComparisonRuleType::domain ValueComparisonRuleType>
105 const boost::weak_ptr<const AttributeType2>& pAttribute2)
111 template <
typename AttributeType1,
typename LeafType1,
typename AttributeType2,
typename LeafType2, eValueComparisonRuleType::domain ValueComparisonRuleType>
115 return AttributeType1::getObjectNameStr() +
"::" +
116 DataItemType1::template getNodeNameStr<LeafType1>();
119 template <
typename AttributeType1,
typename LeafType1,
typename AttributeType2,
typename LeafType2, eValueComparisonRuleType::domain ValueComparisonRuleType>
123 return AttributeType2::getObjectNameStr() +
"::" +
124 DataItemType2::template getNodeNameStr<LeafType2>();
127 template <
typename AttributeType1,
typename LeafType1,
typename AttributeType2,
typename LeafType2, eValueComparisonRuleType::domain ValueComparisonRuleType>
132 const AttributeType1& derivedAttribute1 =
static_cast<const AttributeType1&
>(this->getAttribute1());
134 return derivedAttribute1.getNode().template getValue<LeafType1>();
137 template <
typename AttributeType1,
typename LeafType1,
typename AttributeType2,
typename LeafType2, eValueComparisonRuleType::domain ValueComparisonRuleType>
142 const AttributeType2& derivedAttribute2 =
static_cast<const AttributeType2&
>(this->getAttribute2());
144 return derivedAttribute2.getNode().template getValue<LeafType2>();
153 #endif // __IPSDKBASEPROCESSING_RULELEAFSCOMPARISON_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
std::string getAttribute2Name() const
method allowing to retrieve attributes name into derived class
Definition: RuleLeafsComparison.h:121
boost::enable_if< typename boost::is_same< boost::mpl::int_< AttributeType1::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename AttributeType1::ValueType >::type DataItemType1
retrieve DataItem node type associated to attribute
Definition: RuleLeafsComparison.h:41
void initBase()
base class initialization method
Base template class for rule allowing to compare leaf values of data item attributes.
Definition: BaseTLeafsComparisonRule.h:28
boost::enable_if< typename boost::is_same< ValueType1, ValueType2 >::type, ValueType1 >::type ValueType
Value type associated to leaf.
Definition: RuleLeafsComparison.h:61
boost::enable_if< typename boost::is_same< boost::mpl::int_< LeafType1::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename LeafType1::ValueType >::type ValueType1
retrieve associated child node information structure
Definition: RuleLeafsComparison.h:51
void init(const boost::weak_ptr< const AttributeType1 > &pAttribute1, const boost::weak_ptr< const AttributeType2 > &pAttribute2)
initialization of object
Definition: RuleLeafsComparison.h:104
const ValueType & getAttribute1Value() const
method allowing to retrieve attribute value into derived class
Definition: RuleLeafsComparison.h:129
std::string getAttribute1Name() const
method allowing to retrieve attributes name into derived class
Definition: RuleLeafsComparison.h:113
Concrete class for rule allowing to compare leaf values of data item attributes.
Definition: RuleLeafsComparison.h:32
boost::enable_if< typename boost::is_same< boost::mpl::int_< AttributeType2::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename AttributeType2::ValueType >::type DataItemType2
retrieve DataItem node type associated to attribute
Definition: RuleLeafsComparison.h:44
const ValueType & getAttribute2Value() const
method allowing to retrieve attribute value into derived class
Definition: RuleLeafsComparison.h:139
boost::enable_if< typename boost::is_same< boost::mpl::int_< LeafType2::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_Leaf > >::type, typename LeafType2::ValueType >::type ValueType2
retrieve associated child node information structure
Definition: RuleLeafsComparison.h:54