AceUtils  0.5.0
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
Public Attributes | List of all members
ace_utils::mode_group::ModeGroup Struct Reference

A data structure that captures the group of sibliing clock modes which can be cycled through using the "Mode" button. More...

#include <ModeGroup.h>

Collaboration diagram for ace_utils::mode_group::ModeGroup:
Collaboration graph
[legend]

Public Attributes

const ModeGroup *const parentGroup
 Pointer to the parent ModeGroup. More...
 
const uint8_t numModes
 Number of modes.
 
const uint8_t *const modes
 Array of mode identifiers of size numModes.
 
const ModeGroup *const *const childGroups
 List of child ModeGroup corresponding to each element in 'modes'. More...
 

Detailed Description

A data structure that captures the group of sibliing clock modes which can be cycled through using the "Mode" button.

An alternative is to represent each mode as a hierarchy of "directories" and "files". But that requires more memory. Grouping all the siblings together into a single object is more memory efficient, but less aesthetically pleasing.

Definition at line 17 of file ModeGroup.h.

Member Data Documentation

◆ childGroups

const ModeGroup* const* const ace_utils::mode_group::ModeGroup::childGroups

List of child ModeGroup corresponding to each element in 'modes'.

If childGroups is set to nullptr, that is equivalent to setting each element to nullptr. In other words, if there are 3 elements in modes, then we could make childGroups point to an array of {nullptr, nullptr, nullptr}. But it's more space efficient to set childGroups = nullptr.

Definition at line 34 of file ModeGroup.h.

◆ parentGroup

const ModeGroup* const ace_utils::mode_group::ModeGroup::parentGroup

Pointer to the parent ModeGroup.

Set to nullptr for the root group.

Definition at line 19 of file ModeGroup.h.


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