File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ bool deleteElementAttributeFromVector(std::vector<tinyxml2::XMLElement*>& elemen
3939bool readHLXMLFile (tinyxml2::XMLDocument& doc, const std::string fileName);
4040
4141/* *
42- * @brief translate the XML file from High-Level SCXML to SCXML
42+ * @brief translate the XML file from RoAML to SCXML
4343 *
4444 * @param fileData file data structure passed by reference where the file data is stored
4545 * @return true if the translation is successful
Original file line number Diff line number Diff line change @@ -1009,7 +1009,13 @@ bool Translator(fileDataStr& fileData){
10091009 outputContent.insert (xmlDeclEnd, " \n " + header);
10101010 }
10111011 }
1012-
1012+ // replace ascxml with scxml in output content
1013+ size_t pos = 0 ;
1014+ while ((pos = outputContent.find (" ascxml" , pos)) != std::string::npos) {
1015+ outputContent.replace (pos, 6 , " scxml" );
1016+ pos += 5 ; // Move past the replaced text
1017+ }
1018+
10131019 // add_to_log("-----------");
10141020 createDirectory (fileData.outputPath );
10151021 createDirectory (fileData.outputPathSrc );
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ void print_help()
2020{
2121 std::cout << " Welcome to model2code tool.\n " ;
2222 std::cout << " Usage:\n " ;
23- std::cout << " model2code --input_filename \" inputFile.scxml \" " ;
23+ std::cout << " model2code --input_filename \" inputFile.ascxml \" " ;
2424 std::cout << " --model_filename \" projectModel.xml\" " ;
2525 std::cout << " --interface_filename \" interfaceFile.xml\" " ;
2626 std::cout << " --template_path \" path/to/template_skill/directory\" " ;
You can’t perform that action at this time.
0 commit comments