IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseTNodeCollSizeRule.h
1 // BaseTNodeCollSizeRule.h:
3 // ------------------------
4 //
15 
16 #ifndef __IPSDKBASEPROCESSING_BASETNODECOLLSIZERULE_H__
17 #define __IPSDKBASEPROCESSING_BASETNODECOLLSIZERULE_H__
18 
19 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/NodeColl/Size/BaseNodeCollSizeRule.h>
20 
21 namespace ipsdk {
22 namespace processor {
23 
26 
27 template <eValueComparisonRuleType::domain ValueComparisonRuleType>
29 {
30 // predefined public types
31 public:
33  static const eValueComparisonRuleType::domain g_valueComparisonRuleType = ValueComparisonRuleType;
34 
35 public:
39  virtual ~BaseTNodeCollSizeRule() = 0;
41 
42 // methods
43 public:
45  inline eValueComparisonRuleType getValueComparisonRuleType() const;
46 
50  ipUInt32 getValue() const;
51 
52 protected:
56  void initBase(const AttributeConstWeakPtr& pAttribute,
57  const ipUInt32 value);
58 
60  virtual std::string getAttributeName() const = 0;
61 
63  virtual ipUInt32 getCollSize() const = 0;
64 
65 private:
67  bool testRule() const;
68 
70  std::string createRuleFormalString() const;
71 
73  std::string createRuleEvaluatedString(const ipUInt32 increment) const;
74 
75 // attributes
76 protected:
79 };
80 
83 
84 template <eValueComparisonRuleType::domain ValueComparisonRuleType>
87 {
88  return g_valueComparisonRuleType;
89 }
90 
93 
94 } // end of namespace processor
95 } // end of namespace ipsdk
96 
97 #endif // __IPSDKBASEPROCESSING_BASETNODECOLLSIZERULE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define IPSDKBASEPROCESSING_API
Import/Export macro for library IPSDKBaseProcessing.
Definition: IPSDKBaseProcessingExports.h:27
eValueComparisonRuleType getValueComparisonRuleType() const
retrieve value comparison rule operation type
Definition: BaseTNodeCollSizeRule.h:86
eValueComparisonRuleType
enumerate describing value comparison rule operation type
Definition: RuleTypes.h:56
Base class for rules on size of node collections of data item attributes.
Definition: BaseNodeCollSizeRule.h:27
Base template class for rules on size of node collections of data item attributes.
Definition: BaseTNodeCollSizeRule.h:28
boost::weak_ptr< const BaseAttribute > AttributeConstWeakPtr
weak pointer to const attribute object
Definition: AttributeTypes.h:61
ipUInt32 _value
value associated to rule
Definition: BaseTNodeCollSizeRule.h:78
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53