IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
FormulaManager.h
1 // FormulaManager.h:
3 // -----------------
4 //
14 
15 #ifndef __IPSDKBASESHAPEANALYSIS_FORMULAMANAGER_H__
16 #define __IPSDKBASESHAPEANALYSIS_FORMULAMANAGER_H__
17 
18 // suppression warnings
19 // warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class 'ipsdk::shape::analysis::FormulaManager'
20 // warning C4251: 'ipsdk::shape::analysis::FormulaManager::_formulaStr' : class 'std::basic_string<_Elem,_Traits,_Alloc>' needs to have dll-interface to be used by clients of class 'ipsdk::shape::analysis::FormulaManager'
21 #pragma warning (push)
22 #pragma warning (disable : 4275 4251)
23 
26 #include <boost/noncopyable.hpp>
27 
28 namespace ipsdk {
29 namespace shape {
30 namespace analysis {
31 
34 
35 class IPSDKBASESHAPEANALYSIS_API FormulaManager : boost::noncopyable
36 {
37 public:
41  ~FormulaManager();
43 
44 // methods
45 public:
47  bool isInit() const;
48 
51  BoolResult init(const std::string& formulaStr,
52  const bool bDebugMode = false);
53 
57  const std::string& getFormulaStr() const;
58 
62  const eMsrFormulaResultType& getResultType() const;
63 
67  const ConstantMap& getConstantMap() const;
68 
72  const VariableMap& getVariableMap() const;
73 
82  EvalStatus evaluate(ipBool& result);
83 
92  EvalStatus evaluate(ipReal64& result);
93 
95  void clear();
96 
97 // attributes
98 protected:
100  bool _bInit;
101 
103  std::string _formulaStr;
104 
107 
110 
113 
116 };
117 
120 
121 inline bool
123 {
124  return _bInit;
125 }
126 
129 
130 } // end of namespace analysis
131 } // end of namespace shape
132 } // end of namespace ipsdk
133 
134 #pragma warning (pop)
135 
136 #endif // __IPSDKBASESHAPEANALYSIS_FORMULAMANAGER_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Predefined types for shape analysis formula management.
std::map< FormulaVariableId, VariableValuePtr > VariableMap
map associating a formula variable id to its value
Definition: FormulaTypes.h:326
std::vector< FormulaItem > FormulaItemColl
collection of formula item
Definition: FormulaTypes.h:376
std::string _formulaStr
formula string associated to object$
Definition: FormulaManager.h:103
FormulaItemColl _itemsColl
items collection associated to formula
Definition: FormulaManager.h:106
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Definition of import/export macro for library.
bool _bInit
object initialization flag
Definition: FormulaManager.h:100
#define IPSDKBASESHAPEANALYSIS_API
Import/Export macro for library IPSDKBaseShapeAnalysis.
Definition: IPSDKBaseShapeAnalysisExports.h:25
eMsrFormulaResultType
Enumerate describing measure formula result type.
Definition: FormulaTypes.h:211
VariableMap _varMap
variable collection associated to formula
Definition: FormulaManager.h:112
ConstantMap _csteMap
image constant collection associated to formula
Definition: FormulaManager.h:109
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
Object allowing to manage shape analysis formula.
Definition: FormulaManager.h:35
eMsrFormulaResultType _resultType
result type associated to formula
Definition: FormulaManager.h:115
std::map< ImageConstantId, VariableValuePtr > ConstantMap
map associating an image constant id to its value
Definition: FormulaTypes.h:307
bool isInit() const
retrieve object initialization flag
Definition: FormulaManager.h:122