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
00023
00024
00030 #pragma once
00031
00032 #include <GenApi/GenApiVersion.h>
00033 #include <GenApi/GenApiDll.h>
00034 #include <Base/GCString.h>
00035 #include <Base/GCStringVector.h>
00036 #include <memory>
00037
00038 namespace GENAPI_NAMESPACE
00039 {
00040 class CLock;
00041 class CNodeDataMap;
00042 struct INodeMap;
00043
00049 typedef enum
00050 {
00051 CacheUsage_Automatic,
00052 CacheUsage_ForceWrite,
00053
00054 CacheUsage_ForceRead,
00055
00056 CacheUsage_Ignore
00057 } ECacheUsage_t;
00058
00063 typedef enum
00064 {
00065
00066 ContentType_Xml,
00067 ContentType_ZippedXml
00068 } EContentType_t;
00069
00070
00071
00072
00073
00074
00075
00076
00137 class GENAPI_DECL CNodeMapFactory
00138 {
00139 public:
00141 CNodeMapFactory();
00142
00144 virtual ~CNodeMapFactory();
00145
00149 CNodeMapFactory( const CNodeMapFactory&);
00150
00154 CNodeMapFactory& operator=(const CNodeMapFactory&);
00155
00156
00158
00168 CNodeMapFactory( EContentType_t FileType, const GENICAM_NAMESPACE::gcstring& FileName, ECacheUsage_t CacheUsage = CacheUsage_Automatic, bool SuppressStringsOnLoad = false);
00169
00170
00172
00183 CNodeMapFactory(EContentType_t ContentType, const void* pData, size_t DataSize, ECacheUsage_t CacheUsage = CacheUsage_Automatic, bool SuppressStringsOnLoad = false);
00184
00185
00187
00203 CNodeMapFactory(const GENICAM_NAMESPACE::gcstring& XmlData, ECacheUsage_t CacheUsage = CacheUsage_Automatic, bool SuppressStringsOnLoad = false);
00204
00205
00207 bool IsEmpty() const;
00208
00209
00211
00218 void AddInjectionData(CNodeMapFactory& injectionData);
00219
00220
00222
00225 void LoadAndInject();
00226
00227
00229 bool IsLoaded() const;
00230
00231
00233
00239 CNodeMapFactory ExtractSubtree(const GENICAM_NAMESPACE::gcstring& SubTreeRootNodeName, bool doRenameToRoot = false);
00240
00241
00243
00248 void Preprocess();
00249
00250
00252 bool IsPreprocessed() const;
00253
00254
00256
00261 void ReleaseCameraDescriptionFileData();
00262
00263
00265 bool IsCameraDescriptionFileDataReleased() const;
00266
00267
00269
00275 INodeMap* CreateNodeMap(const GENICAM_NAMESPACE::gcstring &DeviceName = "Device", bool DoReleaseCameraDescriptionFileData = true);
00276
00277
00279
00287 INodeMap* CreateNodeMap(CLock& UserProvidedLock, const GENICAM_NAMESPACE::gcstring &DeviceName = "Device", bool DoReleaseCameraDescriptionFileData = true);
00288
00289
00291 static INodeMap* CreateEmptyNodeMap();
00292
00293
00295 static bool ClearCache();
00296
00297
00302 void GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const;
00303
00305 GENICAM_NAMESPACE::gcstring ToString() const;
00306
00308 GENICAM_NAMESPACE::gcstring ToXml() const;
00309
00310 static CNodeDataMap *CreateNodeDataFromNodeMap( INodeMap* pNodeMap );
00311
00312 typedef struct
00313 {
00314 uint32_t NumNodes;
00315 uint32_t NumProperties;
00316 uint32_t NumLinks;
00317 uint32_t NumStrings;
00318 } NodeStatistics_t;
00319
00320 void GetNodeStatistics(NodeStatistics_t &NodeStatistics);
00321
00323 const GENICAM_NAMESPACE::gcstring ApplyStyleSheet(const GENICAM_NAMESPACE::gcstring& StyleSheetFileName);
00324
00325 private:
00326
00327 class CNodeMapFactoryImpl;
00328
00329 CNodeMapFactoryImpl* m_pImpl;
00330 };
00331 }