IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseTNodesCollSizeRule.h
1 // BaseTNodesCollSizeRule.h:
3 // -------------------------
4 //
15 
16 #ifndef __IPSDKBASEPROCESSING_BASETNODESCOLLSIZERULE_H__
17 #define __IPSDKBASEPROCESSING_BASETNODESCOLLSIZERULE_H__
18 
19 #include <IPSDKBaseProcessing/Rule/Attribute/DataItem/NodeColl/Size/BaseNodesCollSizeRule.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 ~BaseTNodesCollSizeRule() = 0;
41 
42 // methods
43 public:
45  inline eValueComparisonRuleType getValueComparisonRuleType() const;
46 
47 protected:
53  void initBase(const AttributeConstWeakPtr& pAttribute1,
54  const AttributeConstWeakPtr& pAttribute2);
55 
57  virtual std::string getAttributeName1() const = 0;
58 
60  virtual ipUInt32 getCollSize1() const = 0;
61 
63  virtual std::string getAttributeName2() const = 0;
64 
66  virtual ipUInt32 getCollSize2() const = 0;
67 
68 private:
70  bool testRule() const;
71 
73  std::string createRuleFormalString() const;
74 
76  std::string createRuleEvaluatedString(const ipUInt32 increment) const;
77 
78 // attributes
79 protected:
80 
81 };
82 
85 
86 template <eValueComparisonRuleType::domain ValueComparisonRuleType>
89 {
90  return g_valueComparisonRuleType;
91 }
92 
95 
96 } // end of namespace processor
97 } // end of namespace ipsdk
98 
99 #endif // __IPSDKBASEPROCESSING_BASETNODESCOLLSIZERULE_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: BaseTNodesCollSizeRule.h:88
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: BaseNodesCollSizeRule.h:27
Base template class for rules on size of node collections of data item attributes.
Definition: BaseTNodesCollSizeRule.h:28
boost::weak_ptr< const BaseAttribute > AttributeConstWeakPtr
weak pointer to const attribute object
Definition: AttributeTypes.h:61
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53