Skip to content

Class daisy::MappedValue

ClassList > daisy > MappedValue

Inherited by the following classes: daisy::MappedFloatValue, daisy::MappedIntValue, daisy::MappedStringListValue

Public Functions

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

Public Functions Documentation

function AppentToString

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

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

Parameters:

  • string The string to add to

function GetAs0to1

virtual float daisy::MappedValue::GetAs0to1 () const = 0

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


function ResetToDefault

virtual void daisy::MappedValue::ResetToDefault () = 0

Resets the value to its default.


function SetFrom0to1

virtual void daisy::MappedValue::SetFrom0to1 (
    float normalizedValue0to1
) = 0

Sets the value so that GetAs0to1() returns normalizedValue0to1.


function Step

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

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.


function ~MappedValue

inline virtual daisy::MappedValue::~MappedValue () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/util/MappedValue.h