Skip to content

Commit fe25fea

Browse files
authored
Merge pull request #32 from convince-project/fix/align_with_roaml
fixed alignment with roaml
2 parents 3c55bd3 + 6e99add commit fe25fea

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

include/Translator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bool deleteElementAttributeFromVector(std::vector<tinyxml2::XMLElement*>& elemen
3939
bool 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

src/Translator.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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\" ";

0 commit comments

Comments
 (0)