Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
platf::kms::plane_it_t Class Reference

Iterator over DRM planes and their associated properties. More...

Inheritance diagram for platf::kms::plane_it_t:
Collaboration diagram for platf::kms::plane_it_t:

Public Member Functions

bool eq (const plane_it_t &other) const
 Compare two iterators for equality.
plane_t::pointer get ()
 Return the currently wrapped value or handle.
void inc ()
 Advance the iterator to the next element.
void load_next_valid_plane ()
 Load next valid plane.
 plane_it_t (int fd, std::uint32_t *end)
 Create the end iterator for a DRM plane range.
 plane_it_t (int fd, std::uint32_t *plane_p, std::uint32_t *end)
 Create an iterator over DRM planes starting at a specific plane ID.
Public Member Functions inherited from round_robin_util::it_wrap_t< plane_t::element_type, plane_it_t >
bool operator!= (const iterator &other) const
 Compare whether two wrapped iterator positions differ.
reference operator* ()
 Dereference the current element in the cycled range.
iterator operator+ (diff_t step)
 Return a copy advanced by a wrapped offset.
iterator operator++ ()
 Advance to the next element, wrapping back to the beginning when needed.
iterator operator+= (diff_t step)
 Advance this iterator by repeatedly wrapping at the end of the range.
iterator operator- (diff_t step)
 Return a copy moved backward by a wrapped offset.
iterator operator-- ()
 Move to the previous element, wrapping to the end when needed.
iterator operator-= (diff_t step)
 Move this iterator backward by repeatedly wrapping at the beginning of the range.
pointer operator-> ()
 Access the current element in the cycled range.
bool operator< (const iterator &other) const
 Compare whether this wrapped position sorts before another one.
bool operator<= (const iterator &other) const
 Compare whether this wrapped position sorts at or before another one.
bool operator== (const iterator &other) const
 Compare whether two wrapped iterator positions are equal.
bool operator> (const iterator &other) const
 Compare whether this wrapped position sorts after another one.
bool operator>= (const iterator &other) const
 Compare whether this wrapped position sorts at or after another one.

Public Attributes

std::uint32_t * end
 One-past-the-end plane ID pointer.
int fd
 DRM card file descriptor.
util::shared_t< plane_t > plane
 Plane.
std::uint32_t * plane_p
 Current plane ID pointer.

Additional Inherited Members

Public Types inherited from round_robin_util::it_wrap_t< plane_t::element_type, plane_it_t >
using const_pointer
 Const pointer to a value in the cycled range.
using const_reference
 Const reference to a value in the cycled range.
using diff_t
 Signed offset type used when moving through the range.
using difference_type
 Difference type used for iterator movement.
using iterator
 Concrete iterator type supplied by the CRTP child.
using iterator_category
 Iterator category advertised to standard algorithms.
using pointer
 Mutable pointer to a value in the cycled range.
using reference
 Mutable reference to a value in the cycled range.
using value_type
 Value type exposed by the wrapped iterator.

Detailed Description

Iterator over DRM planes and their associated properties.

Constructor & Destructor Documentation

◆ plane_it_t() [1/2]

platf::kms::plane_it_t::plane_it_t ( int fd,
std::uint32_t * plane_p,
std::uint32_t * end )
inline

Create an iterator over DRM planes starting at a specific plane ID.

Parameters
fdDRM card file descriptor.
plane_pCurrent plane ID pointer.
endOne-past-the-end plane ID pointer.

◆ plane_it_t() [2/2]

platf::kms::plane_it_t::plane_it_t ( int fd,
std::uint32_t * end )
inline

Create the end iterator for a DRM plane range.

Parameters
fdDRM card file descriptor.
endOne-past-the-end plane ID pointer.

Member Function Documentation

◆ eq()

bool platf::kms::plane_it_t::eq ( const plane_it_t & other) const
inline

Compare two iterators for equality.

Parameters
otherPlane iterator to compare against.
Returns
True when both iterators reference the same plane position.

◆ get()

plane_t::pointer platf::kms::plane_it_t::get ( )
inline

Return the currently wrapped value or handle.

Returns
Underlying native handle or object pointer.

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