Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00031 #ifndef GENAPI_SWISSKNIFE_H
00032 #define GENAPI_SWISSKNIFE_H
00033
00034 #include "../IFloat.h"
00035 #include "Node.h"
00036 #include "MathParser/MathParser.h"
00037 #include "BaseT.h"
00038 #include "ValueT.h"
00039 #include "NodeT.h"
00040 #include "FloatT.h"
00041
00042 namespace GENAPI_NAMESPACE
00043 {
00044
00045
00046
00047
00056 class CSwissKnifeImpl : public IFloat, public CNodeImpl
00057 {
00058 public:
00060 CSwissKnifeImpl();
00061
00063 virtual ~CSwissKnifeImpl();
00064
00065 protected:
00066
00067
00068
00069
00070
00071 virtual EAccessMode InternalGetAccessMode() const;
00072
00074 virtual EInterfaceType InternalGetPrincipalInterfaceType() const
00075 {
00076 return intfIFloat;
00077 }
00078
00079
00080 public:
00081
00082
00083
00084
00086
00087 virtual double GetValueWithInput(double input, bool Verify = false, bool IgnoreCache = false);
00088
00089 protected:
00090
00091
00092
00093
00094
00095 #pragma BullseyeCoverage off
00096 virtual void InternalSetValue(double , bool )
00097 {
00098 throw LOGICAL_ERROR_EXCEPTION_NODE("SwissKnife : %s SetValue failed. SwissKnife is read only", m_Name.c_str() );
00099 }
00100 #pragma BullseyeCoverage on
00101
00102
00103 virtual double InternalGetValue(bool Verify = false, bool IgnoreCache = false);
00104
00105
00106 virtual double InternalGetMin()
00107 {
00108 return m_Min;
00109 }
00110
00111
00112 virtual double InternalGetMax()
00113 {
00114 return m_Max;
00115 }
00116
00118 virtual bool InternalHasInc()
00119 {
00120
00121 return false;
00122 }
00123
00125 #pragma BullseyeCoverage off
00126
00127 virtual double InternalGetInc()
00128 {
00129 assert(false);
00130 return -1.0;
00131 }
00132 #pragma BullseyeCoverage on
00133
00135 const virtual double_autovector_t InternalGetListOfValidValues()
00136 {
00137 return double_autovector_t();
00138 }
00139
00140
00141
00142 virtual ERepresentation InternalGetRepresentation()
00143 {
00144 if( m_Representation != _UndefinedRepresentation )
00145 return m_Representation;
00146 else
00147 return PureNumber;
00148 }
00149
00150
00151 virtual GENICAM_NAMESPACE::gcstring InternalGetUnit() const
00152 {
00153 return m_Unit;
00154 }
00155
00157 virtual EDisplayNotation InternalGetDisplayNotation() const
00158 {
00159 return m_DisplayNotation;
00160 }
00161
00163 virtual int64_t InternalGetDisplayPrecision() const
00164 {
00165 return m_DisplayPrecision;
00166 }
00167
00169 virtual ECachingMode InternalGetCachingMode() const;
00170
00171 public:
00172
00173
00174
00175
00176 virtual void FinalConstruct();
00177
00178 virtual void SetProperty( CProperty &Property );
00179
00180 virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
00181
00182 protected:
00183
00184
00185
00186
00187
00189 double m_Min;
00190
00192 double m_Max;
00193
00195 GENICAM_NAMESPACE::gcstring m_Formula;
00196
00198 std::map<GENICAM_NAMESPACE::gcstring, GENICAM_NAMESPACE::gcstring> m_Symbolics;
00199
00201 std::map<GENICAM_NAMESPACE::gcstring, CFloatPolyRef> m_Variables;
00202
00204 CMathParser m_MathParser;
00205
00207 ERepresentation m_Representation;
00208
00210 GENICAM_NAMESPACE::gcstring m_Unit;
00211
00213 EDisplayNotation m_DisplayNotation;
00214
00216 int64_t m_DisplayPrecision;
00217
00219
00220 GENICAM_NAMESPACE::gcstring m_InputName;
00221
00223 GENAPI_NAMESPACE::EInputDirection m_InputDirection;
00224
00226 CFloatPolyRef m_Input;
00227
00228 };
00229
00230 class CSwissKnife : public BaseT< ValueT< NodeT< FloatT< CSwissKnifeImpl > > > >
00231 {
00232 };
00233
00234 }
00235
00236 #endif // GENAPI_SWISSKNIFE_H