NodeMap.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //  (c) 2006 by Basler 
00003 //  Project: GenApi
00004 //  Author:  Fritz Dierks
00005 //
00006 //  License: This file is published under the license of the EMVA GenICam  Standard Group.
00007 //  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
00008 //  If for some reason you are missing  this file please contact the EMVA or visit the website
00009 //  (http://www.genicam.org) for a full copy.
00010 //
00011 //  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
00012 //  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00013 //  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00014 //  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
00015 //  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
00016 //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
00017 //  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
00018 //  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
00019 //  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
00020 //  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00021 //  POSSIBILITY OF SUCH DAMAGE.
00022 //-----------------------------------------------------------------------------
00029 #ifndef GENAPI_NODEMAP_H
00030 #define GENAPI_NODEMAP_H
00031 
00032 #include "GenApi/GenApiVersion.h"
00033 #include "GenApi/GenApiDll.h"
00034 #include "GenApi/impl/INodeMapPrivate.h"
00035 #include "GenApi/impl/INodePrivate.h"
00036 #include "GenApi/IDestroy.h"
00037 #include "GenApi/IDeviceInfo.h"
00038 #include "GenApi/Synch.h"
00039 #include "Base/GCString.h"
00040 #include "GenApi/impl/Value2String.h"
00041 #include "GenApi/IUserData.h"
00042 #include <map>
00043 
00044 #ifdef _MSC_VER 
00045 # pragma warning(push)
00046 # pragma warning(disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of class 'yyy'
00047 #endif
00048 
00049 namespace GENAPI_NAMESPACE
00050 {
00051 
00052     typedef  INodePrivate*(*CreateFunc_t)( const GENICAM_NAMESPACE::gcstring& );
00053 
00054     class string2node_t;
00058     class CNodeMap
00059         : virtual public INodeMapPrivate
00060         , public IDeviceInfo
00061         , public IDestroy
00062         , public IUserData
00063     {
00064     public:
00065         //----------------------------------------------------------------
00066         // Construction 
00067         //----------------------------------------------------------------
00068 
00070         CNodeMap(const GENICAM_NAMESPACE::gcstring& DeviceName = "Device", CLock* pUserProvidedLock = NULL);
00071 
00072         //-------------------------------------------------------------
00074 
00075             virtual void GetNodes(NodeList_t &Nodes) const;
00076             virtual INode* GetNode(const GENICAM_NAMESPACE::gcstring& Name) const;
00077             virtual void InvalidateNodes() const;
00078             virtual bool Connect(IPort* pPort, const GENICAM_NAMESPACE::gcstring& PortName) const;
00079             virtual bool Connect(IPort* pPort) const;
00080             virtual GENICAM_NAMESPACE::gcstring GetDeviceName();
00081             virtual void Poll(int64_t ElapsedTime);
00082             virtual CLock& GetLock() const;
00083             virtual uint64_t GetNumNodes() const;
00084             virtual bool ParseSwissKnifes( GENICAM_NAMESPACE::gcstring_vector *pErrorList = NULL ) const;
00086 
00087         //-------------------------------------------------------------
00089 
00090             virtual void RegisterNode(INodePrivate* pNode, CNodeData::ENodeType_t NodeType, NodeID_t NodeID);
00091             virtual void FinalConstruct(bool DetermineDependencies);
00092             virtual void SetNumNodes(size_t NumNodes);
00093             virtual INodePrivate* GetNodeByID(NodeID_t NodeID);
00094             virtual void SetProperty(CProperty &Property);
00095             virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
00096             virtual Counter& GetBathometer() { return m_Bathometer; }
00097             virtual void SetEntryPoint(EMethod EntryMethod, const INodePrivate *pEntryNode, bool IgnoreCache);
00098             virtual void ResetEntryPoint();
00099             virtual GENICAM_NAMESPACE::gcstring GetEntryPoint();
00100             virtual bool IsGenApiLoggingEnabled();
00101             virtual bool IsGenApiDeviceLoggingEnabled();
00103 
00104         //-------------------------------------------------------------
00106 
00107             virtual GENICAM_NAMESPACE::gcstring GetModelName();
00108             virtual GENICAM_NAMESPACE::gcstring GetVendorName();
00109             virtual GENICAM_NAMESPACE::gcstring GetToolTip();
00110             virtual GENICAM_NAMESPACE::gcstring GetStandardNameSpace();
00111             virtual void GetGenApiVersion(Version_t &Version, uint16_t &Build);
00112             virtual void GetSchemaVersion(Version_t &Version);
00113             virtual void GetDeviceVersion(Version_t &Version);
00114             virtual GENICAM_NAMESPACE::gcstring GetProductGuid();
00115             virtual GENICAM_NAMESPACE::gcstring GetVersionGuid();
00117     private:
00118         //-------------------------------------------------------------
00120 
00121         virtual UserData_t GetUserData() const;
00122         virtual UserData_t SetUserData( UserData_t userdata );
00124     public:
00125         //-------------------------------------------------------------
00128         virtual void Destroy();
00130 
00131         // Fast Track...
00132         inline INodePrivate* _GetNodeByID( NodeID_t NodeID )
00133         {
00134             assert((size_t)NodeID.ToIndex() < m_Node2NodeID.size());
00135             return m_Node2NodeID[(size_t)NodeID.ToIndex()];
00136         }
00137 
00138     protected:
00139         //-------------------------------------------------------------
00140         // DeviceInfo members
00141         //-------------------------------------------------------------
00142 
00144         GENICAM_NAMESPACE::gcstring m_ModelName;
00145 
00147         GENICAM_NAMESPACE::gcstring m_VendorName;
00148 
00150         GENICAM_NAMESPACE::gcstring m_ToolTip;
00151 
00153         GENAPI_NAMESPACE::EStandardNameSpace m_StandardNameSpace;
00154 
00156         Version_t m_SchemaVersion;
00157 
00159         Version_t m_DeviceVersion;
00160 
00162         GENICAM_NAMESPACE::gcstring m_ProductGuid;
00163 
00165         GENICAM_NAMESPACE::gcstring m_VersionGuid;
00166 
00168         GENICAM_NAMESPACE::gcstring_vector m_PropertyNames;
00169 
00171         GENICAM_NAMESPACE::gcstring m_DeviceName;
00172 
00174         GENICAM_NAMESPACE::gcstring m_Name;
00175 
00176         //-------------------------------------------------------------
00177         // Node containers
00178         //-------------------------------------------------------------
00179 
00181         typedef std::vector<INodePrivate*> Node2NodeID_t;
00182         Node2NodeID_t m_Node2NodeID;
00183 
00185         string2node_t *m_pMap;
00186 
00188         string2node_t& Map();
00189 
00191         const string2node_t& Map() const;
00192 
00193         //-------------------------------------------------------------
00194         // Destruction
00195         //-------------------------------------------------------------
00196 
00198         virtual ~CNodeMap();
00199 
00201         void ClearAllNodes();
00202 
00203         //-------------------------------------------------------------
00204         // Call-stack implementation 
00205         //-------------------------------------------------------------
00206 
00208         Counter m_Bathometer;
00209 
00211         const INodePrivate *m_pEntryNode;
00212 
00214         EMethod m_EntryMethod;
00215 
00217         int m_EntryPointDepth;
00218 
00220         bool m_EntryPointIgnoreCache;
00221 
00223         NodePrivateVector_t* m_pPollingNodes;
00224 
00226         bool m_GenApiLoggingEnabled;
00227 
00229         bool m_GenApiDeviceLoggingEnabled;
00230 
00231     private:
00234         CLock m_zzz_OwnLock_DoNotUse;
00235     private:
00238         UserData_t m_pUserData;
00239 
00240     protected:
00243         CLock& m_Lock;
00244 
00245 
00246         //-------------------------------------------------------------
00247         // No copying of this class
00248         //-------------------------------------------------------------
00249     private:
00251         CNodeMap(const CNodeMap&);
00252 
00254         CNodeMap& operator=(const CNodeMap&);
00255 
00256     };
00257 }
00258 
00259 #ifdef _MSC_VER 
00260 # pragma warning(pop)
00261 #endif
00262 
00263 #endif // GENAPI_NODEMAP_H


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 18:42:47