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
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
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
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
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
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
00194
00195
00197 virtual ~CNodeMap();
00198
00200 void ClearAllNodes();
00201
00202
00203
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
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