StringFeature.cpp
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: StringFeature.cpp
10 
11  Description: Implementation of class AVT::VmbAPI::StringFeature.
12  (For internal use only)
13 
14 -------------------------------------------------------------------------------
15 
16  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
17  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
18  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
20  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 
27 =============================================================================*/
28 
30 
31 namespace AVT {
32 namespace VmbAPI {
33 
34 StringFeature::StringFeature( const VmbFeatureInfo_t *featureInfo, FeatureContainer* const pFeatureContainer )
35  : BaseFeature( featureInfo, pFeatureContainer )
36 {
37 }
38 
39 VmbErrorType StringFeature::GetValue( char * const pStrValue, VmbUint32_t &rnLength ) const
40 {
41  if ( NULL == m_pFeatureContainer )
42  {
43  return VmbErrorDeviceNotOpen;
44  }
45 
46  if ( NULL == pStrValue )
47  {
49  }
50  else
51  {
52  return (VmbErrorType)VmbFeatureStringGet( m_pFeatureContainer->GetHandle(), m_featureInfo.name.c_str(), pStrValue, rnLength, &rnLength );
53  }
54 }
55 
56 VmbErrorType StringFeature::SetValue( const char *pStrValue )
57 {
58  if ( NULL == m_pFeatureContainer )
59  {
60  return VmbErrorDeviceNotOpen;
61  }
62 
64 }
65 
66 
67 }} // namespace AVT::VmbAPI
StringFeature(const VmbFeatureInfo_t *featureInfo, FeatureContainer *const pFeatureContainer)
virtual IMEXPORT VmbErrorType SetValue(const char *pValue)
IMEXPORTC VmbError_t VMB_CALL VmbFeatureStringMaxlengthQuery(const VmbHandle_t handle, const char *name, VmbUint32_t *pMaxLength)
IMEXPORTC VmbError_t VMB_CALL VmbFeatureStringGet(const VmbHandle_t handle, const char *name, char *buffer, VmbUint32_t bufferSize, VmbUint32_t *pSizeFilled)
IMEXPORTC VmbError_t VMB_CALL VmbFeatureStringSet(const VmbHandle_t handle, const char *name, const char *value)
VmbErrorType
virtual IMEXPORT VmbErrorType GetValue(char *const pValue, VmbUint32_t &length) const
unsigned int VmbUint32_t
FeatureContainer * m_pFeatureContainer
Definition: BaseFeature.h:108


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Mon Jun 10 2019 12:50:39