FullSourceLoc *fsloc; /** Full Source Location instance for holding Source Manager. */
public:
- list<string> getStates() /** Return list of states. */
+ list<string> getStates() /** Return list of states of the state machine. */
{
return states;
}
llvm::raw_string_ostream x(output);
decl->print(x);
line = get_line_of_code(x.str());
+
output = "";
int pos;
const NamedDecl *namedDecl = dyn_cast<NamedDecl>(decl);
{
decl->print(x);
line = get_return(x.str());
- if(test_model(line,"result"))
+ if(get_model(line)==5)
{
const FunctionDecl *fDecl = dyn_cast<FunctionDecl>(decl);
const ParmVarDecl *pvd = fDecl->getParamDecl(0);
- QualType qt = pvd->getOriginalType();
+ QualType qt = pvd->getOriginalType();
event = qt.getAsString();
if(event[event.length()-1]=='&') event = event.substr(0,event.length()-2);
event = event.substr(event.rfind(" ")+1);
case 98 : line = sman.getCharacterData(dyn_cast<ReturnStmt>(stmt)->getReturnLoc());
line = get_line_of_code(line).substr(6);
line = line.substr(0,line.find("("));
- if(test_model(line,"transit"))
+ if(get_model(line)==6)
{
param = get_params(line);
transitions.push_back(event.append(",").append(param));
}
+ if(get_model(line) == 7)
+ {
+ param = ",";
+ transitions.push_back(param.append(event));
+ }
break;
case 99 : find_return_stmt(stmt, event);
break;
*/
int main(int argc, char **argv)
{
+ if(argc==1 || strncmp(argv[1],"-help",5)==0)
+ {
+ cout<<endl<<" Boost Statechart Viewer - help"<<endl;
+ cout<<"================================"<<endl;
+ cout<<"The program can be used almost the same way as a C compiler. You will typically need to specify locations for all header files except of the files stored in system folder(in Linux: /usr/...) using -I option. Of course you can specify the output filename (-o option). Program displays all diagnostic messages like compilers. If an error occurs the program stops."<<endl<<endl;
+ return 0;
+ }
string inputFilename = "";
string outputFilename = "graph.dot"; // initialize output Filename
DiagnosticOptions dopts;