BaseFeature.h
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
3 
4  Redistribution of this file, in original or modified form, without
5  prior written consent of Allied Vision Technologies is prohibited.
6 
7 -------------------------------------------------------------------------------
8 
9  File: BaseFeature.h
10 
11  Description: Definition of base class AVT::VmbAPI::BaseFeature.
12 
13 -------------------------------------------------------------------------------
14 
15  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
16  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
17  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 =============================================================================*/
27 
28 #ifndef AVT_VMBAPI_BASEFEATURE_H
29 #define AVT_VMBAPI_BASEFEATURE_H
30 
31 #include <VimbaC/Include/VimbaC.h>
35 
36 namespace AVT {
37 namespace VmbAPI {
38 
39 class BaseFeature : public virtual BasicLockable
40 {
41  friend class Feature;
42 
43  public:
44  BaseFeature( const VmbFeatureInfo_t *pFeatureInfo, FeatureContainer *pFeatureContainer );
45  virtual ~BaseFeature();
46 
47  IMEXPORT virtual VmbErrorType GetValue( VmbInt64_t &value ) const;
48  IMEXPORT virtual VmbErrorType GetValue( double &value ) const;
49  IMEXPORT virtual VmbErrorType GetValue( bool &value ) const;
50 
51  IMEXPORT virtual VmbErrorType SetValue( const VmbInt32_t &value );
52  IMEXPORT virtual VmbErrorType SetValue( const VmbInt64_t &value );
53  IMEXPORT virtual VmbErrorType SetValue( const double &value );
54  IMEXPORT virtual VmbErrorType SetValue( const char *pValue );
55  IMEXPORT virtual VmbErrorType SetValue( bool value );
56 
57  IMEXPORT virtual VmbErrorType GetEntry( EnumEntry &entry, const char * pStrEntryName ) const;
58 
59  IMEXPORT virtual VmbErrorType GetRange( VmbInt64_t &minimum, VmbInt64_t &maximum ) const;
60  IMEXPORT virtual VmbErrorType GetRange( double &minimum, double &maximum ) const;
61 
62  IMEXPORT virtual VmbErrorType HasIncrement( VmbBool_t &incrementSupported) const;
63  IMEXPORT virtual VmbErrorType GetIncrement( VmbInt64_t &increment ) const;
64  IMEXPORT virtual VmbErrorType GetIncrement( double &increment ) const;
65 
66  IMEXPORT virtual VmbErrorType IsValueAvailable( const char *pValue, bool &available ) const;
67  IMEXPORT virtual VmbErrorType IsValueAvailable( const VmbInt64_t value, bool &available ) const;
68 
69  IMEXPORT virtual VmbErrorType RunCommand();
70  IMEXPORT virtual VmbErrorType IsCommandDone( bool &isDone ) const;
71 
72  IMEXPORT VmbErrorType GetDataType( VmbFeatureDataType &dataType ) const;
73  IMEXPORT VmbErrorType GetFlags( VmbFeatureFlagsType &flags ) const;
74  IMEXPORT VmbErrorType GetPollingTime( VmbUint32_t &pollingTime ) const;
75  IMEXPORT VmbErrorType GetVisibility( VmbFeatureVisibilityType &visibility ) const;
76  IMEXPORT VmbErrorType IsReadable( bool &isReadable );
77  IMEXPORT VmbErrorType IsWritable( bool &isWritable );
78  IMEXPORT VmbErrorType IsStreamable( bool &isStreamable ) const;
79 
80  IMEXPORT VmbErrorType RegisterObserver( const IFeatureObserverPtr &observer );
81  IMEXPORT VmbErrorType UnregisterObserver( const IFeatureObserverPtr &observer );
82 
83  void ResetFeatureContainer();
84 
85  protected:
86  // Copy of feature infos
87  struct FeatureInfo
88  {
89  std::string name; // Verbose name
90  VmbFeatureData_t featureDataType; // Data type of this feature
91  VmbFeatureFlags_t featureFlags; // Access flags for this feature
92  bool hasAffectedFeatures; // true if the feature selects or invalidates other features
93  bool hasSelectedFeatures; // true if the feature selects other features
94  std::string category; // Category this feature can be found in
95  std::string displayName; // Feature name to be used in GUIs
96  VmbUint32_t pollingTime; // Predefined polling time for volatile features
97  std::string unit; // Measuring unit as given in the XML file
98  std::string representation; // Representation of a numeric feature
100  std::string tooltip; // Short description
101  std::string description; // Longer description
102  std::string sfncNamespace; // Namespace this feature resides in
103  bool isStreamable; // Feature can be stored or loaded from/into a file
104  };
105 
107 
109 
110  private:
111  // Default ctor
112  BaseFeature();
113 
114  // Copy ctor
115  BaseFeature( const BaseFeature& );
116 
117  struct Impl;
118  Impl *m_pImpl;
119 
120  // Array functions to pass data across DLL boundaries
121  IMEXPORT virtual VmbErrorType GetValue( char * const pValue, VmbUint32_t &length ) const;
122  IMEXPORT virtual VmbErrorType GetValue( VmbUchar_t *pValue, VmbUint32_t &size, VmbUint32_t &sizeFilled ) const;
123  IMEXPORT virtual VmbErrorType GetValues( const char **pValues, VmbUint32_t &size );
124  IMEXPORT virtual VmbErrorType GetValues( VmbInt64_t *pValues, VmbUint32_t &Size );
125 
126  IMEXPORT virtual VmbErrorType SetValue( const VmbUchar_t *pValue, VmbUint32_t size );
127 
128  IMEXPORT virtual VmbErrorType GetEntries( EnumEntry *pEntries, VmbUint32_t &size );
129 
130  IMEXPORT virtual VmbErrorType GetName( char * const pName, VmbUint32_t &length ) const;
131  IMEXPORT VmbErrorType GetDisplayName( char * const pDisplayName, VmbUint32_t &length ) const;
132  IMEXPORT VmbErrorType GetCategory( char * const pCategory, VmbUint32_t &length ) const;
133  IMEXPORT VmbErrorType GetUnit( char * const pUnit, VmbUint32_t &length ) const;
134  IMEXPORT VmbErrorType GetRepresentation( char * const pRepresentation, VmbUint32_t &length ) const;
135  IMEXPORT VmbErrorType GetToolTip( char * const pToolTip, VmbUint32_t &length ) const;
136  IMEXPORT VmbErrorType GetDescription( char * const pDescription, VmbUint32_t &length ) const;
137  IMEXPORT VmbErrorType GetSFNCNamespace( char * const pSFNCNamespace, VmbUint32_t &length ) const;
138  IMEXPORT VmbErrorType GetAffectedFeatures( FeaturePtr *pAffectedFeatures, VmbUint32_t &nSize );
139  IMEXPORT VmbErrorType GetSelectedFeatures( FeaturePtr *pSelectedFeatures, VmbUint32_t &nSize );
140 };
141 
142 }} // namespace AVT::VmbAPI
143 
144 #endif
AVT::VmbAPI::BaseFeature::RegisterObserver
IMEXPORT VmbErrorType RegisterObserver(const IFeatureObserverPtr &observer)
Definition: BaseFeature.cpp:213
VmbFeatureData_t
VmbUint32_t VmbFeatureData_t
Definition: VimbaC.h:175
AVT::VmbAPI::BaseFeature::GetEntries
virtual IMEXPORT VmbErrorType GetEntries(EnumEntry *pEntries, VmbUint32_t &size)
Definition: BaseFeature.cpp:385
AVT::VmbAPI::BaseFeature::FeatureInfo::representation
std::string representation
Definition: BaseFeature.h:98
AVT::VmbAPI::BaseFeature::m_featureInfo
FeatureInfo m_featureInfo
Definition: BaseFeature.h:106
AVT::VmbAPI::BaseFeature::HasIncrement
virtual IMEXPORT VmbErrorType HasIncrement(VmbBool_t &incrementSupported) const
Definition: BaseFeature.cpp:337
AVT::VmbAPI::BaseFeature::GetIncrement
virtual IMEXPORT VmbErrorType GetIncrement(VmbInt64_t &increment) const
Definition: BaseFeature.cpp:342
AVT::VmbAPI::BaseFeature::IsStreamable
IMEXPORT VmbErrorType IsStreamable(bool &isStreamable) const
Definition: BaseFeature.cpp:869
AVT::VmbAPI::BaseFeature::FeatureInfo::hasSelectedFeatures
bool hasSelectedFeatures
Definition: BaseFeature.h:93
AVT
Definition: AncillaryData.h:35
AVT::VmbAPI::BaseFeature::GetAffectedFeatures
IMEXPORT VmbErrorType GetAffectedFeatures(FeaturePtr *pAffectedFeatures, VmbUint32_t &nSize)
Definition: BaseFeature.cpp:669
AVT::VmbAPI::BaseFeature::FeatureInfo::category
std::string category
Definition: BaseFeature.h:94
VmbErrorType
VmbErrorType
Definition: VmbCommonTypes.h:106
Feature.h
AVT::VmbAPI::EnumEntry
Definition: EnumEntry.h:45
AVT::VmbAPI::BaseFeature::GetDisplayName
IMEXPORT VmbErrorType GetDisplayName(char *const pDisplayName, VmbUint32_t &length) const
Definition: BaseFeature.cpp:480
AVT::VmbAPI::BaseFeature::FeatureInfo::featureDataType
VmbFeatureData_t featureDataType
Definition: BaseFeature.h:90
AVT::VmbAPI::BaseFeature::GetFlags
IMEXPORT VmbErrorType GetFlags(VmbFeatureFlagsType &flags) const
Definition: BaseFeature.cpp:510
AVT::VmbAPI::BaseFeature::GetSelectedFeatures
IMEXPORT VmbErrorType GetSelectedFeatures(FeaturePtr *pSelectedFeatures, VmbUint32_t &nSize)
Definition: BaseFeature.cpp:757
AVT::VmbAPI::BaseFeature::GetUnit
IMEXPORT VmbErrorType GetUnit(char *const pUnit, VmbUint32_t &length) const
Definition: BaseFeature.cpp:547
VmbFeatureFlagsType
VmbFeatureFlagsType
Definition: VimbaC.h:193
AVT::VmbAPI::BaseFeature::GetEntry
virtual IMEXPORT VmbErrorType GetEntry(EnumEntry &entry, const char *pStrEntryName) const
Definition: BaseFeature.cpp:379
AVT::VmbAPI::BaseFeature::GetDescription
IMEXPORT VmbErrorType GetDescription(char *const pDescription, VmbUint32_t &length) const
Definition: BaseFeature.cpp:623
AVT::VmbAPI::BaseFeature::FeatureInfo::unit
std::string unit
Definition: BaseFeature.h:97
AVT::VmbAPI::BaseFeature::FeatureInfo::name
std::string name
Definition: BaseFeature.h:89
VmbFeatureVisibility_t
VmbUint32_t VmbFeatureVisibility_t
Definition: VimbaC.h:188
AVT::VmbAPI::BaseFeature
Definition: BaseFeature.h:39
VmbFeatureFlags_t
VmbUint32_t VmbFeatureFlags_t
Definition: VimbaC.h:201
AVT::VmbAPI::BaseFeature::GetToolTip
IMEXPORT VmbErrorType GetToolTip(char *const pToolTip, VmbUint32_t &length) const
Definition: BaseFeature.cpp:600
AVT::VmbAPI::BaseFeature::FeatureInfo::sfncNamespace
std::string sfncNamespace
Definition: BaseFeature.h:102
AVT::VmbAPI::BaseFeature::BaseFeature
BaseFeature()
Definition: BaseFeature.cpp:93
AVT::VmbAPI::BaseFeature::IsCommandDone
virtual IMEXPORT VmbErrorType IsCommandDone(bool &isDone) const
Definition: BaseFeature.cpp:440
AVT::VmbAPI::BaseFeature::GetValue
virtual IMEXPORT VmbErrorType GetValue(VmbInt64_t &value) const
Definition: BaseFeature.cpp:314
AVT::VmbAPI::BaseFeature::GetValues
virtual IMEXPORT VmbErrorType GetValues(const char **pValues, VmbUint32_t &size)
Definition: BaseFeature.cpp:391
AVT::VmbAPI::BaseFeature::FeatureInfo::featureFlags
VmbFeatureFlags_t featureFlags
Definition: BaseFeature.h:91
VmbFeatureVisibilityType
VmbFeatureVisibilityType
Definition: VimbaC.h:180
AVT::VmbAPI::BaseFeature::m_pImpl
Impl * m_pImpl
Definition: BaseFeature.h:117
AVT::VmbAPI::BaseFeature::UnregisterObserver
IMEXPORT VmbErrorType UnregisterObserver(const IFeatureObserverPtr &observer)
Definition: BaseFeature.cpp:260
VmbUint32_t
unsigned int VmbUint32_t
Definition: VmbCommonTypes.h:73
AVT::VmbAPI::BaseFeature::GetRange
virtual IMEXPORT VmbErrorType GetRange(VmbInt64_t &minimum, VmbInt64_t &maximum) const
Definition: BaseFeature.cpp:332
AVT::VmbAPI::BaseFeature::RunCommand
virtual IMEXPORT VmbErrorType RunCommand()
Definition: BaseFeature.cpp:434
AVT::VmbAPI::BaseFeature::m_pFeatureContainer
FeatureContainer * m_pFeatureContainer
Definition: BaseFeature.h:108
VmbInt64_t
long long VmbInt64_t
Definition: VmbCommonTypes.h:75
AVT::VmbAPI::BaseFeature::SetValue
virtual IMEXPORT VmbErrorType SetValue(const VmbInt32_t &value)
Definition: BaseFeature.cpp:326
VimbaC.h
AVT::VmbAPI::BaseFeature::IsValueAvailable
virtual IMEXPORT VmbErrorType IsValueAvailable(const char *pValue, bool &available) const
Definition: BaseFeature.cpp:403
AVT::VmbAPI::BaseFeature::GetPollingTime
IMEXPORT VmbErrorType GetPollingTime(VmbUint32_t &pollingTime) const
Definition: BaseFeature.cpp:540
VmbFeatureDataType
VmbFeatureDataType
Definition: VimbaC.h:163
AVT::VmbAPI::BasicLockable
Definition: BasicLockable.h:38
AVT::VmbAPI::BaseFeature::FeatureInfo::isStreamable
bool isStreamable
Definition: BaseFeature.h:103
AVT::VmbAPI::BaseFeature::FeatureInfo::description
std::string description
Definition: BaseFeature.h:101
AVT::VmbAPI::BaseFeature::IsReadable
IMEXPORT VmbErrorType IsReadable(bool &isReadable)
Definition: BaseFeature.cpp:845
VimbaCPPCommon.h
AVT::VmbAPI::BaseFeature::FeatureInfo::pollingTime
VmbUint32_t pollingTime
Definition: BaseFeature.h:96
AVT::VmbAPI::BaseFeature::FeatureInfo::displayName
std::string displayName
Definition: BaseFeature.h:95
AVT::VmbAPI::BaseFeature::GetCategory
IMEXPORT VmbErrorType GetCategory(char *const pCategory, VmbUint32_t &length) const
Definition: BaseFeature.cpp:517
AVT::VmbAPI::BaseFeature::GetSFNCNamespace
IMEXPORT VmbErrorType GetSFNCNamespace(char *const pSFNCNamespace, VmbUint32_t &length) const
Definition: BaseFeature.cpp:646
BasicLockable.h
AVT::VmbAPI::BaseFeature::ResetFeatureContainer
void ResetFeatureContainer()
Definition: BaseFeature.cpp:112
AVT::VmbAPI::FeatureContainer
Definition: FeatureContainer.h:40
AVT::VmbAPI::BaseFeature::FeatureInfo::tooltip
std::string tooltip
Definition: BaseFeature.h:100
AVT::VmbAPI::BaseFeature::GetVisibility
IMEXPORT VmbErrorType GetVisibility(VmbFeatureVisibilityType &visibility) const
Definition: BaseFeature.cpp:593
VmbUchar_t
unsigned char VmbUchar_t
Definition: VmbCommonTypes.h:101
AVT::VmbAPI::BaseFeature::GetName
virtual IMEXPORT VmbErrorType GetName(char *const pName, VmbUint32_t &length) const
Definition: BaseFeature.cpp:457
AVT::VmbAPI::Feature
Definition: Feature.h:51
AVT::VmbAPI::BaseFeature::IsWritable
IMEXPORT VmbErrorType IsWritable(bool &isWritable)
Definition: BaseFeature.cpp:857
AVT::VmbAPI::BaseFeature::FeatureInfo::hasAffectedFeatures
bool hasAffectedFeatures
Definition: BaseFeature.h:92
AVT::VmbAPI::BaseFeature::FeatureInfo::visibility
VmbFeatureVisibility_t visibility
Definition: BaseFeature.h:99
AVT::VmbAPI::BaseFeature::GetDataType
IMEXPORT VmbErrorType GetDataType(VmbFeatureDataType &dataType) const
Definition: BaseFeature.cpp:503
VmbBool_t
char VmbBool_t
Definition: VmbCommonTypes.h:89
AVT::VmbAPI::BaseFeature::Impl
Definition: BaseFeature.cpp:40
AVT::VmbAPI::BaseFeature::~BaseFeature
virtual ~BaseFeature()
Definition: BaseFeature.cpp:103
VmbInt32_t
int VmbInt32_t
Definition: VmbCommonTypes.h:71
VmbFeatureInfo
Definition: VimbaC.h:207
AVT::VmbAPI::BaseFeature::GetRepresentation
IMEXPORT VmbErrorType GetRepresentation(char *const pRepresentation, VmbUint32_t &length) const
Definition: BaseFeature.cpp:570
AVT::VmbAPI::BaseFeature::FeatureInfo
Definition: BaseFeature.h:87


avt_vimba_camera
Author(s): Allied Vision Technologies, Miquel Massot
autogenerated on Sat Jun 3 2023 02:14:12