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 #pragma warning ( push )
00044 #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
00045 
00046 namespace GENAPI_NAMESPACE
00047 {
00048 
00049     interface INode;
00050     interface INodeMap;
00051 
00053     typedef node_vector NodeList_t;
00054 
00056     typedef intptr_t CallbackHandleType;
00057 
00058     class CNodeCallback;
00059 
00060     //*************************************************************
00061     // INode interface
00062     //*************************************************************
00063 
00068     interface GENAPI_DECL_ABSTRACT INode : virtual public IBase
00069     {
00071         virtual GENICAM_NAMESPACE::gcstring GetName(bool FullQualified=false) const =  0;
00072 
00074         virtual GENAPI_NAMESPACE::ENameSpace GetNameSpace() const =  0;
00075 
00077         virtual EVisibility GetVisibility() const  = 0;
00078 
00080 
00081         virtual void InvalidateNode() = 0;
00082 
00084         virtual bool IsCachable() const =  0;
00085 
00087         virtual EYesNo IsAccessModeCacheable() const = 0;
00088 
00090         virtual ECachingMode GetCachingMode() const = 0;
00091 
00093         virtual int64_t GetPollingTime() const = 0;
00094 
00096         virtual GENICAM_NAMESPACE::gcstring GetToolTip() const = 0;
00097 
00099         virtual GENICAM_NAMESPACE::gcstring GetDescription() const = 0;
00100 
00102         virtual GENICAM_NAMESPACE::gcstring GetDisplayName() const = 0;
00103 
00105         virtual GENICAM_NAMESPACE::gcstring GetDeviceName() const = 0;
00106 
00112         virtual void GetChildren(GENAPI_NAMESPACE::NodeList_t &Children, ELinkType LinkType=ctReadingChildren) const =  0;
00113 
00118         virtual void GetParents(GENAPI_NAMESPACE::NodeList_t &Parents) const = 0;
00119 
00121 
00122         virtual CallbackHandleType RegisterCallback( CNodeCallback *pCallback ) = 0;
00123 
00125 
00128         virtual bool DeregisterCallback( CallbackHandleType hCallback ) = 0;
00129 
00131         virtual INodeMap* GetNodeMap() const = 0;
00132 
00134         virtual GENICAM_NAMESPACE::gcstring GetEventID() const =  0;
00135 
00137         virtual bool IsStreamable() const =  0;
00138 
00140         virtual void GetPropertyNames(GENICAM_NAMESPACE::gcstring_vector &PropertyNames) const =  0;
00141 
00143 
00144         virtual bool GetProperty(const GENICAM_NAMESPACE::gcstring& PropertyName, GENICAM_NAMESPACE::gcstring& ValueStr, GENICAM_NAMESPACE::gcstring& AttributeStr) = 0;
00145 
00147         virtual void ImposeAccessMode(EAccessMode ImposedAccessMode) =  0;
00148 
00150         virtual void ImposeVisibility(EVisibility ImposedVisibility) =  0;
00151 
00153         virtual INode* GetAlias() const = 0;
00154 
00156         virtual INode* GetCastAlias() const = 0;
00157 
00159         virtual GENICAM_NAMESPACE::gcstring GetDocuURL() const =  0;
00160 
00162         virtual bool IsDeprecated() const =  0;
00163 
00165         virtual EInterfaceType GetPrincipalInterfaceType() const = 0;
00166 
00168         virtual bool IsFeature() const =  0;
00169 
00170     };
00171 
00174 
00176     inline bool IsReadable( EAccessMode AccessMode )
00177     {
00178         return RO == AccessMode || RW == AccessMode;
00179     }
00180 
00182     inline bool IsReadable( const IBase* p)
00183     {
00184         return (p != NULL) && IsReadable( p->GetAccessMode() );
00185     }
00186 
00188     inline bool IsReadable( const IBase& r)
00189     {
00190         return IsReadable( r.GetAccessMode() );
00191     }
00192 
00194     inline bool IsWritable( EAccessMode AccessMode )
00195     {
00196         return WO == AccessMode || RW == AccessMode;
00197     }
00198 
00200     inline bool IsWritable( const IBase* p)
00201     {
00202         return (p != NULL) && IsWritable( p->GetAccessMode() );
00203     }
00204 
00206     inline bool IsWritable( const IBase& r)
00207     {
00208         return IsWritable( r.GetAccessMode() );
00209     }
00210 
00212     inline bool IsImplemented( EAccessMode AccessMode )
00213     {
00214         return AccessMode != NI;
00215     }
00216 
00218     inline bool IsImplemented( const IBase* p)
00219     {
00220         return (p != NULL) && IsImplemented(p->GetAccessMode() );
00221     }
00222 
00224     inline bool IsImplemented( const IBase& r)
00225     {
00226         return IsImplemented(&r);
00227     }
00228 
00230     inline bool IsAvailable( EAccessMode AccessMode )
00231     {
00232         return ! ( AccessMode == NA || AccessMode == NI );
00233     }
00234 
00236     inline bool IsAvailable( const IBase* p)
00237     {
00238         return (p != NULL) && IsAvailable(p->GetAccessMode() );
00239     }
00240     
00242     inline bool IsAvailable( const IBase& r)
00243     {
00244         return IsAvailable(r.GetAccessMode() );
00245     }
00246 
00248     inline EAccessMode Combine(EAccessMode Peter, EAccessMode Paul)
00249     {
00250         assert( Peter != _UndefinedAccesMode );
00251         assert( Paul != _UndefinedAccesMode );
00252 
00253         if( Peter == NI || Paul == NI )
00254             return NI;
00255         else if( Peter == NA || Paul == NA )
00256             return NA;
00257         else if( (Peter == RO && Paul == WO) || (Peter == WO && Paul == RO)  )
00258             return NA;
00259         else if( Peter == WO || Paul == WO )
00260             return WO;
00261         else if( Peter == RO || Paul == RO )
00262             return RO;
00263         else
00264             return RW;
00265     }
00266 
00267 
00269 
00270     inline bool IsVisible( EVisibility Visibility, EVisibility MaxVisiblity )
00271     {
00272         return (Visibility <= MaxVisiblity);
00273     }
00274 
00275 
00277     inline EVisibility Combine(EVisibility Peter, EVisibility Paul)
00278     {
00279         assert( Peter != _UndefinedVisibility );
00280         assert( Paul != _UndefinedVisibility );
00281 
00282         if( Peter == Invisible || Paul == Invisible )
00283             return Invisible;
00284         else if( Peter == Guru || Paul == Guru )
00285             return Guru;
00286         else if( Peter == Expert || Paul == Expert )
00287             return Expert;
00288         else
00289             return Beginner;
00290     }
00291 
00292 
00294     inline bool IsCacheable( ECachingMode CachingMode )
00295     {
00296         return (CachingMode != NoCache);
00297     }
00298 
00300     inline ECachingMode Combine(ECachingMode Peter, ECachingMode Paul)
00301     {
00302         assert( Peter != _UndefinedCachingMode );
00303         assert( Paul != _UndefinedCachingMode );
00304 
00305         if( Peter == NoCache || Paul == NoCache )
00306             return NoCache;
00307         else if( Peter == WriteAround || Paul == WriteAround )
00308             return WriteAround;
00309         else
00310             return WriteThrough;
00311     }
00312 
00314 
00315 }
00316 
00317 #pragma warning ( pop )
00318 
00319 #endif // ifndef GENAPI_INODE_H


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05