SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::StringConfig Class Reference

#include <sensesp/ui/ui_controls.h>

Inheritance diagram for sensesp::StringConfig:
[legend]

Public Member Functions

 StringConfig (String &value, String &config_path)
 
virtual bool to_json (JsonObject &doc) override
 
virtual bool from_json (const JsonObject &config) override
 
String get_value ()
 
- Public Member Functions inherited from sensesp::FileSystemSaveable
 FileSystemSaveable (const String &config_path)
 
virtual bool load () override
 Load and populate the object from a persistent storage.
 
virtual bool save () override
 Save the object to a persistent storage.
 
virtual bool clear () override
 Delete the data from a persistent storage.
 
bool find_config_file (const String &config_path, String &filename)
 
- Public Member Functions inherited from sensesp::Saveable
 Saveable (const String &config_path)
 
virtual bool refresh ()
 Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state.
 
const String & get_config_path () const
 
- Public Member Functions inherited from sensesp::Serializable

Protected Attributes

String value_
 
String title_ = "Value"
 
- Protected Attributes inherited from sensesp::Saveable
const String config_path_
 

Detailed Description

Definition at line 10 of file ui_controls.h.

Constructor & Destructor Documentation

◆ StringConfig()

sensesp::StringConfig::StringConfig ( String & value,
String & config_path )
inline

Definition at line 12 of file ui_controls.h.

Here is the call graph for this function:

Member Function Documentation

◆ from_json()

bool sensesp::StringConfig::from_json ( const JsonObject & root)
overridevirtual

Deserializes the current object data from a JsonObject.

Reimplemented from sensesp::Serializable.

Definition at line 12 of file ui_controls.cpp.

◆ get_value()

String sensesp::StringConfig::get_value ( )
inline

Definition at line 20 of file ui_controls.h.

◆ to_json()

bool sensesp::StringConfig::to_json ( JsonObject & root)
overridevirtual

Serializes the current object data into a JsonObject.

Reimplemented from sensesp::Serializable.

Definition at line 7 of file ui_controls.cpp.

Member Data Documentation

◆ title_

String sensesp::StringConfig::title_ = "Value"
protected

Definition at line 24 of file ui_controls.h.

◆ value_

String sensesp::StringConfig::value_
protected

Definition at line 23 of file ui_controls.h.


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