STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
← STM32duino documentation
Loading...
Searching...
No Matches
EEPtr Struct Reference

EEPtr class. More...

#include <EEPROM.h>

Public Member Functions

 EEPtr (const int idx)
 Construct a pointer to an EEPROM cell.
 
 operator int () const
 Implicit conversion to the index of the pointed EEPROM cell.
 
EEPtr & operator= (int in)
 Set the index of the pointed EEPROM cell.
 
bool operator!= (const EEPtr &ptr)
 Compare the index of this pointer with another pointer.
 
EERef operator* ()
 Dereference the pointer.
 
EEPtr & operator++ ()
 Prefix increment, move the pointer to the next EEPROM cell.
 
EEPtr & operator-- ()
 Prefix decrement, move the pointer to the previous EEPROM cell.
 
EEPtr operator++ (int)
 Postfix increment, move the pointer to the next EEPROM cell.
 
EEPtr operator-- (int)
 Postfix decrement, move the pointer to the previous EEPROM cell.
 

Public Attributes

int index
 Index of the EEPROM cell this pointer points to.
 

Detailed Description

EEPtr class.

This object is a bidirectional pointer to EEPROM cells represented by EERef objects. Just like a normal pointer type, this can be dereferenced and repositioned using increment/decrement operators.

Constructor & Destructor Documentation

◆ EEPtr()

EEPtr::EEPtr ( const int  idx)
inline

Construct a pointer to an EEPROM cell.

Parameters
idxIndex of the EEPROM cell.

Member Function Documentation

◆ operator int()

EEPtr::operator int ( ) const
inline

Implicit conversion to the index of the pointed EEPROM cell.

Returns
Index of the EEPROM cell.

◆ operator!=()

bool EEPtr::operator!= ( const EEPtr &  ptr)
inline

Compare the index of this pointer with another pointer.

Parameters
ptrPointer to compare with.
Returns
true if the indices differ, false otherwise.

◆ operator*()

EERef EEPtr::operator* ( )
inline

Dereference the pointer.

Returns
EERef referencing the pointed EEPROM cell.

◆ operator++() [1/2]

EEPtr & EEPtr::operator++ ( )
inline

Prefix increment, move the pointer to the next EEPROM cell.

Returns
Reference to this object.

◆ operator++() [2/2]

EEPtr EEPtr::operator++ ( int  )
inline

Postfix increment, move the pointer to the next EEPROM cell.

Returns
Copy of the pointer before the increment.

◆ operator--() [1/2]

EEPtr & EEPtr::operator-- ( )
inline

Prefix decrement, move the pointer to the previous EEPROM cell.

Returns
Reference to this object.

◆ operator--() [2/2]

EEPtr EEPtr::operator-- ( int  )
inline

Postfix decrement, move the pointer to the previous EEPROM cell.

Returns
Copy of the pointer before the decrement.

◆ operator=()

EEPtr & EEPtr::operator= ( int  in)
inline

Set the index of the pointed EEPROM cell.

Parameters
inNew index.
Returns
Reference to this object.

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