Skip to content

Pylon::CBaslerUniversalGrabResultPtr#

Module: Instant Camera / Universal Instant Camera for All Basler Devices

The Universal grab result smart pointer.

#include <pylon/BaslerUniversalGrabResultPtr.h>

Inherits from Pylon::CDeviceSpecificGrabResultPtr< CBaslerUniversalGrabResultData >

Public Functions#

Name
CBaslerUniversalGrabResultPtr()
Creates a smart pointer.
CBaslerUniversalGrabResultPtr(const CGrabResultPtr & rhs)
Creates a copy of a smart pointer.
CBaslerUniversalGrabResultPtr(const CBaslerUniversalGrabResultPtr & rhs)
Creates a copy of a smart pointer.
virtual ~CBaslerUniversalGrabResultPtr()
Destroys the smart pointer.
CBaslerUniversalGrabResultData * operator->() const
Allows accessing the referenced data.
bool IsValid() const
Check whether data is referenced.
operator bool() const
Check whether data is referenced.
operator IImage &() const
Provides an IImage interface to the grab result.
bool IsUnique() const
Indicates that the held grab result data and buffer are only referenced by this grab result.
void Release()
The currently referenced data is released.

Additional inherited members#

Public Functions inherited from Pylon::CDeviceSpecificGrabResultPtr< CBaslerUniversalGrabResultData >

Name
CDeviceSpecificGrabResultPtr()
Creates a smart pointer.
CDeviceSpecificGrabResultPtr(const CGrabResultPtr & rhs)
Creates a copy of a smart pointer.
CDeviceSpecificGrabResultPtr< GrabResultDataT > & operator=(const CGrabResultPtr & rhs)
Assignment of a smart pointer.
CDeviceSpecificGrabResultPtr(const CDeviceSpecificGrabResultPtr< GrabResultDataT > & rhs)
Creates a copy of a smart pointer.
CDeviceSpecificGrabResultPtr< GrabResultDataT > & operator=(const CDeviceSpecificGrabResultPtr< GrabResultDataT > & rhs)
Assignment of a smart pointer.
virtual ~CDeviceSpecificGrabResultPtr()
Destroys the smart pointer.

Public Functions Documentation#

function CBaslerUniversalGrabResultPtr#

inline CBaslerUniversalGrabResultPtr()

Creates a smart pointer.

Postcondition: No grab result is referenced.

function CBaslerUniversalGrabResultPtr#

inline CBaslerUniversalGrabResultPtr(
    const CGrabResultPtr & rhs
)

Creates a copy of a smart pointer.

Parameters:

  • rhs Another smart pointer, source of the result data to reference.

Postcondition:

  • Another reference to the grab result of the source is held if it references a grab result.
  • No grab result is referenced if the source does not reference a grab result.

Error Safety:

Still valid after error.

The data itself is not copied.

function CBaslerUniversalGrabResultPtr#

inline CBaslerUniversalGrabResultPtr(
    const CBaslerUniversalGrabResultPtr & rhs
)

Creates a copy of a smart pointer.

Parameters:

  • rhs Another smart pointer, source of the result data to reference.

Postcondition:

  • Another reference to the grab result of the source is held if it references a grab result.
  • No grab result is referenced if the source does not reference a grab result.

Error Safety:

Still valid after error.

The data itself is not copied.

function ~CBaslerUniversalGrabResultPtr#

inline virtual ~CBaslerUniversalGrabResultPtr()

Destroys the smart pointer.

Postcondition: The currently referenced data is released.

Error Safety:

Does not throw C++ exceptions.

function operator->#

CBaslerUniversalGrabResultData * operator->() const

Allows accessing the referenced data.

Return: The pointer to the grab result data.

Precondition: The pointer must reference a grab result. IsValid() or the overloaded bool operator can be used to check whether data is referenced.

Error Safety:

Still valid after error. Throws an exception when no data is referenced.

function IsValid#

bool IsValid() const

Check whether data is referenced.

Return: True if data is referenced.

Error Safety:

Does not throw C++ exceptions.

function operator bool#

operator bool() const

Check whether data is referenced.

Return: IsValid().

Error Safety:

Does not throw C++ exceptions.

The overloaded bool operator can be used to check whether data is referenced. Example:

if ( grabResult)
{
    grabResult->GetStatus();
}

function operator IImage &#

operator IImage &() const

Provides an IImage interface to the grab result.

Attention: The returned reference is only valid as long the grab result ptr is not destroyed.

Error Safety:

Still valid after error.

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().

function IsUnique#

bool IsUnique() const

Indicates that the held grab result data and buffer are only referenced by this grab result.

Return: Returns true if the held grab result data and buffer are only referenced by this grab result. Returns false if the grab result is invalid.

Error Safety:

Does not throw C++ exceptions.

function Release#

void Release()

The currently referenced data is released.

Postcondition: The currently referenced data is released.

Error Safety:

Still valid after error.