Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14745
Modified Files:
UI-Console.cpp UI-Console.h UI.cpp UI.h UI-Msg.cpp UI-Msg.h
Log Message:
New message for Plan run.
Fixes on Progress messages' handling.
Index: UI-Console.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Console.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** UI-Console.h 6 Jun 2007 15:54:38 -0000 1.1
--- UI-Console.h 1 Aug 2007 19:48:38 -0000 1.2
***************
*** 23,26 ****
--- 23,27 ----
std::string curmsg;
int lastisLF;
+ int lastprogressmayneedLF;
virtual void LF(void);
Index: UI.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** UI.h 31 Jul 2007 17:25:44 -0000 1.10
--- UI.h 1 Aug 2007 19:48:38 -0000 1.11
***************
*** 71,74 ****
--- 71,75 ----
virtual UIMsg *msgPlanBenchmarkRegister(std::string _name);
virtual UIMsg *msgPlanBenchmarkUnregister(std::string _name);
+ virtual UIMsg *msgPlanRun(std::string _name);
virtual UIMsg *outputInfo(std::string _text);
Index: UI-Console.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Console.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** UI-Console.cpp 31 Jul 2007 17:25:44 -0000 1.5
--- UI-Console.cpp 1 Aug 2007 19:48:38 -0000 1.6
***************
*** 17,27 ****
--- 17,30 ----
{
lastisLF=0;
+ lastprogressmayneedLF=0;
}
void UIConsole::LF(void)
{
+
if (!lastisLF) {
std::cout << std::endl;
lastisLF=1;
+ lastprogressmayneedLF=0;
}
}
***************
*** 139,142 ****
--- 142,150 ----
}
+ if (lastprogressmayneedLF) {
+ lastisLF=0;
+ LF();
+ }
+
curmsg="";
***************
*** 270,273 ****
--- 278,285 ----
break;
+ case UIMsg::PlanRun:
+ curmsg+="Running benchmark plan ";
+ curmsg+=objectField(_msg, "name");
+ break;
default:
***************
*** 295,298 ****
--- 307,312 ----
printf("\r%s%0.2f%%", curmsg.c_str(), progress(_msg));
+ lastprogressmayneedLF=1;
+
fflush(stdout);
}
Index: UI.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** UI.cpp 31 Jul 2007 17:25:44 -0000 1.11
--- UI.cpp 1 Aug 2007 19:48:38 -0000 1.12
***************
*** 322,325 ****
--- 322,334 ----
}
+ UIMsg *UI::msgPlanRun(std::string _name)
+ {
+ UIMsg *msg = new UIMsgPlanRun(_name);
+ postMsg(msg);
+
+ return(msg);
+ }
+
+
UIMsg *UI::outputInfo(std::string _test)
Index: UI-Msg.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Msg.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** UI-Msg.h 31 Jul 2007 17:25:44 -0000 1.5
--- UI-Msg.h 1 Aug 2007 19:48:38 -0000 1.6
***************
*** 61,65 ****
PlanOptionsRegister, PlanOptionsUnregister,
PlanOptionRegister, PlanOptionUnregister,
! PlanBenchmarkRegister, PlanBenchmarkUnregister
};
private:
--- 61,66 ----
PlanOptionsRegister, PlanOptionsUnregister,
PlanOptionRegister, PlanOptionUnregister,
! PlanBenchmarkRegister, PlanBenchmarkUnregister,
! PlanRun
};
private:
***************
*** 305,308 ****
--- 306,315 ----
};
+ class UIMsgPlanRun : public UIMsg {
+ public:
+ UIMsgPlanRun(std::string _name);
+ virtual ~UIMsgPlanRun();
+ };
+
Index: UI-Msg.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Msg.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** UI-Msg.cpp 31 Jul 2007 17:25:44 -0000 1.5
--- UI-Msg.cpp 1 Aug 2007 19:48:38 -0000 1.6
***************
*** 478,481 ****
--- 478,491 ----
}
+ UIMsgPlanRun::UIMsgPlanRun(std::string _name)
+ : UIMsg(Progress)
+ {
+ addObject(UndefObject, _name);
+ addAction(PlanRun);
+ }
+
+ UIMsgPlanRun::~UIMsgPlanRun()
+ {
+ }
|