diff options
| -rw-r--r-- | bruiser/bruiser.h | 39 | 
1 files changed, 28 insertions, 11 deletions
| diff --git a/bruiser/bruiser.h b/bruiser/bruiser.h index ce6e09a..96df53d 100644 --- a/bruiser/bruiser.h +++ b/bruiser/bruiser.h @@ -120,19 +120,20 @@ help CMDHelp[] = {    {"quit()", "", "quit bruiser", "none", "none"},    {"exit()", "", "quit bruiser", "none", "none"},    {"m0()", "", "bruiser reads the report generated by mutator-lvl0", "", ""}, -  {"hijackmain()", "hijack main", "runs a specific matcher that replaces the main with a new main", "none", "returns the rewritten source code as a string"}, +  {"readxmlfile()", "readxmlfile(\"myxml.xml\")", "bruiser reads the specified xml file, if no argument is provided bruiser tries to read the m0 report at the default location", "", "tinyxml2::XMLError"}, +  {"hijackmain()", "", "runs a specific matcher that replaces the main with a new main", "none", "returns the rewritten source code as a string"},    {"clear()", "", "clears the terminal", "", ""},    {"history()", "", "prints bruiser's history", "", ""},    {"!", "", "prints the command from history", "", ""}, -  {"Vars()", "lists all variables", "lists all available variable declarations", "none", "returns a string array of the variable declarations"}, -  {"Funcs()", "lists all functions", "lists all available function declarations", "none", "returns a string array of the function declarations"}, -  {"Classess()", "lists all classes", "lists all available class declarations", "none", "returns a string array of the class declarations"}, -  {"Structs()", "lists all structs", "lists all available struct declarations", "none", "returns a string array of the structur declarations"}, -  {"Arrays()", "lists all arrays", "lists all available array declarations", "none", "returns a string array of the array declarations"}, -  {"Unions()", "lists all unions", "lists all available union declarations", "none", "returns a string array of the union declarations"}, -  {"make()", "runs your make command", "runs your make command", "", ""}, -  {"historysize()", "sets the history size", "sets the history size", "[uint history_size]", ""}, -  {"showsource()", "sets the history size", "sets the history size", "[uint beginline, uint endline, string filename]", "returns a string array of the returned source file"} +  {"Vars()", "", "lists all available variable declarations", "none", "returns a string array of the variable declarations"}, +  {"Funcs()", "", "lists all available function declarations", "none", "returns a string array of the function declarations"}, +  {"Classess()", "", "lists all available class declarations", "none", "returns a string array of the class declarations"}, +  {"Structs()", "", "lists all available struct declarations", "none", "returns a string array of the structur declarations"}, +  {"Arrays()", "", "lists all available array declarations", "none", "returns a string array of the array declarations"}, +  {"Unions()", "", "lists all available union declarations", "none", "returns a string array of the union declarations"}, +  {"make()", "", "runs your make command", "", ""}, +  {"historysize()", "historysize(200)", "sets the history size", "[uint history_size]", ""}, +  {"showsource()", "showsource(1,5,\"test.cpp\")", "shows the source code for the given range and filename", "[uint beginline, uint endline, string filename]", "returns a string array of the returned source file"}  };  /**********************************************************************************************************************/  /** @@ -171,7 +172,8 @@ class TypeInfo  class ReadM0  {    public: -    ReadM0()  +    /*default ctor*/ +    ReadM0()      {        try        { @@ -185,6 +187,21 @@ class ReadM0        }      } +    /*asks for the xml report you want to read*/ +    ReadM0(const char* __xml_report_file) +    { +      try +      { +      XMLError eResult [[maybe_unused]] = IntermediateXMLDoc.LoadFile(__xml_report_file); + +      RootPointer = IntermediateXMLDoc.FirstChild(); +      } +      catch (std::exception& e) +      { + +      } +    } +      ~ReadM0() {}      XMLError LoadXMLDoc(void) | 
