Update of /cvsroot/compbench/CompBenchmarks++/System
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17486
Modified Files:
System.cpp System.h
Log Message:
Last command and last command output can be get.
Index: System.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** System.cpp 7 Dec 2006 21:05:06 -0000 1.9
--- System.cpp 11 Dec 2006 18:09:47 -0000 1.10
***************
*** 412,415 ****
--- 412,425 ----
}
+ std::string& CBMSystem::getLastCommand(void)
+ {
+ return(lastCommand);
+ }
+
+ std::string& CBMSystem::getLastCommandOutput(void)
+ {
+ return(lastCommandOutput);
+ }
+
CBMSystem::~CBMSystem()
{
Index: System.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** System.h 7 Dec 2006 21:05:06 -0000 1.11
--- System.h 11 Dec 2006 18:09:47 -0000 1.12
***************
*** 37,40 ****
--- 37,46 ----
protected:
+ /** Stores the last (shell) command executed by compbenchmarks library. */
+ std::string lastCommand;
+ /** Stores the output of the last (shell) command executed by
+ * compbenchmarks library. */
+ std::string lastCommandOutput;
+
/** Constructor. */
CBMSystem();
***************
*** 223,226 ****
--- 229,244 ----
*/
virtual int done(void);
+
+ /** Returns the last command executed by compbenchmarks library.
+ \sa lastCommand
+ \sa getLastCommandOutput()
+ \result a std::string containing the command */
+ virtual std::string& getLastCommand(void);
+
+ /** Returns the last command's output executed by compbenchmarks library.
+ \sa lastCommandOutput
+ \sa getLastCommand()
+ \result a std::string containing the command's output */
+ virtual std::string& getLastCommandOutput(void);
};
|