IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
RuleMatchValueToStripRange.h
1 // RuleMatchValueToStripRange.h:
3 // -----------------------------
4 //
15 
16 #ifndef __IPSDKIMAGEPROCESSING_RULEMATCHVALUETOSTRIPRANGE_H__
17 #define __IPSDKIMAGEPROCESSING_RULEMATCHVALUETOSTRIPRANGE_H__
18 
19 #include <IPSDKImageProcessing/Rule/Strip/StripBinaryMixed/BaseRuleMatchStripRange.h>
20 #include <IPSDKImageProcessing/Attribute/Strip/BaseStripAttribute.h>
21 
22 namespace ipsdk {
23 namespace imaproc {
24 
27 
28 template <typename AttributeType>
30 {
31 public:
37 
38 // methods
39 public:
45  void init(const StripAttributeConstWeakPtr& pStripAttribute,
46  const boost::weak_ptr<const AttributeType>& pValueAttribute);
47 
48 protected:
50  ipReal64 retrieveValue() const;
51 
53  std::string retrieveValueAttributeName() const;
54 
55 // attributes
56 protected:
57 
58 };
59 
62 
63 template <typename AttributeType>
64 inline void
66  const boost::weak_ptr<const AttributeType>& pValueAttribute)
67 {
68  // call of base class initialization method
69  BaseRuleMatchStripRange::initBase(pStripAttribute, pValueAttribute);
70 }
71 
72 template <typename AttributeType>
73 inline ipReal64
75 {
76  // retrieve associated attribute
77  const AttributeType& derivedAttribute = static_cast<const AttributeType&>(getAttribute2());
78 
79  return derivedAttribute.getValue();
80 }
81 
82 template <typename AttributeType>
83 inline std::string
85 {
86  return getAttribute2().getObjectName();
87 }
88 
91 
92 } // end of namespace imaproc
93 } // end of namespace ipsdk
94 
95 #endif // __IPSDKIMAGEPROCESSING_RULEMATCHVALUETOSTRIPRANGE_H__
Rule class allowing to check that a value is inside a strip buffer type value range.
Definition: RuleMatchValueToStripRange.h:29
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
void initBase()
base class initialization method
void init(const StripAttributeConstWeakPtr &pStripAttribute, const boost::weak_ptr< const AttributeType > &pValueAttribute)
initialization of object
Definition: RuleMatchValueToStripRange.h:65
std::string retrieveValueAttributeName() const
method allowing to retrieve value associated to attribute leaf in derived class
Definition: RuleMatchValueToStripRange.h:84
ipReal64 retrieveValue() const
method allowing to retrieve value associated to attribute leaf in derived class
Definition: RuleMatchValueToStripRange.h:74
boost::weak_ptr< const BaseStripAttribute > StripAttributeConstWeakPtr
weak pointer to image strip attribute
Definition: StripAttributeTypes.h:80
Base class for rules allowing to check that a value is inside a strip buffer type value range...
Definition: BaseRuleMatchStripRange.h:27