Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22997
Modified Files:
Compiler-OptionSet.cpp
Log Message:
Plan related messages added.
Index: Compiler-OptionSet.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-OptionSet.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Compiler-OptionSet.cpp 30 May 2007 17:01:35 -0000 1.2
--- Compiler-OptionSet.cpp 13 Jun 2007 18:11:55 -0000 1.3
***************
*** 9,12 ****
--- 9,13 ----
#include <Compiler/Compiler-OptionSet.h>
#include <Compiler/Compiler-Options.h>
+ #include <UI/UI.h>
using namespace CBM;
***************
*** 43,50 ****
CBM::CompilerOptions *CompilerOptionSet::add(std::string _id)
{
! CBM::CompilerOptions *result;
! result=new CBM::CompilerOptions(_id);
! options.push_back(result);
return(result);
--- 44,57 ----
CBM::CompilerOptions *CompilerOptionSet::add(std::string _id)
{
! CBM::CompilerOptions *result = 0;
! cbmUI->msgPlanOptionsetRegister(_id);
! if (!get(_id)) {
! result=new CBM::CompilerOptions(_id);
! options.push_back(result);
! cbmUI->outputOK();
! } else {
! cbmUI->outputKO("Options already exists (change name)");
! }
return(result);
***************
*** 53,57 ****
CBM::CompilerOptions *CompilerOptionSet::add(CBM::CompilerOptions *_options)
{
! options.push_back(_options);
return(_options);
--- 60,72 ----
CBM::CompilerOptions *CompilerOptionSet::add(CBM::CompilerOptions *_options)
{
! cbmUI->msgPlanOptionsetRegister(_options->Id());
!
! if (!get(_options->Id())) {
! options.push_back(_options);
! cbmUI->outputOK();
! } else {
! cbmUI->outputKO("Options already exists (change name)");
! return(0);
! }
return(_options);
***************
*** 65,69 ****
std::vector<CBM::CompilerOptions*> noptions;
int found = 0;
!
for(i=0; i<n; i++) {
O=options[i];
--- 80,86 ----
std::vector<CBM::CompilerOptions*> noptions;
int found = 0;
!
! cbmUI->msgPlanOptionsUnregister(_options->Id());
!
for(i=0; i<n; i++) {
O=options[i];
***************
*** 75,80 ****
}
}
! if (found)
options=noptions;
return(found);
}
--- 92,101 ----
}
}
! if (found) {
! cbmUI->outputOK();
options=noptions;
+ } else {
+ cbmUI->outputKO("Specified options not found");
+ }
return(found);
}
***************
*** 83,86 ****
--- 104,108 ----
{
CBM::CompilerOptions *O = get(_id);
+
if (O)
return(remove(O));
|