IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseAttributeRule.h
1 // BaseAttributeRule.h:
3 // --------------------
4 //
14 
15 #ifndef __IPSDKBASEPROCESSING_BASEATTRIBUTERULE_H__
16 #define __IPSDKBASEPROCESSING_BASEATTRIBUTERULE_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::processor::BaseAttributeRule::_pAttribute1' : class 'boost::weak_ptr<const ipsdk::processor::BaseAttribute>' needs to have dll-interface to be used by clients of class 'ipsdk::processor::BaseAttributeRule'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKBaseProcessing/Rule/BaseRule.h>
25 
26 namespace ipsdk {
27 namespace processor {
28 
31 
33 {
34 // predefined public type
35 public:
37  static const eRuleType::domain g_ruleType = eRuleType::eRT_Attribute;
38 
39 public:
43  virtual ~BaseAttributeRule() = 0;
45 
46 // methods
47 public:
49  eRuleType getRuleType() const;
50 
52  virtual eAttributeRuleType getAttributeRuleType() const = 0;
53 
57  bool hasSecondAttribute() const;
58 
62  const BaseAttribute& getAttribute1() const;
63 
67  const BaseAttribute& getAttribute2() const;
68 
69 protected:
73  void initBase(const AttributeConstWeakPtr& pAttribute);
74 
80  void initBase(const AttributeConstWeakPtr& pAttribute1,
81  const AttributeConstWeakPtr& pAttribute2);
82 
83 // attributes
84 private:
86  AttributeConstWeakPtr _pAttribute1;
87 
89  AttributeConstWeakPtr _pAttribute2;
90 };
91 
94 
95 inline eRuleType
97 {
98  return g_ruleType;
99 }
100 
103 
104 } // end of namespace processor
105 } // end of namespace ipsdk
106 
107 #pragma warning (pop)
108 
109 #endif // __IPSDKBASEPROCESSING_BASEATTRIBUTERULE_H__
static const eRuleType::domain g_ruleType
rule type associated to rule
Definition: BaseAttributeRule.h:37
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define IPSDKBASEPROCESSING_API
Import/Export macro for library IPSDKBaseProcessing.
Definition: IPSDKBaseProcessingExports.h:27
eAttributeRuleType
enumerate describing rule on attributes operation type
Definition: AttributeRuleTypes.h:32
Base class for rules applied on attributes.
Definition: BaseAttributeRule.h:32
Rule associated to attributes.
Definition: RuleTypes.h:42
eRuleType getRuleType() const
retrieve rule type
Definition: BaseAttributeRule.h:96
Base class for processing attributes.
Definition: BaseAttribute.h:43
eRuleType
enumerate describing rule type
Definition: RuleTypes.h:40
Base class for processing attributes rules.
Definition: BaseRule.h:41
Predefined types for rules applied on attributes.
boost::weak_ptr< const BaseAttribute > AttributeConstWeakPtr
weak pointer to const attribute object
Definition: AttributeTypes.h:61