15 #ifndef __IPSDKBASEPROCESSING_OPTIONALRULEOPERATORS_H__ 16 #define __IPSDKBASEPROCESSING_OPTIONALRULEOPERATORS_H__ 19 #include <IPSDKBaseProcessing/Rule/Attribute/Optional/RuleOptionalIsSet.h> 30 template <
typename AttributeType>
31 inline typename boost::enable_if_c<AttributeType::g_bOptional,
33 isSet(
const boost::shared_ptr<AttributeType>& pAttribute)
35 return isSet(boost::weak_ptr<AttributeType>(pAttribute));
37 template <
typename AttributeType>
38 inline typename boost::enable_if_c<AttributeType::g_bOptional,
40 isSet(
const boost::weak_ptr<AttributeType>& pAttribute)
43 boost::shared_ptr<RuleType> pOutputRule = boost::make_shared<RuleType>();
44 pOutputRule->
init(pAttribute);
53 template <
typename AttributeType>
54 inline typename boost::enable_if_c<AttributeType::g_bOptional,
56 ifIsSet(
const boost::shared_ptr<AttributeType>& pAttribute,
59 return ifIsSet(boost::weak_ptr<AttributeType>(pAttribute), pRuleTrue);
61 template <
typename AttributeType>
62 inline typename boost::enable_if_c<AttributeType::g_bOptional,
64 ifIsSet(
const boost::weak_ptr<AttributeType>& pAttribute,
77 #endif // __IPSDKBASEPROCESSING_OPTIONALRULEOPERATORS_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base operators used to combined rules.
IPSDKBASEPROCESSING_API RulePtr none()
function allowing to define an empty rule (always true)
boost::shared_ptr< BaseRule > RulePtr
shared pointer to rule
Definition: RuleTypes.h:104
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type ifIsSet(const boost::shared_ptr< AttributeType > &pAttribute, const RulePtr &pRuleTrue)
Definition: OptionalRuleOperators.h:56
Rule allowing to check whether an optional attribute has been set.
Definition: RuleOptionalIsSet.h:26
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
Definition: OptionalRuleOperators.h:33
void init(const AttributeConstWeakPtr &pAttribute)
initialization of object
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)
function allowing to define a conditional condition check rule