IntSwissKnife.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //  (c) 2006 by Basler Vision Technologies
00003 //  Section: Vision Components
00004 //  Project: GenApi
00005 //  Author:  Margret Albrecht
00006 //  $Header$
00007 //
00008 //  License: This file is published under the license of the EMVA GenICam  Standard Group.
00009 //  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
00010 //  If for some reason you are missing  this file please contact the EMVA or visit the website
00011 //  (http://www.genicam.org) for a full copy.
00012 //
00013 //  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
00014 //  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00015 //  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00016 //  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
00017 //  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
00018 //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
00019 //  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
00020 //  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
00021 //  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
00022 //  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00023 //  POSSIBILITY OF SUCH DAMAGE.
00024 //-----------------------------------------------------------------------------
00031 #ifndef GENAPI_INTSWISSKNIFE_H
00032 #define GENAPI_INTSWISSKNIFE_H
00033 
00034 #include "MathParser/Int64MathParser.h"
00035 #include "PolyReference.h"
00036 #include "Node.h"
00037 #include "BaseT.h"
00038 #include "ValueT.h"
00039 #include "IntegerT.h"
00040 #include "NodeT.h"
00041 #include <map>
00042 
00043 namespace GENAPI_NAMESPACE
00044 {
00045     //*************************************************************
00046     // CIntSwissKnife class
00047     //*************************************************************
00048 
00054     class CIntSwissKnifeImpl : public IInteger, public CNodeImpl
00055     {
00056     public:
00058         CIntSwissKnifeImpl();
00059 
00061         virtual ~CIntSwissKnifeImpl();
00062 
00063     public:
00064 
00066         virtual EInterfaceType InternalGetPrincipalInterfaceType() const
00067         {
00068             return intfIInteger;
00069         }
00070 
00071         //-------------------------------------------------------------
00072         // IInteger implementation
00073         //-------------------------------------------------------------
00074 
00076 
00077         virtual int64_t GetValueWithInput(int64_t input, bool Verify = false, bool IgnoreCache = false);
00078 
00079 
00080     protected:
00081         // Get access mode
00082         virtual EAccessMode InternalGetAccessMode() const;
00083 
00085         #pragma BullseyeCoverage off
00086         virtual void InternalSetValue(int64_t /*Value*/, bool /* Verify = true */)
00087         {
00088             throw ACCESS_EXCEPTION_NODE("IntSwissKnife is read only.");
00089         }
00090         #pragma BullseyeCoverage on
00091 
00093         virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
00094 
00095 
00097         virtual int64_t InternalGetMin() const
00098         {
00099             return m_Min;
00100         }
00101 
00103         virtual int64_t InternalGetMax() const
00104         {
00105             return m_Max;
00106         }
00107 
00109         const int64_autovector_t InternalGetListOfValidValues()
00110         {
00111             return int64_autovector_t();
00112         }
00113 
00115         virtual int64_t InternalGetInc() const
00116         {
00117             return 1LL;
00118         }
00119 
00121         virtual  ERepresentation InternalGetRepresentation() const
00122         {
00123             if( m_Representation != _UndefinedRepresentation )
00124                 return m_Representation;
00125             else
00126                 return PureNumber;
00127         }
00128 
00130         virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
00131         {
00132             return m_Unit;
00133         }
00134 
00136         virtual ECachingMode InternalGetCachingMode() const;
00137 
00138     public:
00139         //-------------------------------------------------------------
00140         // Initializing
00141         //-------------------------------------------------------------
00142         
00143         virtual void FinalConstruct();
00144 
00145         virtual void SetProperty( CProperty &Property );
00146         virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
00147         
00148     protected:
00149         //-------------------------------------------------------------
00150         // Member variables
00151         //-------------------------------------------------------------
00153         int64_t  m_Min;
00154 
00156         int64_t  m_Max;
00157 
00159         GENICAM_NAMESPACE::gcstring m_Formula;
00160 
00162         std::map<GENICAM_NAMESPACE::gcstring, GENICAM_NAMESPACE::gcstring> m_Symbolics;
00163 
00165         std::map<GENICAM_NAMESPACE::gcstring, CIntegerPolyRef> m_Variables;
00166 
00168         CInt64MathParser m_MathParser;
00169 
00171         ERepresentation m_Representation;
00172 
00174         GENICAM_NAMESPACE::gcstring m_Unit;
00175 
00177         GENAPI_NAMESPACE::EInputDirection m_InputDirection;
00178 
00180 
00181         GENICAM_NAMESPACE::gcstring m_InputName;
00182 
00184         CIntegerPolyRef m_Input;
00185 
00186     };
00187 
00188     class CIntSwissKnife : public BaseT< ValueT< NodeT< IntegerT< CIntSwissKnifeImpl > > > >
00189     {
00190     };
00191 
00192 }
00193 
00194 #endif // GENAPI_INTSWISSKNIFE_H


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05