Commit f8815487 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Add program url in the warning

parent 0ccd791a
......@@ -7,6 +7,7 @@
#include "string_utils.h"
#include "header_generator.h"
#include "repr_cpp_warning.h"
#include "repr_cpp_cmakelist.h"
#include "repr_cpp_to_language.h"
#include "repr_cpp_operator.h"
......@@ -295,7 +296,7 @@ std::string graph_cpp_sourceTokenHeader(size_t & indexClassToken, const PSourceT
body += licenceSaveStr();
std::string includeDef(strToUpper(sourceToken.getBaseName()));
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#ifndef __" + includeDef + "_H__\n";
body += "#define __" + includeDef + "_H__\n\n";
......@@ -332,7 +333,7 @@ std::string graph_cpp_sourceTokenHeader(size_t & indexClassToken, const PSourceT
std::string graph_cpp_sourceTokenSource(const PSourceToken & sourceToken){
std::string body("");
body += licenceSaveStr();
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#include \""+sourceToken.getBaseName()+".h\"\n\n\n";
const PVecClassToken & vecClass = sourceToken.getVecClass();
......@@ -662,7 +663,7 @@ std::string graph_cpp_tabGraphTokenParserHeader(const PTabGraphToken & tabGraphT
body += licenceSaveStr();
std::string mainParser(tabGraphToken.getName());
std::string includeDef(strToUpper(mainParser));
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#ifndef __" + includeDef + "_H__\n";
body += "#define __" + includeDef + "_H__\n\n";
......@@ -859,7 +860,7 @@ std::string graph_cpp_tabGraphTokenParserSource(const PTabGraphToken & tabGraphT
std::string mainParser(tabGraphToken.getName());
std::string body("");
body += licenceSaveStr();
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#include \""+mainParser+".h\"\n\n\n";
body += "/////////////////////////////////////////////////////////\n";
......@@ -981,7 +982,7 @@ bool graph_cpp_tabGraphTokenParserEnum(const PTabGraphToken & tabGraphToken){
body += licenceSaveStr();
std::string baseFileName(tabGraphToken.getName());
std::string includeDef(strToUpper(baseFileName) + "_ENUM");
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#ifndef __" + includeDef + "_H__\n";
body += "#define __" + includeDef + "_H__\n\n";
......@@ -1038,7 +1039,7 @@ bool graph_cpp_tabGraphTokenParserFull(const PTabGraphToken & tabGraphToken){
body += licenceSaveStr();
std::string baseFileName(tabGraphToken.getName());
std::string includeDef(strToUpper(baseFileName) + "_FULL");
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#ifndef __" + includeDef + "_H__\n";
body += "#define __" + includeDef + "_H__\n\n";
......
......@@ -6,6 +6,8 @@
#include "string_utils.h"
#include "header_generator.h"
#include "repr_cpp_warning.h"
#include "repr_cpp_operator.h"
using namespace std;
......@@ -37,7 +39,7 @@ std::string repr_cpp_operatorHeader(const PTabGraphToken & tabGraphToken){
body += licenceSaveStr();
std::string mainParser(tabGraphToken.getName());
std::string includeDef(strToUpper(mainParser));
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#ifndef __" + includeDef + "_OPERATOR_H__\n";
body += "#define __" + includeDef + "_OPERATOR_H__\n\n";
......
......@@ -7,6 +7,7 @@
#include "string_utils.h"
#include "header_generator.h"
#include "repr_cpp_warning.h"
#include "Representation/graphParser_utils.h"
#include "repr_cpp_operator.h"
#include "repr_cpp_token.h"
......@@ -52,7 +53,7 @@ std::string repr_cpp_to_languageHeader(const PTabGraphToken & tabGraphToken){
body += licenceSaveStr();
std::string mainParser(tabGraphToken.getName());
std::string includeDef(strToUpper(mainParser));
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#ifndef __" + includeDef + "_TO_LANGUAGE_H__\n";
body += "#define __" + includeDef + "_TO_LANGUAGE_H__\n\n";
......@@ -646,7 +647,7 @@ std::string repr_cpp_to_languageSource(const PTabGraphToken & tabGraphToken){
std::string mainParser(tabGraphToken.getName());
std::string body("");
body += licenceSaveStr();
body += "//You should not modify this file\n\n";
body += repr_cpp_warning();
body += "#include \"string_utils.h\"\n";
body += "#include \""+mainParser+"_to_language.h\"\n\n\n";
......
/***************************************
Auteur : Pierre Aubert
Mail : aubertp7@gmail.com
Licence : CeCILL-C
****************************************/
#include "repr_cpp_warning.h"
///Create the waring on the file modification for C++ backend
/** @return waring on the file modification for C++ backend
*/
std::string repr_cpp_warning(){
std::string body("");
body += "//==============================================================================\n";
body += "//\tThis file has been generated by ParserGenerator\n";
body += "//\tSee https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/ParserGenerator\n";
body += "//\t------------------------------------\n";
body += "//\t- You should not modify this file -\n";
body += "//\t------------------------------------\n";
body += "//==============================================================================\n\n";
return body;
}
/***************************************
Auteur : Pierre Aubert
Mail : aubertp7@gmail.com
Licence : CeCILL-C
****************************************/
#ifndef __REPR_CPP_WARNING_H__
#define __REPR_CPP_WARNING_H__
#include <string>
std::string repr_cpp_warning();
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment