semilimes mcu sdk 1.1.1
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
7{
8private:
9 #define headerSize 80
10 #define headerArraySize 24
11 #define headerArray2Size 2
12 SmeJson json_data;
13 char* json = nullptr;
14 char* jsonArray = nullptr;
15 char* jsonArray2 = nullptr;
16
17public:
18// Function: ~FcMultipleChoice
19
20// distructor of the class, frees up the memory occupied by the array/s
21
22// Prototype:
23// ~FcMultipleChoice()
24
25// Parameters:
26
27// Returns:
30 {
31 delete[] json;
32 delete[] jsonArray;
33 delete[] jsonArray2;
34 json = nullptr;
35 jsonArray = nullptr;
36 jsonArray2 = nullptr;
37 }
38
39// Function: FcMultipleChoice.set
40
41// Init the component that display a list of options and allowing multiple choice
42
43// Prototype:
44// void FcMultipleChoice::set(char* refname,char* title,bool reqSel);
45
46// Parameters:
50
51// Returns:
53 void set(char* refname,char* title,bool reqSel);
54
55// Function: FcMultipleChoice.addOptions
56
57// add an array of options where name is the option identifier and value is the text displayed to the user
58
59// Prototype:
60// void FcMultipleChoice::addOptions(char* data);
61
62// Parameters:
65
66// Returns:
68 void addOptions(char* name,char* value);
69
70// Function: FcMultipleChoice.appendOptions
71
72// Prototype:
73// void FcMultipleChoice::appendOptions();
74
75// Append the selected options
76
78
79// Returns:
81 void appendOptions();
82
83// Function: FcMultipleChoice.addValue
84
85// add an array of the names of the choices
86
87// Prototype:
88// void FcMultipleChoice::addValue(char* value);
89
90// Parameters:
92
93// Returns:
95 void addValue(char* value);
96
97
98// Function: FcMultipleChoice.appendValues
99
100// Append the selected options
101
102// Prototype:
104
105// Parameters:
106
107// Returns:
109 void appendValues();
110
111
112// Function: FcMultipleChoice.get
113
114// return the json script
115
116// Prototype:
117// void FcMultipleChoice::get();
118
119// Parameters:
120
121// Returns:
123 char* get();
124};
125
126#endif
Definition fc_multiple_choice.h:7
void addValue(char *value)
Definition fc_multiple_choice.cpp:104
char * get()
Definition fc_multiple_choice.cpp:155
void appendValues()
Definition fc_multiple_choice.cpp:133
void addOptions(char *name, char *value)
Definition fc_multiple_choice.cpp:44
void set(char *refname, char *title, bool reqSel)
Definition fc_multiple_choice.cpp:18
~FcMultipleChoice()
Definition fc_multiple_choice.h:29
void appendOptions()
Definition fc_multiple_choice.cpp:77