UserSharedPointerDefines.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #ifndef AVT_VMBAPI_USERSHAREDPOINTER_H
  2. #define AVT_VMBAPI_USERSHAREDPOINTER_H
  3. #include "..\..\..\..\VimbaNET\Include\NetPointer.h"
  4. namespace AVT {
  5. namespace VmbAPINET {
  6. ref class Camera;
  7. ref class Interface;
  8. ref class Frame;
  9. ref class Feature;
  10. ref class AncillaryData;
  11. };
  12. };
  13. namespace AVT {
  14. namespace VmbAPI {
  15. // Set the calls for your implementation of the shared pointer functions
  16. // a) Declaration
  17. // b) Reset with argument
  18. // c) Reset without argument
  19. // d) == operator
  20. // e) NULL test
  21. // f) Access to underlying raw pointer
  22. // a) This is the define for a declaration.
  23. #define SP_DECL( T ) NetPointer<T>
  24. // b) This is the define for setting an existing shared pointer.
  25. #define SP_SET( sp, rawPtr ) sp.Reset( rawPtr )
  26. // c) This is the define for resetting without an argument to decrease the ref count.
  27. #define SP_RESET( sp ) sp.Reset()
  28. // d) This is the define for the equal operator. Shared pointers are usually considered equal when the raw pointers point to the same address.
  29. #define SP_ISEQUAL( sp1, sp2 ) sp1.IsEqualTo(sp2)
  30. // e) This is the define for the NULL check.
  31. #define SP_ISNULL( sp ) sp.IsNull()
  32. // f) This is the define for the raw pointer access. This is usually accomplished through the dereferencing operator (->).
  33. #define SP_ACCESS( sp ) sp.AccessNative()
  34. class Camera;
  35. typedef NetPointer<Camera, AVT::VmbAPINET::Camera> CameraPtr;
  36. class Interface;
  37. typedef NetPointer<Interface, AVT::VmbAPINET::Interface> InterfacePtr;
  38. class Feature;
  39. typedef NetPointer<Feature, AVT::VmbAPINET::Feature> FeaturePtr;
  40. class FeatureContainer;
  41. typedef SP_DECL( FeatureContainer ) FeatureContainerPtr;
  42. class IFeatureObserver;
  43. typedef SP_DECL( IFeatureObserver ) IFeatureObserverPtr;
  44. class Frame;
  45. typedef NetPointer<Frame, AVT::VmbAPINET::Frame> FramePtr;
  46. class FrameHandler;
  47. typedef SP_DECL( FrameHandler ) FrameHandlerPtr;
  48. class IFrameObserver;
  49. typedef SP_DECL( IFrameObserver ) IFrameObserverPtr;
  50. class AncillaryData;
  51. typedef NetPointer<AncillaryData, AVT::VmbAPINET::AncillaryData> AncillaryDataPtr;
  52. typedef NetPointer<AncillaryData, AVT::VmbAPINET::AncillaryData> ConstAncillaryDataPtr;
  53. class ICameraFactory;
  54. typedef SP_DECL( ICameraFactory) ICameraFactoryPtr;
  55. class IInterfaceListObserver;
  56. typedef SP_DECL( IInterfaceListObserver ) IInterfaceListObserverPtr;
  57. class ICameraListObserver;
  58. typedef SP_DECL( ICameraListObserver ) ICameraListObserverPtr;
  59. class Mutex;
  60. typedef SP_DECL( Mutex ) MutexPtr;
  61. class BasicLockable;
  62. typedef SP_DECL( BasicLockable ) BasicLockablePtr;
  63. }}
  64. #include "..\..\..\..\VimbaNET\Include\NetCamera.h"
  65. #include "..\..\..\..\VimbaNET\Include\NetInterface.h"
  66. #include "..\..\..\..\VimbaNET\Include\NetFrame.h"
  67. #include "..\..\..\..\VimbaNET\Include\NetFeature.h"
  68. #include "..\..\..\..\VimbaNET\Include\NetAncillaryData.h"
  69. #endif /* AVT_VMBAPI_USERSHAREDPOINTER_H */