All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
command_line_parsing.h
Go to the documentation of this file.
1 #ifndef COMMAND_LINE_PARSING_H_INCLUDED_
2 #define COMMAND_LINE_PARSING_H_INCLUDED_
3 
4 #include <vector>
5 #include <string>
6 
7 namespace risc {
8 
9 class Design;
10 
11 namespace tools {
12 
13 
31 std::vector<std::string>
32 preparsing_commandline_arguments(int &argc, char **&argv,
33  std::vector<std::string> &input_files);
34 
44 std::string instrumentor_output_filename(int &argc, char **&argv);
45 
55 std::string dynamic_analysis_input_filename(int &argc, char **&argv);
56 
62 {
63  public:
67  unsigned int verbosityLevel;
68 
72  unsigned int warningLevel;
73 
77  std::string compilerName;
78 
79  std::vector < std::string > input_psg_file_names;
80  std::string output_psg_file_name;
85  bool mic;
86 
87  ParseStatus();
88  ParseStatus& operator=(const ParseStatus& copy);
89 };
90 
95 void
96 ParseCommandlineOptions(int &argc, char** &argv, ParseStatus* status);
97 
102 void
103 AddCommandlineOption(int &argc, char** &argv, std::string option);
104 
110 void
111 AddCommandlineOption(risc::Design &design, std::string option);
112 
118 void
119 RemoveCommandlineOption(risc::Design &design, std::string option);
120 
121 } // end namespace tools
122 
123 } // end namespace risc
124 
125 #endif /* COMMAND_LINE_PARSING_H_INCLUDED_ */
126 
127 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
std::vector< std::string > preparsing_commandline_arguments(int &argc, char **&argv, std::vector< std::string > &input_files)
This function takes the parameter of the command line and creates a source file which includes all th...
Definition: command_line_parsing.cpp:13
Definition: design.h:57
This class stores the command-line options.
Definition: command_line_parsing.h:61
ParseStatus()
Definition: command_line_parsing.cpp:115
bool mic
Flag to compile for Intel MIC architecture.
Definition: command_line_parsing.h:85
std::vector< std::string > input_psg_file_names
Definition: command_line_parsing.h:79
std::string output_psg_file_name
Definition: command_line_parsing.h:80
std::string dynamic_analysis_input_filename(int &argc, char **&argv)
This function searches for the command line arguments for the dynamic analysis, namely, -risc:elab &lt;filename&gt;. ONLY FOR INTERNAL USE! MODIFIES THE COMMAND LINE PARAMETERS.
Definition: command_line_parsing.cpp:90
std::string compilerName
Backend compiler name.
Definition: command_line_parsing.h:77
void ParseCommandlineOptions(int &argc, char **&argv, ParseStatus *status)
Parse command-line options that are related to RISC library.
Definition: command_line_parsing.cpp:139
void RemoveCommandlineOption(risc::Design &design, std::string option)
Remove a command-line option from the command-line argument list in SgProject.
Definition: command_line_parsing.cpp:278
std::string instrumentor_output_filename(int &argc, char **&argv)
This function searches for the command line arguments for the dynamic analysis, namely, -inst:dir_output_filename &lt;filename&gt;. ONLY FOR INTERNAL USE! MODIFIES THE COMMAND LINE PARAMETERS.
Definition: command_line_parsing.cpp:62
std::string output_executable_name
Definition: command_line_parsing.h:81
void AddCommandlineOption(int &argc, char **&argv, std::string option)
Add a new command-line option to argc &amp; argv.
Definition: command_line_parsing.cpp:244
unsigned int warningLevel
Warning level in RISC library and tools.
Definition: command_line_parsing.h:72
ParseStatus & operator=(const ParseStatus &copy)
Definition: command_line_parsing.cpp:125
unsigned int verbosityLevel
Verbosity level in RISC library and tools.
Definition: command_line_parsing.h:67