INode.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //  (c) 2006 by Basler Vision Technologies
00003 //  Section: Vision Components
00004 //  Project: GenApi
00005 //  Author:  Fritz Dierks
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 //-----------------------------------------------------------------------------
00032 #ifndef GENAPI_INODE_H
00033 #define GENAPI_INODE_H
00034 
00035 #include <Base/GCString.h>
00036 #include <GenApi/GenApiDll.h>
00037 #include <GenApi/Types.h>
00038 #include <GenApi/IBase.h>
00039 #include <GenApi/Container.h>
00040 
00041 #include <assert.h>
00042 
00043 #ifdef _MSC_VER
00044 #   pragma warning ( push )
00045 #   pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
00046 #endif
00047 
00048 namespace GENAPI_NAMESPACE
00049 {
00050 
00051     interface INode;
00052     interface INodeMap;
00053 
00055     typedef node_vector NodeList_t;
00056 
00058     typedef intptr_t CallbackHandleType;
00059 
00060     class CNodeCallback;
00061 
00062     //*************************************************************
00063     // INode interface
00064     //*************************************************************
00065 
00070     interface GENAPI_DECL_ABSTRACT INode : virtual public IBase
00071     {
00073         virtual GENICAM_NAMESPACE::gcstring GetName(bool FullQualified=false) const =  0;
00074 
00076         virtual GENAPI_NAMESPACE::ENameSpace GetNameSpace() const =  0;
00077 
00079         virtual EVisibility GetVisibility() const  = 0;
00080 
00082 
00083         virtual void InvalidateNode() = 0;
00084 
00086         virtual bool IsCachable() const =  0;
00087 
00089         virtual EYesNo IsAccessModeCacheable() const = 0;
00090 
00092         virtual ECachingMode GetCachingMode() const = 0;
00093 
00095         virtual int64_t GetPollingTime() const = 0;
00096 
00098         virtual GENICAM_NAMESPACE::gcstring GetToolTip() const = 0;
00099 
00101         virtual GENICAM_NAMESPACE::gcstring GetDescription() const = 0;
00102 
00104         virtual GENICAM_NAMESPACE::gcstring GetDisplayName() const = 0;
00105 
00107         virtual GENICAM_NAMESPACE::gcstring GetDeviceName() const = 0;
00108 
00114         virtual void GetChildren(GENAPI_NAMESPACE::NodeList_t &Children, ELinkType LinkType=ctReadingChildren) const =  0;
00115 
00120         virtual void GetParents(GENAPI_NAMESPACE::NodeList_t &Parents) const = 0;
00121 
00123 
00124         virtual CallbackHandleType RegisterCallback( CNodeCallback *pCallback ) = 0;
00125 
00127 
00130         virtual bool DeregisterCallback( CallbackHandleType hCallback ) = 0;
00131 
00133         virtual INodeMap* GetNodeMap() const = 0;
00134 
00136         virtual GENICAM_NAMESPACE::gcstring GetEventID() const =  0;
00137 
00139         virtual bool IsStreamable() const =  0;
00140 
00142         virtual void GetPropertyNames(GENICAM_NAMESPACE::gcstring_vector &PropertyNames) const =  0;
00143 
00145 
00146         virtual bool GetProperty(const GENICAM_NAMESPACE::gcstring& PropertyName, GENICAM_NAMESPACE::gcstring& ValueStr, GENICAM_NAMESPACE::gcstring& AttributeStr) = 0;
00147 
00149         virtual void ImposeAccessMode(EAccessMode ImposedAccessMode) =  0;
00150 
00152         virtual void ImposeVisibility(EVisibility ImposedVisibility) =  0;
00153 
00155         virtual INode* GetAlias() const = 0;
00156 
00158         virtual INode* GetCastAlias() const = 0;
00159 
00161         virtual GENICAM_NAMESPACE::gcstring GetDocuURL() const =  0;
00162 
00164         virtual bool IsDeprecated() const =  0;
00165 
00167         virtual EInterfaceType GetPrincipalInterfaceType() const = 0;
00168 
00170         virtual bool IsFeature() const =  0;
00171 
00172     };
00173 
00176 
00178     inline bool IsReadable( EAccessMode AccessMode )
00179     {
00180         return RO == AccessMode || RW == AccessMode;
00181     }
00182 
00184     inline bool IsReadable( const IBase* p)
00185     {
00186         return (p != NULL) && IsReadable( p->GetAccessMode() );
00187     }
00188 
00190     inline bool IsReadable( const IBase& r)
00191     {
00192         return IsReadable( r.GetAccessMode() );
00193     }
00194 
00196     inline bool IsWritable( EAccessMode AccessMode )
00197     {
00198         return WO == AccessMode || RW == AccessMode;
00199     }
00200 
00202     inline bool IsWritable( const IBase* p)
00203     {
00204         return (p != NULL) && IsWritable( p->GetAccessMode() );
00205     }
00206 
00208     inline bool IsWritable( const IBase& r)
00209     {
00210         return IsWritable( r.GetAccessMode() );
00211     }
00212 
00214     inline bool IsImplemented( EAccessMode AccessMode )
00215     {
00216         return AccessMode != NI;
00217     }
00218 
00220     inline bool IsImplemented( const IBase* p)
00221     {
00222         return (p != NULL) && IsImplemented(p->GetAccessMode() );
00223     }
00224 
00226     inline bool IsImplemented( const IBase& r)
00227     {
00228         return IsImplemented(&r);
00229     }
00230 
00232     inline bool IsAvailable( EAccessMode AccessMode )
00233     {
00234         return ! ( AccessMode == NA || AccessMode == NI );
00235     }
00236 
00238     inline bool IsAvailable( const IBase* p)
00239     {
00240         return (p != NULL) && IsAvailable(p->GetAccessMode() );
00241     }
00242     
00244     inline bool IsAvailable( const IBase& r)
00245     {
00246         return IsAvailable(r.GetAccessMode() );
00247     }
00248 
00250     inline EAccessMode Combine(EAccessMode Peter, EAccessMode Paul)
00251     {
00252         assert( Peter != _UndefinedAccesMode );
00253         assert( Paul != _UndefinedAccesMode );
00254 
00255         if( Peter == NI || Paul == NI )
00256             return NI;
00257         else if( Peter == NA || Paul == NA )
00258             return NA;
00259         else if( (Peter == RO && Paul == WO) || (Peter == WO && Paul == RO)  )
00260             return NA;
00261         else if( Peter == WO || Paul == WO )
00262             return WO;
00263         else if( Peter == RO || Paul == RO )
00264             return RO;
00265         else
00266             return RW;
00267     }
00268 
00269 
00271 
00272     inline bool IsVisible( EVisibility Visibility, EVisibility MaxVisiblity )
00273     {
00274         return (Visibility <= MaxVisiblity);
00275     }
00276 
00277 
00279     inline EVisibility Combine(EVisibility Peter, EVisibility Paul)
00280     {
00281         assert( Peter != _UndefinedVisibility );
00282         assert( Paul != _UndefinedVisibility );
00283 
00284         if( Peter == Invisible || Paul == Invisible )
00285             return Invisible;
00286         else if( Peter == Guru || Paul == Guru )
00287             return Guru;
00288         else if( Peter == Expert || Paul == Expert )
00289             return Expert;
00290         else
00291             return Beginner;
00292     }
00293 
00294 
00296     inline bool IsCacheable( ECachingMode CachingMode )
00297     {
00298         return (CachingMode != NoCache);
00299     }
00300 
00302     inline ECachingMode Combine(ECachingMode Peter, ECachingMode Paul)
00303     {
00304         assert( Peter != _UndefinedCachingMode );
00305         assert( Paul != _UndefinedCachingMode );
00306 
00307         if( Peter == NoCache || Paul == NoCache )
00308             return NoCache;
00309         else if( Peter == WriteAround || Paul == WriteAround )
00310             return WriteAround;
00311         else
00312             return WriteThrough;
00313     }
00314 
00316 
00317 }
00318 
00319 #ifdef _MSC_VER
00320 #   pragma warning ( pop )
00321 #endif
00322 
00323 #endif // ifndef GENAPI_INODE_H


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