NodeMapFactory.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2013 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Andreas Gau
6 // $Header$
7 //
8 // License: This file is published under the license of the EMVA GenICam Standard Group.
9 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10 // If for some reason you are missing this file please contact the EMVA or visit the website
11 // (http://www.genicam.org) for a full copy.
12 //
13 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 // POSSIBILITY OF SUCH DAMAGE.
24 //-----------------------------------------------------------------------------
30 #pragma once
31 
32 #include <GenApi/GenApiVersion.h>
33 #include <GenApi/GenApiDll.h>
34 #include <Base/GCString.h>
35 #include <Base/GCStringVector.h>
36 #include <memory>
37 
38 namespace GENAPI_NAMESPACE
39 {
40  class CLock; // forward
41  class CNodeDataMap;
42  struct INodeMap;
43 
49  typedef enum
50  {
57  } ECacheUsage_t;
58 
63  typedef enum
64  {
65  //ContentType_Auto,
69 
70 
71 
72 
73  //*************************************************************
74  // CNodeMapFactory
75  //*************************************************************
76 
138  {
139  public:
141  CNodeMapFactory();
142 
144  virtual ~CNodeMapFactory();
145 
150 
155 
156 
158 
168  CNodeMapFactory( EContentType_t FileType, const GENICAM_NAMESPACE::gcstring& FileName, ECacheUsage_t CacheUsage = CacheUsage_Automatic, bool SuppressStringsOnLoad = false);
169 
170 
172 
183  CNodeMapFactory(EContentType_t ContentType, const void* pData, size_t DataSize, ECacheUsage_t CacheUsage = CacheUsage_Automatic, bool SuppressStringsOnLoad = false);
184 
185 
187 
203  CNodeMapFactory(const GENICAM_NAMESPACE::gcstring& XmlData, ECacheUsage_t CacheUsage = CacheUsage_Automatic, bool SuppressStringsOnLoad = false);
204 
205 
207  bool IsEmpty() const;
208 
209 
211 
218  void AddInjectionData(CNodeMapFactory& injectionData);
219 
220 
222 
225  void LoadAndInject();
226 
227 
229  bool IsLoaded() const;
230 
231 
233 
239  CNodeMapFactory ExtractSubtree(const GENICAM_NAMESPACE::gcstring& SubTreeRootNodeName, bool doRenameToRoot = false);
240 
241 
243 
248  void Preprocess();
249 
250 
252  bool IsPreprocessed() const;
253 
254 
256 
261  void ReleaseCameraDescriptionFileData();
262 
263 
265  bool IsCameraDescriptionFileDataReleased() const;
266 
267 
269 
275  INodeMap* CreateNodeMap(const GENICAM_NAMESPACE::gcstring &DeviceName = "Device", bool DoReleaseCameraDescriptionFileData = true);
276 
277 
279 
287  INodeMap* CreateNodeMap(CLock& UserProvidedLock, const GENICAM_NAMESPACE::gcstring &DeviceName = "Device", bool DoReleaseCameraDescriptionFileData = true);
288 
289 
291  static INodeMap* CreateEmptyNodeMap();
292 
293 
295  static bool ClearCache();
296 
297 
302  void GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions) const;
303 
306 
308  GENICAM_NAMESPACE::gcstring ToXml() const;
309 
310  static CNodeDataMap *CreateNodeDataFromNodeMap( INodeMap* pNodeMap );
311 
312  typedef struct
313  {
314  uint32_t NumNodes;
315  uint32_t NumProperties;
316  uint32_t NumLinks;
317  uint32_t NumStrings;
319 
320  void GetNodeStatistics(NodeStatistics_t &NodeStatistics);
321 
323  const GENICAM_NAMESPACE::gcstring ApplyStyleSheet(const GENICAM_NAMESPACE::gcstring& StyleSheetFileName);
324 
325  private:
326 
327  class CNodeMapFactoryImpl;
328 
329  CNodeMapFactoryImpl* m_pImpl;
330  };
331 }
The node map factory is used for creating node maps from camera description files.
central versioning counters
Suppresses loading and preprocessing of the camera description xml file and forces reading a cache fi...
Portable string vector implementation.
Zipped XML camera description file text.
virtual void operator=(bool Value)
Set node value.
Definition: IBoolean.h:64
interface GENAPI_DECL_ABSTRACT INodeMap
Interface to access the node map.
Definition: INodeMap.h:56
#define GENAPI_DECL
Definition: GenApiDll.h:55
virtual GENICAM_NAMESPACE::gcstring ToString()=0
Returns a string representation of the digit.
Forces the loading and preprocessing of the camera description xml file.
A string class which is a clone of std::string.
Definition: GCString.h:52
The use of cache files is determined automatically.
EContentType_t
Lists the processable file types.
Portable string implementation.
XML camera description file text.
declspec&#39;s to be used for GenApi Windows dll
Forces the loading and preprocessing of the camera description xml file. No cache file is written...
Part of the generic device API.
Definition: Autovector.h:48
A lock class.
Definition: Synch.h:63
virtual void GetSupportedSchemaVersions(GENICAM_NAMESPACE::gcstring_vector &SchemaVersions)=0
Gets a list of supported schema versions.
ECacheUsage_t
Lists the cache usage strategies.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54