NodeMapFactory.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //  (c) 2013 by Basler Vision Technologies
00003 //  Section: Vision Components
00004 //  Project: GenApi
00005 //  Author:  Andreas Gau
00006 //  $Header$
00007 //
00008 //  License: This file is published under the license of the EMVA GenICam  Standard Group.
00009 //  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
00010 //  If for some reason you are missing  this file please contact the EMVA or visit the website
00011 //  (http://www.genicam.org) for a full copy.
00012 //
00013 //  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
00014 //  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00015 //  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00016 //  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
00017 //  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
00018 //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
00019 //  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
00020 //  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
00021 //  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
00022 //  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00023 //  POSSIBILITY OF SUCH DAMAGE.
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; // forward
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         //ContentType_Auto,
00066         ContentType_Xml, 
00067         ContentType_ZippedXml 
00068     } EContentType_t;
00069 
00070 
00071 
00072 
00073     //*************************************************************
00074     // CNodeMapFactory
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 }


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 18:42:47