Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/Translator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool deleteElementAttributeFromVector(std::vector<tinyxml2::XMLElement*>& elemen
bool readHLXMLFile(tinyxml2::XMLDocument& doc, const std::string fileName);

/**
* @brief translate the XML file from High-Level SCXML to SCXML
* @brief translate the XML file from RoAML to SCXML
*
* @param fileData file data structure passed by reference where the file data is stored
* @return true if the translation is successful
Expand Down
8 changes: 7 additions & 1 deletion src/Translator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,13 @@ bool Translator(fileDataStr& fileData){
outputContent.insert(xmlDeclEnd, "\n" + header);
}
}

//replace ascxml with scxml in output content
size_t pos = 0;
while ((pos = outputContent.find("ascxml", pos)) != std::string::npos) {
outputContent.replace(pos, 6, "scxml");
pos += 5; // Move past the replaced text
}

// add_to_log("-----------");
createDirectory(fileData.outputPath);
createDirectory(fileData.outputPathSrc);
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void print_help()
{
std::cout << "Welcome to model2code tool.\n";
std::cout << "Usage:\n";
std::cout << "model2code --input_filename \"inputFile.scxml\" ";
std::cout << "model2code --input_filename \"inputFile.ascxml\" ";
std::cout << "--model_filename \"projectModel.xml\" ";
std::cout << "--interface_filename \"interfaceFile.xml\" ";
std::cout << "--template_path \"path/to/template_skill/directory\" ";
Expand Down