![]() |
![]() |
Implementation Detail: Header only implementation class for creating device specific grab result ptrs. More...
#include <pylon/private/DeviceSpecificGrabResultPtr.h>
Public Member Functions | |
CDeviceSpecificGrabResultPtr () | |
Creates a smart pointer. More... | |
CDeviceSpecificGrabResultPtr (const CGrabResultPtr &rhs) | |
Creates a copy of a smart pointer. More... | |
CDeviceSpecificGrabResultPtr< GrabResultDataT > & | operator= (const CGrabResultPtr &rhs) |
Assignment of a smart pointer. More... | |
CDeviceSpecificGrabResultPtr (const CDeviceSpecificGrabResultPtr< GrabResultDataT > &rhs) | |
Creates a copy of a smart pointer. More... | |
CDeviceSpecificGrabResultPtr< GrabResultDataT > & | operator= (const CDeviceSpecificGrabResultPtr< GrabResultDataT > &rhs) |
Assignment of a smart pointer. More... | |
virtual | ~CDeviceSpecificGrabResultPtr () |
Destroys the smart pointer. More... | |
GrabResultDataT * | operator-> () const |
Allows accessing the referenced data. More... | |
bool | IsValid () const |
Check whether data is referenced. More... | |
operator bool () const | |
Check whether data is referenced. More... | |
operator IImage & () const | |
Provides an IImage interface to the grab result. More... | |
bool | IsUnique () const |
Indicates that the held grab result data and buffer are only referenced by this grab result. More... | |
void | Release () |
The currently referenced data is released. More... | |
Implementation Detail: Header only implementation class for creating device specific grab result ptrs.
This class is used for distributing the grab result data of a camera. It controls the reuse and lifetime of the referenced buffer. When all smart pointers referencing a buffer go out of scope the referenced buffer is reused or destroyed. The data and the held buffer are still valid after the camera object it originated from has been destroyed.
The CGrabResultPtr class provides a cast operator that allows passing the grab result directly to functions or methods that take an const IImage& as parameter, e.g. image saving functions or image format converter methods.
Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::CDeviceSpecificGrabResultPtr | ( | ) |
Creates a smart pointer.
Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::CDeviceSpecificGrabResultPtr | ( | const CGrabResultPtr & | rhs | ) |
Creates a copy of a smart pointer.
[in] | rhs | Another smart pointer, source of the result data to reference. The data itself is not copied. |
Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::CDeviceSpecificGrabResultPtr | ( | const CDeviceSpecificGrabResultPtr< GrabResultDataT > & | rhs | ) |
Creates a copy of a smart pointer.
[in] | rhs | Another smart pointer, source of the result data to reference. |
The data itself is not copied.
|
virtual |
Destroys the smart pointer.
bool Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::IsUnique | ( | ) | const |
Indicates that the held grab result data and buffer are only referenced by this grab result.
bool Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::IsValid | ( | ) | const |
Check whether data is referenced.
Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::operator bool | ( | ) | const |
Check whether data is referenced.
The overloaded bool operator can be used to check whether data is referenced. Example:
Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::operator IImage & | ( | ) | const |
Provides an IImage interface to the grab result.
This cast operator allows passing the grab result to saving functions or image format converter. The returned image is invalid if the grab was not successful. See CGrabResultData::GrabSucceeded().
GrabResultDataT * Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::operator-> | ( | ) | const |
Allows accessing the referenced data.
CDeviceSpecificGrabResultPtr< GrabResultDataT > & Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::operator= | ( | const CGrabResultPtr & | rhs | ) |
Assignment of a smart pointer.
[in] | rhs | Another smart pointer, source of the result data to reference. |
The data itself is not copied.
CDeviceSpecificGrabResultPtr< GrabResultDataT > & Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::operator= | ( | const CDeviceSpecificGrabResultPtr< GrabResultDataT > & | rhs | ) |
Assignment of a smart pointer.
[in] | rhs | Another smart pointer, source of the result data to reference. |
The data itself is not copied.
void Pylon::CDeviceSpecificGrabResultPtr< GrabResultDataT >::Release | ( | ) |
The currently referenced data is released.