semilimes mcu sdk 1.1.3 semilimes Software Development Kit for microcontrollers

Loading...
Searching...
No Matches
fc_multiple_choice.h
1#ifndef _fc_multiple_choice_
2#define _fc_multiple_choice_
3
4#include "../defines.h"
5
6 class FcMultipleChoice
7{
8 private:
9 SmeJson json_data;
10 char* json = nullptr;
11 char* jsonArray = nullptr;
12 char* jsonArray2 = nullptr;
13
14 public:
15// Function: ~FcMultipleChoice
16
17// distructor of the class, frees up the memory occupied by the array/s
18
19// Prototype:
20// ~FcMultipleChoice()
21
22// Parameters:
23
24// Returns:
26 ~FcMultipleChoice()
27 {
28 delete[] json;
29 delete[] jsonArray;
30 delete[] jsonArray2;
31 json = nullptr;
32 jsonArray = nullptr;
33 jsonArray2 = nullptr;
34 }
35
36// Function: FcMultipleChoice.set
37
38// Init the component that display a list of options and allowing multiple choice
39
40// Prototype:
41// void FcMultipleChoice::set(const char* refname,const char* title,bool reqSel);
42
43// Parameters:
47
48// Returns:
50 void set(const char* refname,const char* title,bool reqSel);
51
52// Function: FcMultipleChoice.addOptions
53
54// add an array of options where name is the option identifier and value is the text displayed to the user
55
56// Prototype:
57// void FcMultipleChoice::ddOptions(const char* name,const char* value);
58
59// Parameters:
62
63// Returns:
65 void addOptions(const char* name,const char* value);
66
67// Function: FcMultipleChoice.appendOptions
68
69// Prototype:
70// void FcMultipleChoice::appendOptions();
71
72// Append the selected options
73
75
76// Returns:
78 void appendOptions();
79
80// Function: FcMultipleChoice.addValue
81
82// add an array of the names of the choices
83
84// Prototype:
85// void FcMultipleChoice::addValue(char* value);
86
87// Parameters:
89
90// Returns:
92 void addValue(char* value);
93
94
95// Function: FcMultipleChoice.appendValues
96
97// Append the selected options
98
99// Prototype:
101
102// Parameters:
103
104// Returns:
106 void appendValues();
107
108
109// Function: FcMultipleChoice.get
110
111// return the json script
112
113// Prototype:
114// void FcMultipleChoice::get();
115
116// Parameters:
117
118// Returns:
120 char* get();
121};
122
123#endif
FcMultipleChoice
Definition fc_multiple_choice.h:7
FcMultipleChoice::addValue
void addValue(char *value)
Definition fc_multiple_choice.cpp:104
FcMultipleChoice::get
char * get()
Definition fc_multiple_choice.cpp:155
FcMultipleChoice::appendValues
void appendValues()
Definition fc_multiple_choice.cpp:133
FcMultipleChoice::set
void set(const char *refname, const char *title, bool reqSel)
Definition fc_multiple_choice.cpp:18
FcMultipleChoice::addOptions
void addOptions(const char *name, const char *value)
Definition fc_multiple_choice.cpp:44
FcMultipleChoice::~FcMultipleChoice
~FcMultipleChoice()
Definition fc_multiple_choice.h:26
FcMultipleChoice::appendOptions
void appendOptions()
Definition fc_multiple_choice.cpp:77