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;
00085 
00086         //-------------------------------------------------------------
00088 
00089             virtual void RegisterNode(INodePrivate* pNode, CNodeData::ENodeType_t NodeType, NodeID_t NodeID);
00090             virtual void FinalConstruct(bool DetermineDependencies);
00091             virtual void SetNumNodes(size_t NumNodes);
00092             virtual INodePrivate* GetNodeByID(NodeID_t NodeID);
00093             virtual void SetProperty(CProperty &Property);
00094             virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
00095             virtual Counter& GetBathometer() { return m_Bathometer; }
00096             virtual void SetEntryPoint(EMethod EntryMethod, const INodePrivate *pEntryNode, bool IgnoreCache);
00097             virtual void ResetEntryPoint();
00098             virtual GENICAM_NAMESPACE::gcstring GetEntryPoint();
00099             virtual bool IsGenApiLoggingEnabled();
00100             virtual bool IsGenApiDeviceLoggingEnabled();
00102 
00103         //-------------------------------------------------------------
00105 
00106             virtual GENICAM_NAMESPACE::gcstring GetModelName();
00107             virtual GENICAM_NAMESPACE::gcstring GetVendorName();
00108             virtual GENICAM_NAMESPACE::gcstring GetToolTip();
00109             virtual GENICAM_NAMESPACE::gcstring GetStandardNameSpace();
00110             virtual void GetGenApiVersion(Version_t &Version, uint16_t &Build);
00111             virtual void GetSchemaVersion(Version_t &Version);
00112             virtual void GetDeviceVersion(Version_t &Version);
00113             virtual GENICAM_NAMESPACE::gcstring GetProductGuid();
00114             virtual GENICAM_NAMESPACE::gcstring GetVersionGuid();
00116     private:
00117         //-------------------------------------------------------------
00119 
00120         virtual UserData_t GetUserData() const;
00121         virtual UserData_t SetUserData( UserData_t userdata );
00123     public:
00124         //-------------------------------------------------------------
00127         virtual void Destroy();
00129 
00130         // Fast Track...
00131         inline INodePrivate* _GetNodeByID( NodeID_t NodeID )
00132         {
00133             assert((size_t)NodeID.ToIndex() < m_Node2NodeID.size());
00134             return m_Node2NodeID[(size_t)NodeID.ToIndex()];
00135         }
00136 
00137     protected:
00138         //-------------------------------------------------------------
00139         // DeviceInfo members
00140         //-------------------------------------------------------------
00141 
00143         GENICAM_NAMESPACE::gcstring m_ModelName;
00144 
00146         GENICAM_NAMESPACE::gcstring m_VendorName;
00147 
00149         GENICAM_NAMESPACE::gcstring m_ToolTip;
00150 
00152         GENAPI_NAMESPACE::EStandardNameSpace m_StandardNameSpace;
00153 
00155         Version_t m_SchemaVersion;
00156 
00158         Version_t m_DeviceVersion;
00159 
00161         GENICAM_NAMESPACE::gcstring m_ProductGuid;
00162 
00164         GENICAM_NAMESPACE::gcstring m_VersionGuid;
00165 
00167         GENICAM_NAMESPACE::gcstring_vector m_PropertyNames;
00168 
00170         GENICAM_NAMESPACE::gcstring m_DeviceName;
00171 
00173         GENICAM_NAMESPACE::gcstring m_Name;
00174 
00175         //-------------------------------------------------------------
00176         // Node containers
00177         //-------------------------------------------------------------
00178 
00180         typedef std::vector<INodePrivate*> Node2NodeID_t;
00181         Node2NodeID_t m_Node2NodeID;
00182 
00184         string2node_t *m_pMap;
00185 
00187         string2node_t& Map();
00188 
00190         const string2node_t& Map() const;
00191 
00192         //-------------------------------------------------------------
00193         // Destruction
00194         //-------------------------------------------------------------
00195 
00197         virtual ~CNodeMap();
00198 
00200         void ClearAllNodes();
00201 
00202         //-------------------------------------------------------------
00203         // Call-stack implementation 
00204         //-------------------------------------------------------------
00205 
00207         Counter m_Bathometer;
00208 
00210         const INodePrivate *m_pEntryNode;
00211 
00213         EMethod m_EntryMethod;
00214 
00216         int m_EntryPointDepth;
00217 
00219         bool m_EntryPointIgnoreCache;
00220 
00222         NodePrivateVector_t* m_pPollingNodes;
00223 
00225         bool m_GenApiLoggingEnabled;
00226 
00228         bool m_GenApiDeviceLoggingEnabled;
00229 
00230     private:
00233         CLock m_zzz_OwnLock_DoNotUse;
00234     private:
00237         UserData_t m_pUserData;
00238 
00239     protected:
00242         CLock& m_Lock;
00243 
00244 
00245         //-------------------------------------------------------------
00246         // No copying of this class
00247         //-------------------------------------------------------------
00248     private:
00250         CNodeMap(const CNodeMap&);
00251 
00253         CNodeMap& operator=(const CNodeMap&);
00254 
00255     };
00256 }
00257 
00258 #ifdef _MSC_VER 
00259 #       pragma warning(pop)
00260 #endif
00261 
00262 #endif // GENAPI_NODEMAP_H


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