Pylon Logo Basler Logo
Public Member Functions | List of all members
Pylon::CBaslerUniversalGrabResultPtr Class Reference

The Universal grab result smart pointer. More...

#include <pylon/BaslerUniversalGrabResultPtr.h>

Inheritance diagram for Pylon::CBaslerUniversalGrabResultPtr:
Inheritance graph
[legend]

Public Member Functions

 CBaslerUniversalGrabResultPtr ()
 Creates a smart pointer. More...
 
 CBaslerUniversalGrabResultPtr (const CGrabResultPtr &rhs)
 Creates a copy of a smart pointer. More...
 
 CBaslerUniversalGrabResultPtr (const CBaslerUniversalGrabResultPtr &rhs)
 Creates a copy of a smart pointer. More...
 
virtual ~CBaslerUniversalGrabResultPtr ()
 Destroys the smart pointer. More...
 
CBaslerUniversalGrabResultDataoperator-> () 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...
 

Detailed Description

The Universal grab result smart pointer.

Constructor & Destructor Documentation

Pylon::CBaslerUniversalGrabResultPtr::CBaslerUniversalGrabResultPtr ( )
inline

Creates a smart pointer.

Postcondition
No grab result is referenced.
Pylon::CBaslerUniversalGrabResultPtr::CBaslerUniversalGrabResultPtr ( const CGrabResultPtr rhs)
inline

Creates a copy of a smart pointer.

Parameters
[in]rhsAnother smart pointer, source of the result data to reference.

The data itself is not copied.

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.
Pylon::CBaslerUniversalGrabResultPtr::CBaslerUniversalGrabResultPtr ( const CBaslerUniversalGrabResultPtr rhs)
inline

Creates a copy of a smart pointer.

Parameters
[in]rhsAnother smart pointer, source of the result data to reference.

The data itself is not copied.

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.
virtual Pylon::CBaslerUniversalGrabResultPtr::~CBaslerUniversalGrabResultPtr ( )
inlinevirtual

Destroys the smart pointer.

Postcondition
The currently referenced data is released.
Error Safety:
Does not throw C++ exceptions.

Member Function Documentation

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

Returns
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.

Check whether data is referenced.

Returns
True if data is referenced.
Error Safety:
Does not throw C++ exceptions.

Check whether data is referenced.

Returns
IsValid().

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

if ( grabResult)
{
grabResult->GetStatus();
}
Error Safety:
Does not throw C++ exceptions.

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

Attention
The returned reference is only valid as long the grab result ptr is not destroyed.
Error Safety:
Still valid after error.

Allows accessing the referenced data.

Returns
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.

The currently referenced data is released.

Postcondition
The currently referenced data is released.
Error Safety:
Still valid after error.

The documentation for this class was generated from the following file:

pylon 6.1.0
Copyright (c) 2006-2020 Basler AG (Mon Mar 16 2020 10:56:57)