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;
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
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
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
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
00195
00196
00198 virtual ~CNodeMap();
00199
00201 void ClearAllNodes();
00202
00203
00204
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
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