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: FeatureContainer.h 00010 00011 Description: Definition of class AVT::VmbAPI::FeatureContainer. 00012 00013 ------------------------------------------------------------------------------- 00014 00015 THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 00016 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, 00017 NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00018 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 00019 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00020 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00021 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00022 AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00024 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00025 00026 =============================================================================*/ 00027 00028 #ifndef AVT_VMBAPI_FEATURECONTAINER_H 00029 #define AVT_VMBAPI_FEATURECONTAINER_H 00030 00031 #include <VimbaC/Include/VmbCommonTypes.h> 00032 #include <VimbaCPP/Include/VimbaCPPCommon.h> 00033 #include <VimbaCPP/Include/BasicLockable.h> 00034 #include <VimbaCPP/Include/SharedPointerDefines.h> 00035 #include <VimbaCPP/Include/Feature.h> 00036 00037 namespace AVT { 00038 namespace VmbAPI { 00039 00040 class FeatureContainer : public virtual BasicLockable 00041 { 00042 public: 00043 00044 // 00045 // Method: FeatureContainer constructor 00046 // 00047 // Purpose: Creates an instance of class FeatureContainer 00048 // 00049 IMEXPORT FeatureContainer(); 00050 00051 // 00052 // Method: FeatureContainer destructor 00053 // 00054 // Purpose: Destroys an instance of class FeatureContainer 00055 // 00056 IMEXPORT ~FeatureContainer(); 00057 00058 // 00059 // Method: GetFeatureByName() 00060 // 00061 // Purpose: Gets one particular feature of a feature container (e.g. a camera) 00062 // 00063 // Parameters: 00064 // 00065 // [in ] const char *name The name of the feature to get 00066 // [out] FeaturePtr &pFeature The queried feature 00067 // 00068 IMEXPORT VmbErrorType GetFeatureByName( const char *pName, FeaturePtr &pFeature ); 00069 00070 // 00071 // Method: GetFeatures() 00072 // 00073 // Purpose: Gets all features of a feature container (e.g. a camera) 00074 // 00075 // Parameters: 00076 // 00077 // [out] FeaturePtrVector &features The container for all queried features 00078 // 00079 // Details: Once queried this information remains static throughout the object's lifetime 00080 // 00081 VmbErrorType GetFeatures( FeaturePtrVector &features ); 00082 00083 VmbHandle_t GetHandle() const; 00084 00085 protected: 00086 // Sets the C handle of a feature container 00087 void SetHandle( const VmbHandle_t handle ); 00088 00089 // Sets the C handle of a feature container to NULL 00090 void RevokeHandle(); 00091 00092 // Sets the back reference to feature container that each feature holds to NULL 00093 // and resets all known features 00094 void Reset(); 00095 00096 private: 00097 struct Impl; 00098 Impl *m_pImpl; 00099 00100 IMEXPORT VmbErrorType GetFeatures( FeaturePtr *pFeatures, VmbUint32_t &size ); 00101 00102 // No copy ctor 00103 FeatureContainer( const FeatureContainer& ); 00104 // No assignment operator 00105 FeatureContainer& operator=( const FeatureContainer& ); 00106 }; 00107 00108 #include <VimbaCPP/Include/FeatureContainer.hpp> 00109 00110 }} // namespace AVT::VmbAPI 00111 00112 #endif