Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
00085 std::list<CNodeCallback*> CallbacksToFire;
00086 {
00087 AutoLock l(Base::GetLock());
00088
00089 Base::InternalInvalidateNode( CallbacksToFire );
00090
00091
00092 std::list<CNodeCallback*>::iterator ptrCallback;
00093 for( ptrCallback = CallbacksToFire.begin(); ptrCallback != CallbacksToFire.end(); ptrCallback++ )
00094 {
00095 (*ptrCallback)->operator ()(cbPostInsideLock);
00096 }
00097 }
00098
00099
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
00262 NodeT<Base>& operator=( const NodeT<Base>& );
00263
00264 };
00265
00266
00267 }
00268
00269 #endif // GENAPI_NODET_H