libgpiod  1.6.2
Public Member Functions | Friends
gpiod::chip_iter Class Reference

Allows to iterate over all GPIO chips present on the system. More...

#include <gpiod.hpp>

Public Member Functions

GPIOD_API chip_iter (void)=default
 Default constructor. More...
 
GPIOD_API chip_iter (const chip_iter &other)=default
 Copy constructor. More...
 
GPIOD_API chip_iter (chip_iter &&other)=default
 Move constructor. More...
 
GPIOD_API chip_iteroperator= (const chip_iter &other)=default
 Assignment operator. More...
 
GPIOD_API chip_iteroperator= (chip_iter &&other)=default
 Move assignment operator. More...
 
GPIOD_API ~chip_iter (void)=default
 Destructor.
 
GPIOD_API chip_iteroperator++ (void)
 Advance the iterator by one element. More...
 
GPIOD_API const chipoperator* (void) const
 Dereference current element. More...
 
GPIOD_API const chipoperator-> (void) const
 Member access operator. More...
 
GPIOD_API bool operator== (const chip_iter &rhs) const noexcept
 Check if this operator points to the same element. More...
 
GPIOD_API bool operator!= (const chip_iter &rhs) const noexcept
 Check if this operator doesn't point to the same element. More...
 

Friends

chip_iter make_chip_iter (void)
 Create a new chip_iter. More...
 

Detailed Description

Allows to iterate over all GPIO chips present on the system.

Definition at line 873 of file gpiod.hpp.

Constructor & Destructor Documentation

◆ chip_iter() [1/3]

GPIOD_API gpiod::chip_iter::chip_iter ( void  )
default

Default constructor.

Creates the end iterator.

◆ chip_iter() [2/3]

GPIOD_API gpiod::chip_iter::chip_iter ( const chip_iter other)
default

Copy constructor.

Parameters
otherOther chip_iter.

◆ chip_iter() [3/3]

GPIOD_API gpiod::chip_iter::chip_iter ( chip_iter &&  other)
default

Move constructor.

Parameters
otherOther chip_iter.

Member Function Documentation

◆ operator!=()

GPIOD_API bool gpiod::chip_iter::operator!= ( const chip_iter rhs) const
noexcept

Check if this operator doesn't point to the same element.

Parameters
rhsRight-hand side of the equation.
Returns
True if this iterator doesn't point to the same chip_iter, false otherwise.

◆ operator*()

GPIOD_API const chip& gpiod::chip_iter::operator* ( void  ) const

Dereference current element.

Returns
Current GPIO chip by reference.

◆ operator++()

GPIOD_API chip_iter& gpiod::chip_iter::operator++ ( void  )

Advance the iterator by one element.

Returns
Reference to this iterator.

◆ operator->()

GPIOD_API const chip* gpiod::chip_iter::operator-> ( void  ) const

Member access operator.

Returns
Current GPIO chip by pointer.

◆ operator=() [1/2]

GPIOD_API chip_iter& gpiod::chip_iter::operator= ( chip_iter &&  other)
default

Move assignment operator.

Parameters
otherOther chip_iter.
Returns
Reference to this iterator.

◆ operator=() [2/2]

GPIOD_API chip_iter& gpiod::chip_iter::operator= ( const chip_iter other)
default

Assignment operator.

Parameters
otherOther chip_iter.
Returns
Reference to this iterator.

◆ operator==()

GPIOD_API bool gpiod::chip_iter::operator== ( const chip_iter rhs) const
noexcept

Check if this operator points to the same element.

Parameters
rhsRight-hand side of the equation.
Returns
True if this iterator points to the same chip_iter, false otherwise.

Friends And Related Function Documentation

◆ make_chip_iter

chip_iter make_chip_iter ( void  )
friend

Create a new chip_iter.

Returns
New chip iterator object pointing to the first GPIO chip on the system.
Note
This function is needed as we already use the default constructor of gpiod::chip_iter as the return value of gpiod::end.

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