NodeT.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:  Alexander Happe
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 //-----------------------------------------------------------------------------
00031 #ifndef GENAPI_NODET_H
00032 #define GENAPI_NODET_H
00033 
00034 #include "../NodeCallback.h"
00035 #include "../INode.h"
00036 #include "../Synch.h"
00037 #include "GenApi/impl/Log.h"
00038 #include "Node.h"
00039 #ifndef _MSC_VER
00040 #include <list>
00041 #endif
00042 
00043 namespace GENAPI_NAMESPACE
00044 {
00045 
00049     template< class Base >
00050     class NodeT : public Base
00051     {
00052     public:
00054         virtual GENICAM_NAMESPACE::gcstring GetName(bool FullQualified) const
00055         {
00056             AutoLock l(Base::GetLock());
00057 
00058             return Base::InternalGetName(FullQualified);
00059         }
00060 
00062         virtual GENAPI_NAMESPACE::ENameSpace GetNameSpace() const
00063         {
00064             AutoLock l(Base::GetLock());
00065 
00066             return Base::InternalGetNameSpace();
00067         }
00068 
00070         virtual EVisibility GetVisibility() const
00071         {
00072             AutoLock l(Base::GetLock());
00073 
00074             EVisibility NaturalVisibility = Base::InternalGetVisibility();
00075 
00076             EVisibility Visibility = Combine(NaturalVisibility, Base::m_ImposedVisibility);
00077 
00078             return Visibility;
00079         }
00080 
00082         virtual void InvalidateNode()
00083         {
00084             // a list of callbacks to fire held outside(!) the autolock on the stack(!)
00085             std::list<CNodeCallback*> CallbacksToFire;
00086             {
00087                 AutoLock l(Base::GetLock());
00088 
00089                 Base::InternalInvalidateNode( CallbacksToFire );
00090 
00091                 // fire callbacks inside the lock
00092                 std::list<CNodeCallback*>::iterator ptrCallback;
00093                 for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
00094                 {
00095                     (*ptrCallback)->operator ()(cbPostInsideLock);
00096                 }
00097             }
00098 
00099             // fire callbacks outside the lock
00100             std::list<CNodeCallback*>::iterator ptrCallback;
00101             for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
00102             {
00103                 (*ptrCallback)->operator ()(cbPostOutsideLock);
00104             }
00105         }
00106 
00108         virtual bool IsCachable()const
00109         {
00110             AutoLock l(Base::GetLock());
00111 
00112             return Base::InternalIsCachable();
00113         }
00114 
00116         virtual ECachingMode GetCachingMode() const
00117         {
00118             AutoLock l(Base::GetLock());
00119 
00120             return Base::InternalGetCachingMode();
00121         }
00122 
00124         virtual EYesNo IsAccessModeCacheable() const
00125         {
00126             AutoLock l(Base::GetLock());
00127 
00128             return Base::InternalIsAccessModeCacheable();
00129         }
00130 
00132         virtual int64_t GetPollingTime()const
00133         {
00134             AutoLock l(Base::GetLock());
00135 
00136             return Base::InternalGetPollingTime();
00137         }
00138 
00140         virtual GENICAM_NAMESPACE::gcstring GetToolTip() const
00141         {
00142             AutoLock l(Base::GetLock());
00143 
00144             return Base::InternalGetToolTip();
00145         }
00146 
00148         virtual GENICAM_NAMESPACE::gcstring GetDescription() const
00149         {
00150             AutoLock l(Base::GetLock());
00151 
00152             return Base::InternalGetDescription();
00153         }
00154 
00156         virtual GENICAM_NAMESPACE::gcstring GetDisplayName() const
00157         {
00158             AutoLock l(Base::GetLock());
00159 
00160             return Base::InternalGetDisplayName();
00161         }
00162 
00164         virtual GENICAM_NAMESPACE::gcstring GetDeviceName() const
00165         {
00166             AutoLock l(Base::GetLock());
00167 
00168             return Base::InternalGetDeviceName();
00169         }
00170 
00172         virtual void GetChildren(NodeList_t &Children, ELinkType LinkType) const
00173         {
00174             AutoLock l(Base::GetLock());
00175 
00176             return Base::InternalGetChildren( Children, LinkType );
00177         }
00178 
00180         virtual CallbackHandleType RegisterCallback( CNodeCallback *pCallback )
00181         {
00182             AutoLock l(Base::GetLock());
00183 
00184             return Base::InternalRegisterCallback( pCallback );
00185         }
00186 
00188         virtual bool DeregisterCallback( CallbackHandleType hCallback )
00189         {
00190             AutoLock l(Base::GetLock());
00191 
00192             return Base::InternalDeregisterCallback( hCallback );
00193         }
00194 
00196         virtual INodeMap* GetNodeMap() const
00197         {
00198             AutoLock l(Base::GetLock());
00199 
00200             return Base::InternalGetNodeMap();
00201         }
00202 
00204         virtual GENICAM_NAMESPACE::gcstring GetEventID() const
00205         {
00206             AutoLock l(Base::GetLock());
00207 
00208             return Base::GetEventID();
00209         }
00210 
00212         virtual void GetPropertyNames(GENICAM_NAMESPACE::gcstring_vector &PropertyNames) const
00213         {
00214             AutoLock l(Base::GetLock());
00215 
00216             Base::GetPropertyNames(PropertyNames);
00217         }
00218 
00220 
00221         virtual bool GetProperty(const GENICAM_NAMESPACE::gcstring& PropertyName, GENICAM_NAMESPACE::gcstring& ValueStr, GENICAM_NAMESPACE::gcstring& AttributeStr)
00222         {
00223             AutoLock l(Base::GetLock());
00224 
00225             return CNodeImpl::GetProperty(PropertyName, ValueStr, AttributeStr);
00226         }
00227 
00228         virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList)
00229         {
00230             AutoLock l(Base::GetLock());
00231 
00232             return Base::GetProperty(pNodeDataMap, PropertyID, PropertyList);
00233         }
00234 
00235 
00237         virtual GENICAM_NAMESPACE::gcstring GetDocuURL() const
00238         {
00239             AutoLock l(Base::GetLock());
00240 
00241             return Base::InternalGetDocuURL();
00242         }
00243 
00245         virtual bool IsDeprecated() const
00246         {
00247             AutoLock l(Base::GetLock());
00248 
00249             return Base::InternalIsDeprecated();
00250         }
00251 
00253         virtual EInterfaceType GetPrincipalInterfaceType() const
00254         {
00255             AutoLock l(Base::GetLock());
00256 
00257             return Base::InternalGetPrincipalInterfaceType();
00258         }
00259 
00260     private:
00261         // suppress assignment operator
00262         NodeT<Base>& operator=( const NodeT<Base>& );
00263 
00264     };
00265 
00266 
00267 }
00268 
00269 #endif // GENAPI_NODET_H


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