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: EnumFeature.h 00010 00011 Description: Definition of class AVT::VmbAPI::EnumFeature. 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 #ifndef AVT_VMBAPI_ENUMFEATURE_H 00030 #define AVT_VMBAPI_ENUMFEATURE_H 00031 00032 #include <VimbaC/Include/VimbaC.h> 00033 #include <VimbaCPP/Include/VimbaCPPCommon.h> 00034 #include <VimbaCPP/Source/BaseFeature.h> 00035 #include <VimbaCPP/Include/FeatureContainer.h> 00036 00037 namespace AVT { 00038 namespace VmbAPI { 00039 00040 class EnumFeature : public BaseFeature 00041 { 00042 public: 00043 EnumFeature( const VmbFeatureInfo_t *featureInfo, FeatureContainer* const pFeatureContainer ); 00044 00045 IMEXPORT virtual VmbErrorType SetValue( const char *pValue ); 00046 00047 IMEXPORT virtual VmbErrorType GetEntry( EnumEntry &entry, const char *pEntryName ) const; 00048 00049 IMEXPORT virtual VmbErrorType GetValue( VmbInt64_t &value ) const; 00050 IMEXPORT virtual VmbErrorType SetValue( const VmbInt64_t &value ); 00051 00052 IMEXPORT virtual VmbErrorType IsValueAvailable( const char *pStrValue, bool &available ) const; 00053 IMEXPORT virtual VmbErrorType IsValueAvailable( const VmbInt64_t value, bool &available ) const; 00054 00055 private: 00056 // Copy of enum elements 00057 StringVector m_EnumStringValues; 00058 Int64Vector m_EnumIntValues; 00059 EnumEntryVector m_EnumEntries; 00060 00061 // Array functions to pass data across DLL boundaries 00062 IMEXPORT virtual VmbErrorType GetValue( char * const pValue, VmbUint32_t &size ) const; 00063 IMEXPORT virtual VmbErrorType GetValues( const char **pValues, VmbUint32_t &size ); 00064 IMEXPORT virtual VmbErrorType GetValues( VmbInt64_t *pValue, VmbUint32_t &size ); 00065 IMEXPORT virtual VmbErrorType GetEntries( EnumEntry *pEntries, VmbUint32_t &size ); 00066 }; 00067 00068 }} // namespace AVT::VmbAPI 00069 00070 #endif