BaseT.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Alexander Happe
6 // $Header$
7 //
8 // License: This file is published under the license of the EMVA GenICam Standard Group.
9 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10 // If for some reason you are missing this file please contact the EMVA or visit the website
11 // (http://www.genicam.org) for a full copy.
12 //
13 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 // POSSIBILITY OF SUCH DAMAGE.
24 //-----------------------------------------------------------------------------
31 #ifndef GENAPI_BASET_H
32 #define GENAPI_BASET_H
33 
34 #include "../Synch.h"
35 #include "../IBase.h"
36 #include "../EnumClasses.h"
37 #include "GenApi/impl/Log.h"
38 #include "Exception.h"
39 
40 
41 
42 namespace GENAPI_NAMESPACE
43 {
47  template<class Base>
48  class BaseT : public Base
49  {
50  public:
52  virtual EAccessMode GetAccessMode() const
53  {
55 
56  // Use cache
57  #if ! defined( DISABLE_ACCESS_MODE_CACHING ) || (DISABLE_ACCESS_MODE_CACHING == 0)
58 #pragma BullseyeCoverage off
59  if ( _UndefinedAccesMode != Base::m_AccessModeCache
60  && _CycleDetectAccesMode != Base::m_AccessModeCache
61  )
62 #pragma BullseyeCoverage on
63  {
64  EAccessMode AccessMode = Combine(Base::m_AccessModeCache, Base::m_ImposedAccessMode);
65  GCLOGINFO( Base::m_pAccessLog, "GetAccessMode = '%s' (from cache)", EAccessModeClass::ToString(AccessMode).c_str() );
66 
67  return AccessMode;
68  }
69 
70  #endif
71 
72  typename Base::EntryMethodFinalizer E( this, meGetAccessMode );
73 
74  GCLOGINFOPUSH( Base::m_pAccessLog, "GetAccessMode...");
75 
76  EAccessMode NaturalAccessMode = Base::InternalGetAccessMode();
77 
78  EAccessMode AccessMode = Combine(NaturalAccessMode, Base::m_ImposedAccessMode);
79  GCLOGINFOPOP( Base::m_pAccessLog, "...GetAccessMode = '%s' ", EAccessModeClass::ToString(AccessMode).c_str() );
80 
81  return AccessMode;
82 
83  }
84 
85  };
86 }
87 
88 #endif
static void ToString(GENICAM_NAMESPACE::gcstring &ValueStr, EAccessMode *pValue)
Converts a string to an int32_t property.
Definition: EnumClasses.h:250
#define GCLOGINFO(cat,...)
Definition: CLog.h:162
used internally for AccessMode cycle detection
Definition: Types.h:62
EAccessMode Combine(EAccessMode Peter, EAccessMode Paul)
Computes which access mode the two guards allow together.
Definition: INode.h:250
Implementation of the IBase interface.
Definition: BaseT.h:48
virtual EAccessMode GetAccessMode() const
Implementation of IBase::GetAccessMode()
Definition: BaseT.h:52
#define GCLOGINFOPUSH(cat,...)
Definition: CLog.h:163
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
Object is not yet initialized.
Definition: Types.h:61
#define GCLOGINFOPOP(cat,...)
Definition: CLog.h:164
Part of the generic device API.
Definition: Autovector.h:48
virtual CLock & GetLock() const =0
Returns the lock which guards the node map.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:53