@@ -67,37 +67,145 @@ struct topicCodeStr
67
67
std::string callbacksCode;
68
68
};
69
69
70
+ /* *
71
+ * @brief Get component and function data from event name
72
+ *
73
+ * @param eventData
74
+ */
75
+ void getDataFromEvent (eventDataStr& eventData);
70
76
71
- void getDataFromEvent (eventDataStr&);
72
-
73
- bool getDataFromRootName (const std::string, skillDataStr&);
77
+ /* *
78
+ * @brief Get the skill Data From SCXML Root Name object
79
+ *
80
+ * @param attributeName
81
+ * @param skillData
82
+ * @return bool
83
+ */
84
+ bool getDataFromRootName (const std::string attributeName, skillDataStr& skillData);
74
85
75
- void printEventData (eventDataStr);
86
+ /* *
87
+ * @brief Prints the event data
88
+ *
89
+ * @param eventData
90
+ */
91
+ void printEventData (eventDataStr eventData);
76
92
77
- void printSkillData (skillDataStr);
93
+ /* *
94
+ * @brief Prints the skill data
95
+ *
96
+ * @param skillData
97
+ */
98
+ void printSkillData (skillDataStr skillData);
78
99
79
- void processEvent (fileDataStr fileData, eventDataStr, const skillDataStr, std::string, hCodeStr&, cppCodeStr&, topicCodeStr&);
100
+ /* *
101
+ * @brief Process the event data
102
+ *
103
+ * @param eventData
104
+ * @param skillData
105
+ * @param target
106
+ * @param hCode
107
+ * @param cppCode
108
+ * @param topicCode
109
+ */
110
+ void processEvent (fileDataStr fileData, eventDataStr eventData, const skillDataStr skillData, std::string target, hCodeStr& hCode, cppCodeStr& cppCode, topicCodeStr& topicCode);
80
111
81
- void getEventsCode (fileDataStr fileData, const std::vector<tinyxml2::XMLElement*>, const std::vector<tinyxml2::XMLElement*>, skillDataStr, hCodeStr&, cppCodeStr&, topicCodeStr&);
112
+ /* *
113
+ * @brief Generate the code for the events
114
+ *
115
+ * @param elementsTransition
116
+ * @param elementsSend
117
+ * @param skillData
118
+ * @param hCode
119
+ * @param cppCode
120
+ * @param topicCode
121
+ */
122
+ void getEventsCode (fileDataStr fileData, const std::vector<tinyxml2::XMLElement*> elementsTransition, const std::vector<tinyxml2::XMLElement*> elementsSend, skillDataStr skillData, hCodeStr& hCode, cppCodeStr& cppCode, topicCodeStr& topicCode);
82
123
83
- void writeHCode (const skillDataStr, hCodeStr&, bool );
124
+ /* *
125
+ * @brief Write the header code
126
+ *
127
+ * @param skillData
128
+ * @param code
129
+ * @param datamodel_mode
130
+ */
131
+ void writeHCode (const skillDataStr skillData, hCodeStr& code, bool datamodel_mode);
84
132
85
- void writeCppCode (const skillDataStr, cppCodeStr&, bool );
133
+ /* *
134
+ * @brief Write the cpp code
135
+ *
136
+ * @param skillData
137
+ * @param code
138
+ * @param datamodel_mode
139
+ */
140
+ void writeCppCode (const skillDataStr skillData, cppCodeStr& code, bool datamodel_mode);
86
141
87
- void writeDataModelHCode (const skillDataStr, hCodeStr&);
142
+ /* *
143
+ * @brief Write the header code for the data model
144
+ *
145
+ * @param skillData
146
+ * @param code
147
+ */
148
+ void writeDataModelHCode (const skillDataStr skillData, hCodeStr& code);
88
149
89
- void writeDataModelCppCode (const skillDataStr, cppDataModelCodeStr&);
150
+ /* *
151
+ * @brief Write the cpp code for the data model
152
+ *
153
+ * @param skillData
154
+ * @param code
155
+ */
156
+ void writeDataModelCppCode (const skillDataStr skillData, cppDataModelCodeStr& code);
90
157
91
- void generateDataModelHFile (const std::string, const std::string, hCodeStr);
158
+ /* *
159
+ * @brief Generate the data model header file
160
+ *
161
+ * @param outputPath
162
+ * @param outputFileName
163
+ * @param code
164
+ */
165
+ void generateDataModelHFile (const std::string outputPath, const std::string outputFileName, hCodeStr code);
92
166
93
- void generateDataModelCppFile (const std::string, const std::string, cppDataModelCodeStr);
167
+ /* *
168
+ * @brief Generate the data model cpp file
169
+ *
170
+ * @param outputPath
171
+ * @param outputFileName
172
+ * @param code
173
+ */
174
+ void generateDataModelCppFile (const std::string outputPath, const std::string outputFileName, cppDataModelCodeStr code);
94
175
95
- void generateHFile (const std::string, const std::string, const skillDataStr, hCodeStr);
176
+ /* *
177
+ * @brief Generate the header file
178
+ *
179
+ * @param outputPath
180
+ * @param outputFileName
181
+ * @param skillData
182
+ * @param code
183
+ */
184
+ void generateHFile (const std::string outputPath, const std::string outputFileName, const skillDataStr skillData, hCodeStr code);
96
185
97
- void generateCppFile (const std::string, const std::string, const skillDataStr, cppCodeStr);
186
+ /* *
187
+ * @brief Generate the cpp file
188
+ *
189
+ * @param outputPath
190
+ * @param outputFileName
191
+ * @param skillData
192
+ * @param code
193
+ */
194
+ void generateCppFile (const std::string outputPath, const std::string outputFileName, const skillDataStr skillData, cppCodeStr code);
98
195
196
+ /* *
197
+ * @brief Print the help message
198
+ *
199
+ */
99
200
void print_help ();
100
201
202
+ /* *
203
+ * @brief Generator function
204
+ *
205
+ * @param fileData
206
+ * @return true
207
+ * @return false
208
+ */
101
209
bool generator (fileDataStr fileData);
102
210
103
211
0 commit comments