StringFeature.cpp
Go to the documentation of this file.
00001 /*=============================================================================
00002   Copyright (C) 2012 Allied Vision Technologies.  All Rights Reserved.
00003 
00004   Redistribution of this file, in original or modified form, without
00005   prior written consent of Allied Vision Technologies is prohibited.
00006 
00007 -------------------------------------------------------------------------------
00008 
00009   File:        StringFeature.cpp
00010 
00011   Description: Implementation of class AVT::VmbAPI::StringFeature.
00012                (For internal use only)
00013 
00014 -------------------------------------------------------------------------------
00015 
00016   THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
00017   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
00018   NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR  PURPOSE ARE
00019   DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 
00020   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
00021   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00022   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  
00023   AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
00024   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00025   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026 
00027 =============================================================================*/
00028 
00029 #include <VimbaCPP/Source/StringFeature.h>
00030 
00031 namespace AVT {
00032 namespace VmbAPI {
00033 
00034 StringFeature::StringFeature( const VmbFeatureInfo_t *featureInfo, FeatureContainer* const pFeatureContainer )
00035     :   BaseFeature( featureInfo, pFeatureContainer )
00036 {
00037 }
00038 
00039 VmbErrorType StringFeature::GetValue( char * const pStrValue, VmbUint32_t &rnLength ) const
00040 {
00041     if ( NULL == m_pFeatureContainer )
00042     {
00043         return VmbErrorDeviceNotOpen;
00044     }
00045 
00046     if ( NULL == pStrValue )
00047     {
00048         return (VmbErrorType)VmbFeatureStringMaxlengthQuery( m_pFeatureContainer->GetHandle(), m_featureInfo.name.c_str(), &rnLength );
00049     }
00050     else
00051     {
00052         return (VmbErrorType)VmbFeatureStringGet( m_pFeatureContainer->GetHandle(), m_featureInfo.name.c_str(), pStrValue, rnLength, &rnLength );
00053     }
00054 }
00055 
00056 VmbErrorType StringFeature::SetValue( const char *pStrValue ) 
00057 {
00058     if ( NULL == m_pFeatureContainer )
00059     {
00060         return VmbErrorDeviceNotOpen;
00061     }
00062 
00063     return (VmbErrorType)VmbFeatureStringSet( m_pFeatureContainer->GetHandle(), m_featureInfo.name.c_str(), pStrValue );
00064 }
00065 
00066 
00067 }} // namespace AVT::VmbAPI


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Thu Jun 6 2019 18:23:39