FeatureContainer.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: FeatureContainer.h
10 
11  Description: Definition of class AVT::VmbAPI::FeatureContainer.
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_FEATURECONTAINER_H
29 #define AVT_VMBAPI_FEATURECONTAINER_H
30 
36 
37 namespace AVT {
38 namespace VmbAPI {
39 
40 class FeatureContainer : public virtual BasicLockable
41 {
42  public:
43 
44  //
45  // Method: FeatureContainer constructor
46  //
47  // Purpose: Creates an instance of class FeatureContainer
48  //
49  IMEXPORT FeatureContainer();
50 
51  //
52  // Method: FeatureContainer destructor
53  //
54  // Purpose: Destroys an instance of class FeatureContainer
55  //
56  IMEXPORT ~FeatureContainer();
57 
58  //
59  // Method: GetFeatureByName()
60  //
61  // Purpose: Gets one particular feature of a feature container (e.g. a camera)
62  //
63  // Parameters:
64  //
65  // [in ] const char* name The name of the feature to get
66  // [out] FeaturePtr& pFeature The queried feature
67  //
68  // Returns:
69  //
70  // - VmbErrorSuccess: If no error
71  // - VmbErrorDeviceNotOpen: Base feature class (e.g. Camera) was not opened.
72  // - VmbErrorBadParameter: "name" is NULL.
73  //
74  IMEXPORT VmbErrorType GetFeatureByName( const char *pName, FeaturePtr &pFeature );
75 
76  //
77  // Method: GetFeatures()
78  //
79  // Purpose: Gets all features of a feature container (e.g. a camera)
80  //
81  // Parameters:
82  //
83  // [out] FeaturePtrVector& features The container for all queried features
84  //
85  // Returns:
86  //
87  // - VmbErrorSuccess: If no error
88  // - VmbErrorBadParameter: "features" is empty.
89  //
90  // Details: Once queried, this information remains static throughout the object's lifetime
91  //
93 
94  VmbHandle_t GetHandle() const;
95 
96  protected:
97  // Sets the C handle of a feature container
98  void SetHandle( const VmbHandle_t handle );
99 
100  // Sets the C handle of a feature container to NULL
101  void RevokeHandle();
102 
103  // Sets the back reference to feature container that each feature holds to NULL
104  // and resets all known features
105  void Reset();
106 
107  private:
108  struct Impl;
109  Impl *m_pImpl;
110 
111  IMEXPORT VmbErrorType GetFeatures( FeaturePtr *pFeatures, VmbUint32_t &size );
112 
113  // No copy ctor
114  FeatureContainer( const FeatureContainer& );
115  // No assignment operator
116  FeatureContainer& operator=( const FeatureContainer& );
117 };
118 
120 
121 }} // namespace AVT::VmbAPI
122 
123 #endif
IMEXPORT VmbErrorType GetFeatureByName(const char *pName, FeaturePtr &pFeature)
VmbErrorType
void * VmbHandle_t
NetPointer< Feature, AVT::VmbAPINET::Feature > FeaturePtr
VmbErrorType GetFeatures(FeaturePtrVector &features)
unsigned int VmbUint32_t
FeatureContainer & operator=(const FeatureContainer &)
void SetHandle(const VmbHandle_t handle)
std::vector< FeaturePtr > FeaturePtrVector
Definition: Feature.h:46


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Wed Jun 5 2019 22:22:40