SharedPointerDefines.h
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: SharedPointerDefines.h
10 
11  Description: Definition of macros for using the standard shared pointer
12  (std::tr1) for Vimba CPP API.
13  (This include file is for internal use only.)
14 
15 -------------------------------------------------------------------------------
16 
17  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
18  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
19  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
21  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
25  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 =============================================================================*/
29 
30 #ifndef AVT_VMBAPI_SHAREDPOINTERDEFINES_H
31 #define AVT_VMBAPI_SHAREDPOINTERDEFINES_H
32 
33 //
34 // If your version of STL does not provide a shared pointer implementation please see UserSharedPointerDefines.h for information on
35 // how to use another shared pointer than std::shared_ptr.
36 //
37 
38 #ifndef USER_SHARED_POINTER
39 
41 
42  namespace AVT {
43  namespace VmbAPI {
44 
45  #define SP_DECL( T ) AVT::VmbAPI::shared_ptr<T>
46  #define SP_SET( sp, rawPtr ) (sp).reset( (rawPtr) )
47  #define SP_RESET( sp ) (sp).reset()
48  #define SP_ISEQUAL( sp1, sp2 ) ( (sp1) == (sp2) )
49  #define SP_ISNULL( sp ) ( NULL == (sp) )
50  #define SP_ACCESS( sp ) (sp).get()
51  #define SP_DYN_CAST( sp, T ) AVT::VmbAPI::dynamic_pointer_cast<T>(sp)
52 
53  // These are all uses of a SP_DECL shared_ptr declaration
54  class Interface;
55  typedef SP_DECL( Interface ) InterfacePtr;
56 
57  class Camera;
58  typedef SP_DECL( Camera ) CameraPtr;
59 
60  class Feature;
61  typedef SP_DECL( Feature ) FeaturePtr;
62 
63  class FeatureContainer;
64  typedef SP_DECL( FeatureContainer ) FeatureContainerPtr;
65 
66  class IFeatureObserver;
67  typedef SP_DECL( IFeatureObserver ) IFeatureObserverPtr;
68 
69  class Frame;
70  typedef SP_DECL( Frame ) FramePtr;
71 
72  class FrameHandler;
73  typedef SP_DECL( FrameHandler ) FrameHandlerPtr;
74 
75  class IFrameObserver;
76  typedef SP_DECL( IFrameObserver ) IFrameObserverPtr;
77 
78  class AncillaryData;
79  typedef SP_DECL( AncillaryData ) AncillaryDataPtr;
80  typedef SP_DECL( const AncillaryData ) ConstAncillaryDataPtr;
81 
82  class ICameraFactory;
83  typedef SP_DECL( ICameraFactory ) ICameraFactoryPtr;
84 
85  class ICameraListObserver;
86  typedef SP_DECL( ICameraListObserver ) ICameraListObserverPtr;
87 
88  class IInterfaceListObserver;
89  typedef SP_DECL( IInterfaceListObserver ) IInterfaceListObserverPtr;
90 
91  class Mutex;
92  typedef SP_DECL( Mutex ) MutexPtr;
93 
94  class BasicLockable;
95  typedef SP_DECL( BasicLockable ) BasicLockablePtr;
96 
97  }}
98 
99 #else
101 #endif
102 
103 
104 #endif // AVT_VMBAPI_SHAREDPOINTERDEFINES_H
NetPointer< Frame, AVT::VmbAPINET::Frame > FramePtr
typedef SP_DECL(Interface) InterfacePtr
NetPointer< AncillaryData, AVT::VmbAPINET::AncillaryData > AncillaryDataPtr
NetPointer< Feature, AVT::VmbAPINET::Feature > FeaturePtr
NetPointer< Camera, AVT::VmbAPINET::Camera > CameraPtr
NetPointer< Interface, AVT::VmbAPINET::Interface > InterfacePtr
NetPointer< AncillaryData, AVT::VmbAPINET::AncillaryData > ConstAncillaryDataPtr


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