CVB++ 15.0
PlaneEnumerator Class Referencefinal

Lazy enumeration of planes.
More...

#include <cvb/plane_enumerator.hpp>

Public Member Functions

 PlaneEnumerator () noexcept
 Plane enumerator constructor. More...
 
 PlaneEnumerator (HandleGuard< PlaneEnumerator > &&guard, PrivateTag) noexcept
 Plane enumerator constructor. More...
 
void * Handle () const noexcept
 Classic API device handle. More...
 
int PlaneCount () const noexcept
 Gets the number of planes enumerated by this object. More...
 
std::vector< PlanePtrPlanes () const
 Gets all available planes enumerated by this object. More...
 
PlanePtr operator[] (int index) const
 Index based plane access. More...
 
PlanePtr Plane (int index) const
 Index based plane access. More...
 

Static Public Member Functions

template<class T >
static PlaneEnumerator FromObject (const T &object)
 Create a plane enumerator for a given object. More...
 
static PlaneEnumeratorPtr FromHandle (HandleGuard< PlaneEnumerator > &&guard)
 Creates a plane enumerator from a classic API handle. More...
 

Detailed Description

Lazy enumeration of planes.

Enumerates planes (lazy) that belong to a arbitrary object respectively it's handle on demand.

Attention
Access to this class is not thread safe.

Constructor & Destructor Documentation

◆ PlaneEnumerator() [1/2]

PlaneEnumerator ( )
inlinenoexcept

Plane enumerator constructor.

This is not an invalid object, there are just no planes to enumerate.

◆ PlaneEnumerator() [2/2]

PlaneEnumerator ( HandleGuard< PlaneEnumerator > &&  guard,
PrivateTag   
)
inlinenoexcept

Plane enumerator constructor.

Exceptions
Doesnot throw any exception.

Member Function Documentation

◆ FromHandle()

static PlaneEnumeratorPtr FromHandle ( HandleGuard< PlaneEnumerator > &&  guard)
inlinestatic

Creates a plane enumerator from a classic API handle.

Parameters
[in]guardLife time guard for C-API handle.

◆ FromObject()

static PlaneEnumerator FromObject ( const T &  object)
static

Create a plane enumerator for a given object.

Parameters
[in]objectThat has a handle.
Exceptions
Anyexception derived from std::exception including CvbException.
Attention
The plane enumerator shares the lifetime of the given object. In order to free resources held by the object the enumerator must also be destroyed. This method will only throw if sharing fails.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Classic API device handle.

Returns
Classic API handle.
Exceptions
Doesnot throw any exception.

It is normally not necessary to work with this handle.

◆ operator[]()

PlanePtr operator[] ( int  index) const
inline

Index based plane access.

Parameters
[in]indexIndex of the plane.
Returns
A pointer to the plane.
Exceptions
Anyexception derived from std::exception including CvbException.

If the plane does not exist the access will throw.

◆ Plane()

PlanePtr Plane ( int  index) const
inline

Index based plane access.

Parameters
[in]indexIndex of the plane.
Returns
A pointer to the plane.
Exceptions
Anyexception derived from std::exception including CvbException.

If the plane does not exist the access will throw.

◆ PlaneCount()

int PlaneCount ( ) const
inlinenoexcept

Gets the number of planes enumerated by this object.

Returns
Number of planes.
Exceptions
Doesnot throw any exception.

◆ Planes()

std::vector< PlanePtr > Planes ( ) const
inline

Gets all available planes enumerated by this object.

Returns
Vector of planes.
Exceptions
Anyexception derived from std::exception including CvbException.