libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::MappedValue Class Referenceabstract

#include <MappedValue.h>

Inheritance diagram for daisy::MappedValue:
daisy::MappedFloatValue daisy::MappedIntValue daisy::MappedStringListValue

Public Member Functions

virtual ~MappedValue ()
 
virtual void AppentToString (FixedCapStrBase< char > &string) const =0
 
virtual void ResetToDefault ()=0
 
virtual float GetAs0to1 () const =0
 
virtual void SetFrom0to1 (float normalizedValue0to1)=0
 
virtual void Step (int16_t numStepsUp, bool useCoarseStepSize)=0
 

Constructor & Destructor Documentation

◆ ~MappedValue()

virtual daisy::MappedValue::~MappedValue ( )
inlinevirtual

Member Function Documentation

◆ AppentToString()

virtual void daisy::MappedValue::AppentToString ( FixedCapStrBase< char > &  string) const
pure virtual

Generates a string representation and adds it to an existing string.

Parameters
stringThe string to add to

Implemented in daisy::MappedFloatValue, daisy::MappedIntValue, and daisy::MappedStringListValue.

◆ GetAs0to1()

virtual float daisy::MappedValue::GetAs0to1 ( ) const
pure virtual

Returns the 0..1 normalized representation of the value, e.g. to display a slider/knob on a UI.

Implemented in daisy::MappedFloatValue, daisy::MappedIntValue, and daisy::MappedStringListValue.

◆ ResetToDefault()

virtual void daisy::MappedValue::ResetToDefault ( )
pure virtual

Resets the value to its default.

Implemented in daisy::MappedFloatValue, daisy::MappedIntValue, and daisy::MappedStringListValue.

◆ SetFrom0to1()

virtual void daisy::MappedValue::SetFrom0to1 ( float  normalizedValue0to1)
pure virtual

Sets the value so that GetAs0to1() returns normalizedValue0to1.

Implemented in daisy::MappedFloatValue, daisy::MappedIntValue, and daisy::MappedStringListValue.

◆ Step()

virtual void daisy::MappedValue::Step ( int16_t  numStepsUp,
bool  useCoarseStepSize 
)
pure virtual

Steps the value up by whatever is appropriate. This function can be used to increment/decrement the value with buttons/encoders while making use of the specific mapping.

Implemented in daisy::MappedFloatValue, daisy::MappedIntValue, and daisy::MappedStringListValue.


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