What does this bit of code do?
EERef( const int index )
: index( index ) {}
It's inside a struct such as this...
/***
EERef class.
This object references an EEPROM cell.
Its purpose is to mimic a typical byte of RAM, however its storage is the EEPROM.
This class has an overhead of two bytes, similar to storing a pointer to an EEPROM cell.
***/
struct EERef{
EERef( const int index )
: index( index ) {}
//Access/read members.
uint8_t operator*() const
{
return eeprom_read_byte( (uint8_t*) index );
}
operator const uint8_t() const
{
return **this;
}
..... etc....
I've totally forgotten my C++. Someone jog my memory please?