Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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 }}