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
IMEXPORT VmbErrorType GetSelectedFeatures(FeaturePtr *pSelectedFeatures, VmbUint32_t &nSize)
char VmbBool_t
IMEXPORT VmbErrorType GetCategory(char *const pCategory, VmbUint32_t &length) const
IMEXPORT VmbErrorType GetVisibility(VmbFeatureVisibilityType &visibility) const
IMEXPORT VmbErrorType GetDescription(char *const pDescription, VmbUint32_t &length) const
VmbFeatureVisibilityType
Definition: VimbaC.h:180
IMEXPORT VmbErrorType IsWritable(bool &isWritable)
long long VmbInt64_t
VmbUint32_t VmbFeatureFlags_t
Definition: VimbaC.h:201
IMEXPORT VmbErrorType GetDataType(VmbFeatureDataType &dataType) const
IMEXPORT VmbErrorType GetToolTip(char *const pToolTip, VmbUint32_t &length) const
IMEXPORT VmbErrorType GetSFNCNamespace(char *const pSFNCNamespace, VmbUint32_t &length) const
int VmbInt32_t
VmbFeatureDataType
Definition: VimbaC.h:163
VmbFeatureVisibility_t visibility
Definition: BaseFeature.h:99
virtual IMEXPORT VmbErrorType GetValue(VmbInt64_t &value) const
virtual IMEXPORT VmbErrorType IsCommandDone(bool &isDone) const
virtual IMEXPORT VmbErrorType IsValueAvailable(const char *pValue, bool &available) const
virtual IMEXPORT VmbErrorType GetRange(VmbInt64_t &minimum, VmbInt64_t &maximum) const
virtual IMEXPORT VmbErrorType RunCommand()
VmbErrorType
virtual IMEXPORT VmbErrorType GetEntries(EnumEntry *pEntries, VmbUint32_t &size)
virtual IMEXPORT VmbErrorType SetValue(const VmbInt32_t &value)
IMEXPORT VmbErrorType GetPollingTime(VmbUint32_t &pollingTime) const
unsigned char VmbUchar_t
IMEXPORT VmbErrorType IsStreamable(bool &isStreamable) const
virtual IMEXPORT VmbErrorType HasIncrement(VmbBool_t &incrementSupported) const
IMEXPORT VmbErrorType GetDisplayName(char *const pDisplayName, VmbUint32_t &length) const
VmbUint32_t VmbFeatureData_t
Definition: VimbaC.h:175
IMEXPORT VmbErrorType GetFlags(VmbFeatureFlagsType &flags) const
virtual IMEXPORT VmbErrorType GetName(char *const pName, VmbUint32_t &length) const
virtual IMEXPORT VmbErrorType GetEntry(EnumEntry &entry, const char *pStrEntryName) const
IMEXPORT VmbErrorType GetRepresentation(char *const pRepresentation, VmbUint32_t &length) const
IMEXPORT VmbErrorType RegisterObserver(const IFeatureObserverPtr &observer)
unsigned int VmbUint32_t
virtual IMEXPORT VmbErrorType GetIncrement(VmbInt64_t &increment) const
VmbFeatureFlagsType
Definition: VimbaC.h:193
IMEXPORT VmbErrorType GetAffectedFeatures(FeaturePtr *pAffectedFeatures, VmbUint32_t &nSize)
IMEXPORT VmbErrorType UnregisterObserver(const IFeatureObserverPtr &observer)
virtual IMEXPORT VmbErrorType GetValues(const char **pValues, VmbUint32_t &size)
IMEXPORT VmbErrorType GetUnit(char *const pUnit, VmbUint32_t &length) const
FeatureContainer * m_pFeatureContainer
Definition: BaseFeature.h:108
IMEXPORT VmbErrorType IsReadable(bool &isReadable)
VmbUint32_t VmbFeatureVisibility_t
Definition: VimbaC.h:188


avt_vimba_camera
Author(s): Allied Vision Technologies, Miquel Massot
autogenerated on Fri Jun 2 2023 02:21:10