From efea74327637afce0a7f83b24d8c2f8b1d224f73 Mon Sep 17 00:00:00 2001 From: Matthew Newhook Date: Tue, 13 Jan 2009 17:58:32 -0330 Subject: http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=3640 - If slice2java errors out generated files are left behind - Added file tracker - Added calls to file tracker when files or directories are created. - All translators cleanup created files if interrupted, or if they fail. - Normalized various error messages. - Fixed bug with slice2cs which would not correctly check if the impl files were created. Squashed commit of the following: commit 0fec143af219d59dcec5b91cb96a79179f73bd0d Author: Matthew Newhook Date: Tue Jan 13 17:57:25 2009 -0330 Fixed FileException for VC6. commit 38b22497c751ad9b2f86af2d44e87a23c0049d9c Merge: df29064... 4421a3d... Author: Matthew Newhook Date: Tue Jan 13 17:55:49 2009 -0330 Merged R3_3_branch. commit df290649637685bfff4f777ccf53f4f04fda71a0 Author: Matthew Newhook Date: Tue Jan 13 17:45:18 2009 -0330 move checksum writing outside loop commit a9bb2356167b1f9259ce2d1f1b43d40b7fd0ce82 Author: Matthew Newhook Date: Tue Jan 13 17:35:00 2009 -0330 added quotes commit a2f3d7a2414d08ebdc290222b8e97d8b203cc9ab Author: Matthew Newhook Date: Tue Jan 13 17:21:27 2009 -0330 can't -> cannot commit c3113e33a3687cae369bf7803e4f1d18c9141762 Author: Matthew Newhook Date: Tue Jan 13 17:10:12 2009 -0330 minor fixes to output. commit 2a17d6e1b6c0e5eed8be79b8353ca3c06572e19c Author: U-WIN-5WBK5GD0FYQ\matthew Date: Tue Jan 13 12:05:46 2009 -0800 windows fixes. commit d8d4f6dc35043fb71b599dac7171fee0c2bb87bf Author: Matthew Newhook Date: Tue Jan 13 15:58:21 2009 -0330 remove debugging. commit f1e4d7a55e13fea4c0b84244fb437bd391fbe538 Author: Matthew Newhook Date: Tue Jan 13 15:53:37 2009 -0330 Added FileTracker. Added file tracking, and cleanup to lots of translators. commit 33dbfb0124509779bd2d95bbac06a02ca9b907ac Author: Matthew Newhook Date: Tue Jan 13 09:42:16 2009 -0330 http://bugzilla/bugzilla/show_bug.cgi?id=3640 If slice2java errors out generated files are left behind --- cpp/src/slice2cpp/Gen.cpp | 54 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 28 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index a577c67541f..c593e3dcd21 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -7,12 +7,14 @@ // // ********************************************************************** +#include #include #include #include #include #include #include +#include #include #include @@ -34,8 +36,8 @@ getDeprecateSymbol(const ContainedPtr& p1, const ContainedPtr& p2) return deprecateSymbol; } -Slice::Gen::Gen(const string& name, const string& base, const string& headerExtension, - const string& sourceExtension, const vector& extraHeaders, const string& include, +Slice::Gen::Gen(const string& base, const string& headerExtension, const string& sourceExtension, + const vector& extraHeaders, const string& include, const vector& includePaths, const string& dllExport, const string& dir, bool imp, bool checksum, bool stream, bool ice) : _base(base), @@ -74,28 +76,34 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte struct stat st; if(stat(fileImplH.c_str(), &st) == 0) { - cerr << name << ": `" << fileImplH << "' already exists - will not overwrite" << endl; - return; + ostringstream os; + os << fileImplH << "' already exists - will not overwrite"; + throw FileException(__FILE__, __LINE__, os.str()); } if(stat(fileImplC.c_str(), &st) == 0) { - cerr << name << ": `" << fileImplC << "' already exists - will not overwrite" << endl; - return; + ostringstream os; + os << fileImplC << "' already exists - will not overwrite"; + throw FileException(__FILE__, __LINE__, os.str()); } implH.open(fileImplH.c_str()); if(!implH) { - cerr << name << ": can't open `" << fileImplH << "' for writing" << endl; - return; + ostringstream os; + os << "cannot open `" << fileImplH << "': " << strerror(errno); + throw FileException(__FILE__, __LINE__, os.str()); } + FileTracker::instance()->addFile(fileImplH); implC.open(fileImplC.c_str()); if(!implC) { - cerr << name << ": can't open `" << fileImplC << "' for writing" << endl; - return; + ostringstream os; + os << "cannot open `" << fileImplC << "': " << strerror(errno); + throw FileException(__FILE__, __LINE__, os.str()); } + FileTracker::instance()->addFile(fileImplC); string s = fileImplH; if(_include.size()) @@ -119,16 +127,20 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte H.open(fileH.c_str()); if(!H) { - cerr << name << ": can't open `" << fileH << "' for writing" << endl; - return; + ostringstream os; + os << "cannot open `" << fileH << "': " << strerror(errno); + throw FileException(__FILE__, __LINE__, os.str()); } + FileTracker::instance()->addFile(fileH); C.open(fileC.c_str()); if(!C) { - cerr << name << ": can't open `" << fileC << "' for writing" << endl; - return; + ostringstream os; + os << "cannot open `" << fileC << "': " << strerror(errno); + throw FileException(__FILE__, __LINE__, os.str()); } + FileTracker::instance()->addFile(fileC); printHeader(H); printHeader(C); @@ -158,20 +170,6 @@ Slice::Gen::~Gen() } } -bool -Slice::Gen::operator!() const -{ - if(!H || !C) - { - return true; - } - if(_impl && (!implH || !implC)) - { - return true; - } - return false; -} - void Slice::Gen::generate(const UnitPtr& p) { -- cgit v1.2.3 From f8a2a5c47bcc31192d618de6833e9663c9feb5ac Mon Sep 17 00:00:00 2001 From: Matthew Newhook Date: Wed, 14 Jan 2009 09:59:23 -0330 Subject: http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=3517 ; translator stdout/stderr. --- CHANGES | 2 ++ cpp/src/Slice/CsUtil.cpp | 8 ++++---- cpp/src/Slice/JavaUtil.cpp | 12 ++++++------ cpp/src/Slice/Parser.cpp | 14 +++++++------- cpp/src/Slice/PythonUtil.cpp | 6 +++--- cpp/src/slice2cpp/Gen.cpp | 8 ++++---- cpp/src/slice2cpp/Main.cpp | 2 +- cpp/src/slice2cs/Main.cpp | 2 +- cpp/src/slice2docbook/Main.cpp | 2 +- cpp/src/slice2freeze/Main.cpp | 2 +- cpp/src/slice2freezej/Main.cpp | 2 +- cpp/src/slice2html/Main.cpp | 2 +- cpp/src/slice2java/Main.cpp | 2 +- cpp/src/slice2py/Main.cpp | 2 +- cpp/src/slice2rb/Main.cpp | 2 +- 15 files changed, 35 insertions(+), 33 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/CHANGES b/CHANGES index 4b2dc57d40a..3d06162dab6 100644 --- a/CHANGES +++ b/CHANGES @@ -35,6 +35,8 @@ General Changes print an error message if the retry failed and if Ice.RetryIntervals was configured with non-zero time intervals. +- All error output from the slice compilers now goes to stderr. + C++ Changes =========== diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index a5d5c78a7e4..ae8c6e667cc 100644 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -1528,7 +1528,7 @@ Slice::CsGenerator::MetaDataVisitor::visitModuleStart(const ModulePtr& p) static const string attributePrefix = "cs:attribute:"; if(s.find(attributePrefix) != 0 || s.size() == attributePrefix.size()) { - cout << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; + cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; } } _history.insert(s); @@ -1595,7 +1595,7 @@ Slice::CsGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p) ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container()); if(!cl->isLocal()) { - cout << p->definitionContext()->filename() << ":" << p->line() + cerr << p->definitionContext()->filename() << ":" << p->line() << ": warning: metdata directive `UserException' applies only to local operations " << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name() << "' is not local" << endl; @@ -1720,7 +1720,7 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont) } } } - cout << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl; + cerr << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl; } _history.insert(s); } @@ -1734,7 +1734,7 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont) { continue; } - cout << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl; + cerr << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl; } _history.insert(s); } diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 7c73227bc55..b67f36055a4 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -3426,7 +3426,7 @@ Slice::JavaGenerator::MetaDataVisitor::visitModuleStart(const ModulePtr& p) if(!ok) { - cout << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; + cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; } } _history.insert(s); @@ -3482,7 +3482,7 @@ Slice::JavaGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p) ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container()); if(!cl->isLocal()) { - cout << p->definitionContext()->filename() << ":" << p->line() + cerr << p->definitionContext()->filename() << ":" << p->line() << ": warning: metadata directive `UserException' applies only to local operations " << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name() << "' is not local" << endl; @@ -3498,7 +3498,7 @@ Slice::JavaGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p) { if(q->find("java:type:", 0) == 0) { - cout << p->definitionContext()->filename() << ":" << p->line() + cerr << p->definitionContext()->filename() << ":" << p->line() << ": warning: invalid metadata for operation" << endl; break; } @@ -3597,7 +3597,7 @@ Slice::JavaGenerator::MetaDataVisitor::getMetaData(const ContainedPtr& cont) continue; } - cout << file << ":" << cont->line() << ": warning: ignoring invalid metadata `" << s << "'" << endl; + cerr << file << ":" << cont->line() << ": warning: ignoring invalid metadata `" << s << "'" << endl; } _history.insert(s); @@ -3630,7 +3630,7 @@ Slice::JavaGenerator::MetaDataVisitor::validateType(const SyntaxTreeBasePtr& p, assert(b); str = b->typeId(); } - cout << file << ":" << line << ": warning: invalid metadata for " << str << endl; + cerr << file << ":" << line << ": warning: invalid metadata for " << str << endl; } } } @@ -3660,7 +3660,7 @@ Slice::JavaGenerator::MetaDataVisitor::validateGetSet(const SyntaxTreeBasePtr& p assert(b); str = b->typeId(); } - cout << file << ":" << line << ": warning: invalid metadata for " << str << endl; + cerr << file << ":" << line << ": warning: invalid metadata for " << str << endl; } } } diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 866a580373a..5d682503ec3 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -4714,7 +4714,7 @@ Slice::Operation::attributes() const } if(i == 2) { - cout << definitionContext()->filename() << ":" << line() + cerr << definitionContext()->filename() << ":" << line() << ": warning: invalid freeze metadata for operation" << endl; } else @@ -4736,7 +4736,7 @@ Slice::Operation::attributes() const { if(result != 0 && (i == int(Supports) || i == int(Never))) { - cout << definitionContext()->filename() << ":" << line() + cerr << definitionContext()->filename() << ":" << line() << ": warning: invalid freeze metadata for operation" << endl; } else @@ -4751,7 +4751,7 @@ Slice::Operation::attributes() const if(i == 4) { - cout << definitionContext()->filename() << ":" << line() + cerr << definitionContext()->filename() << ":" << line() << ": warning: invalid freeze metadata for operation" << endl; // @@ -5170,9 +5170,9 @@ Slice::Unit::error(const char* s) string file = currentFile(); if(!file.empty()) { - cout << file << ':' << _currentLine << ": "; + cerr << file << ':' << _currentLine << ": "; } - cout << s << endl; + cerr << s << endl; _errors++; } @@ -5188,9 +5188,9 @@ Slice::Unit::warning(const char* s) const string file = currentFile(); if(!file.empty()) { - cout << file << ':' << _currentLine << ": "; + cerr << file << ':' << _currentLine << ": "; } - cout << "warning: " << s << endl; + cerr << "warning: " << s << endl; } void diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 648b7af94df..cb9e024717a 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -2035,7 +2035,7 @@ Slice::Python::MetaDataVisitor::validateGlobal(const DefinitionContextPtr& dc) static const string packagePrefix = "python:package:"; if(s.find(packagePrefix) != 0 || s.size() == packagePrefix.size()) { - cout << dc->filename() << ": warning: ignoring invalid global metadata `" << s << "'" << endl; + cerr << dc->filename() << ": warning: ignoring invalid global metadata `" << s << "'" << endl; } } _history.insert(s); @@ -2067,7 +2067,7 @@ Slice::Python::MetaDataVisitor::validateSequence(const DefinitionContextPtr& dc, } } } - cout << dc->filename() << ":" << line << ": warning: ignoring metadata `" << s << "'" << endl; + cerr << dc->filename() << ":" << line << ": warning: ignoring metadata `" << s << "'" << endl; } } } @@ -2085,7 +2085,7 @@ Slice::Python::MetaDataVisitor::reject(const ContainedPtr& cont) { DefinitionContextPtr dc = cont->definitionContext(); assert(dc); - cout << dc->filename() << ":" << cont->line() << ": warning: ignoring metadata `" << *p << "'" << endl; + cerr << dc->filename() << ":" << cont->line() << ": warning: ignoring metadata `" << *p << "'" << endl; } } } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c593e3dcd21..0c1731b684f 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -5651,7 +5651,7 @@ Slice::Gen::MetaDataVisitor::visitModuleStart(const ModulePtr& p) { continue; } - cout << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; + cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; } _history.insert(s); } @@ -5722,7 +5722,7 @@ Slice::Gen::MetaDataVisitor::visitOperation(const OperationPtr& p) { if(!cl->isLocal()) { - cout << p->definitionContext()->filename() << ":" << p->line() + cerr << p->definitionContext()->filename() << ":" << p->line() << ": warning: metadata directive `UserException' applies only to local operations " << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name() << "' is not local" << endl; @@ -5741,7 +5741,7 @@ Slice::Gen::MetaDataVisitor::visitOperation(const OperationPtr& p) { if(q->find("cpp:type:", 0) == 0 || q->find("cpp:array", 0) == 0 || q->find("cpp:range", 0) == 0) { - cout << p->definitionContext()->filename() << ":" << p->line() + cerr << p->definitionContext()->filename() << ":" << p->line() << ": warning: invalid metadata for operation" << endl; break; } @@ -5834,7 +5834,7 @@ Slice::Gen::MetaDataVisitor::validate(const SyntaxTreeBasePtr& cont, const Strin continue; } - cout << file << ":" << line << ": warning: ignoring invalid metadata `" << s << "'" << endl; + cerr << file << ":" << line << ": warning: ignoring invalid metadata `" << s << "'" << endl; } _history.insert(s); } diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index 4ca202872c7..7e2ff8b58b1 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -101,7 +101,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp index abdc24c23db..595dfe75dc9 100644 --- a/cpp/src/slice2cs/Main.cpp +++ b/cpp/src/slice2cs/Main.cpp @@ -95,7 +95,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp index 25bd52137ac..b5616743174 100644 --- a/cpp/src/slice2docbook/Main.cpp +++ b/cpp/src/slice2docbook/Main.cpp @@ -92,7 +92,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index 84f98ac7c27..cbffb460a3f 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -1523,7 +1523,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp index 2b89feb5cfc..2ab8c36f86f 100644 --- a/cpp/src/slice2freezej/Main.cpp +++ b/cpp/src/slice2freezej/Main.cpp @@ -1183,7 +1183,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp index 068287ed632..dad5663fdba 100644 --- a/cpp/src/slice2html/Main.cpp +++ b/cpp/src/slice2html/Main.cpp @@ -101,7 +101,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index bc555d403bb..7439180b8f2 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -101,7 +101,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp index 4b522bf9a98..7343ea9f812 100644 --- a/cpp/src/slice2py/Main.cpp +++ b/cpp/src/slice2py/Main.cpp @@ -420,7 +420,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp index 092c16f8a35..d5f21dc3037 100644 --- a/cpp/src/slice2rb/Main.cpp +++ b/cpp/src/slice2rb/Main.cpp @@ -102,7 +102,7 @@ main(int argc, char* argv[]) if(opts.isSet("version")) { - cout << ICE_STRING_VERSION << endl; + cerr << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } -- cgit v1.2.3 From 7da5b68416d63f8bb90a1f9d666574d339b6314c Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 14 Jan 2009 20:21:14 +0100 Subject: Fix 3652 - string.h need to be included to use strerror with gcc >= 4.3.2 --- cpp/src/slice2cpp/Gen.cpp | 2 ++ cpp/src/slice2cs/Gen.cpp | 1 + cpp/src/slice2html/Gen.cpp | 2 ++ cpp/src/slice2rb/Main.cpp | 2 ++ 4 files changed, 7 insertions(+) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 0c1731b684f..d442b2a7586 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -17,7 +17,9 @@ #include #include + #include +#include using namespace std; using namespace Slice; diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 633ba2d7ac9..b3c236cfa1a 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -22,6 +22,7 @@ #include #include #include +#include using namespace std; using namespace Slice; diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index f02ef04b75f..65149c2581c 100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -29,6 +29,8 @@ # include #endif +#include + using namespace std; using namespace Slice; using namespace IceUtil; diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp index d5f21dc3037..2cdd6ec4982 100644 --- a/cpp/src/slice2rb/Main.cpp +++ b/cpp/src/slice2rb/Main.cpp @@ -28,6 +28,8 @@ #include #endif +#include + using namespace std; using namespace Slice; using namespace Slice::Ruby; -- cgit v1.2.3 From 55f6e6863b8f17312e8ff58d05d6d035c822187b Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 27 Jan 2009 19:28:59 +0100 Subject: Squashed commit of the following: commit 9aa67a8862e402cb52276282b26a40422fae4adb Author: Jose Gutierrez Date: Tue Jan 27 19:25:22 2009 +0100 Fixed 3374 --header-ext not work as intended. --- cpp/include/Slice/Preprocessor.h | 3 +- cpp/src/Freeze/PingObject.ice | 2 + cpp/src/IceGrid/Internal.ice | 2 + cpp/src/IceStorm/Election.ice | 2 + cpp/src/IceStorm/IceStormInternal.ice | 2 + cpp/src/IceStorm/LinkRecord.ice | 2 + cpp/src/IceStorm/SubscriberRecord.ice | 2 + cpp/src/IceStorm/V31Format.ice | 2 + cpp/src/IceStorm/V32Format.ice | 2 + cpp/src/Slice/Preprocessor.cpp | 7 +- cpp/src/slice2cpp/Gen.cpp | 132 +++++++++++++++++++++++++------- cpp/src/slice2cpp/Gen.h | 16 ++++ cpp/src/slice2cpp/Main.cpp | 4 +- slice/Freeze/BackgroundSaveEvictor.ice | 2 + slice/Freeze/CatalogData.ice | 2 + slice/Freeze/Connection.ice | 2 + slice/Freeze/ConnectionF.ice | 2 + slice/Freeze/DB.ice | 2 + slice/Freeze/Evictor.ice | 2 + slice/Freeze/EvictorF.ice | 2 + slice/Freeze/EvictorStorage.ice | 2 + slice/Freeze/Exception.ice | 2 + slice/Freeze/Transaction.ice | 2 + slice/Freeze/TransactionalEvictor.ice | 2 + slice/Glacier2/PermissionsVerifier.ice | 2 + slice/Glacier2/PermissionsVerifierF.ice | 2 + slice/Glacier2/Router.ice | 2 + slice/Glacier2/RouterF.ice | 2 + slice/Glacier2/SSLInfo.ice | 2 + slice/Glacier2/Session.ice | 2 + slice/Glacier2/SessionF.ice | 2 + slice/Ice/BuiltinSequences.ice | 2 + slice/Ice/Communicator.ice | 2 + slice/Ice/CommunicatorF.ice | 2 + slice/Ice/Connection.ice | 2 + slice/Ice/ConnectionF.ice | 2 + slice/Ice/Current.ice | 2 + slice/Ice/Endpoint.ice | 2 + slice/Ice/FacetMap.ice | 2 + slice/Ice/Identity.ice | 2 + slice/Ice/ImplicitContext.ice | 2 + slice/Ice/ImplicitContextF.ice | 2 + slice/Ice/LocalException.ice | 2 + slice/Ice/Locator.ice | 2 + slice/Ice/LocatorF.ice | 2 + slice/Ice/Logger.ice | 2 + slice/Ice/LoggerF.ice | 2 + slice/Ice/ObjectAdapter.ice | 2 + slice/Ice/ObjectAdapterF.ice | 2 + slice/Ice/ObjectFactory.ice | 2 + slice/Ice/ObjectFactoryF.ice | 6 +- slice/Ice/Plugin.ice | 2 + slice/Ice/PluginF.ice | 2 + slice/Ice/Process.ice | 2 + slice/Ice/ProcessF.ice | 2 + slice/Ice/Properties.ice | 2 + slice/Ice/PropertiesF.ice | 2 + slice/Ice/Router.ice | 2 + slice/Ice/RouterF.ice | 2 + slice/Ice/ServantLocator.ice | 2 + slice/Ice/ServantLocatorF.ice | 2 + slice/Ice/SliceChecksumDict.ice | 2 + slice/Ice/Stats.ice | 2 + slice/Ice/StatsF.ice | 2 + slice/IceBox/IceBox.ice | 2 + slice/IceGrid/Admin.ice | 2 + slice/IceGrid/Descriptor.ice | 2 + slice/IceGrid/Exception.ice | 2 + slice/IceGrid/FileParser.ice | 2 + slice/IceGrid/Locator.ice | 2 + slice/IceGrid/Observer.ice | 2 + slice/IceGrid/Query.ice | 2 + slice/IceGrid/Registry.ice | 2 + slice/IceGrid/Session.ice | 2 + slice/IceGrid/UserAccountMapper.ice | 2 + slice/IcePatch2/FileInfo.ice | 2 + slice/IcePatch2/FileServer.ice | 2 + slice/IceStorm/IceStorm.ice | 2 + 78 files changed, 276 insertions(+), 36 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h index 98a018fbfbe..54535e28812 100644 --- a/cpp/include/Slice/Preprocessor.h +++ b/cpp/include/Slice/Preprocessor.h @@ -32,7 +32,7 @@ class SLICE_API Preprocessor { public: - Preprocessor(const std::string&, const std::string&, const std::vector&); + Preprocessor(const std::string&, const std::string&, const std::vector&, const std::string& = "cpp"); ~Preprocessor(); FILE* preprocess(bool); @@ -54,6 +54,7 @@ private: const std::string _path; const std::string _fileName; const std::vector _args; + const std::string _cppSourceExt; #ifdef _WIN32 std::wstring _cppFile; #else diff --git a/cpp/src/Freeze/PingObject.ice b/cpp/src/Freeze/PingObject.ice index 9ef1772eb57..ac0262e47d5 100644 --- a/cpp/src/Freeze/PingObject.ice +++ b/cpp/src/Freeze/PingObject.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_PING_OBJECT_ICE #define FREEZE_PING_OBJECT_ICE +[["cpp:header-ext:h"]] + module Freeze { diff --git a/cpp/src/IceGrid/Internal.ice b/cpp/src/IceGrid/Internal.ice index 63d2bfb8f12..a1e510d8c38 100644 --- a/cpp/src/IceGrid/Internal.ice +++ b/cpp/src/IceGrid/Internal.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_INTERNAL_ICE #define ICE_GRID_INTERNAL_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/cpp/src/IceStorm/Election.ice b/cpp/src/IceStorm/Election.ice index 2ba02e1035c..2a2fde7f0e9 100644 --- a/cpp/src/IceStorm/Election.ice +++ b/cpp/src/IceStorm/Election.ice @@ -10,6 +10,8 @@ #ifndef ELECTION_ICE #define ELECTION_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/cpp/src/IceStorm/IceStormInternal.ice b/cpp/src/IceStorm/IceStormInternal.ice index 744a5339eab..476dde4c346 100644 --- a/cpp/src/IceStorm/IceStormInternal.ice +++ b/cpp/src/IceStorm/IceStormInternal.ice @@ -10,6 +10,8 @@ #ifndef ICE_STORM_INTERNAL_ICE #define ICE_STORM_INTERNAL_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/cpp/src/IceStorm/LinkRecord.ice b/cpp/src/IceStorm/LinkRecord.ice index 6d30eb428c7..744755fedef 100644 --- a/cpp/src/IceStorm/LinkRecord.ice +++ b/cpp/src/IceStorm/LinkRecord.ice @@ -10,6 +10,8 @@ #ifndef LINK_RECORD_ICE #define LINK_RECORD_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/cpp/src/IceStorm/SubscriberRecord.ice b/cpp/src/IceStorm/SubscriberRecord.ice index 6a8c4133189..2c37010150d 100644 --- a/cpp/src/IceStorm/SubscriberRecord.ice +++ b/cpp/src/IceStorm/SubscriberRecord.ice @@ -10,6 +10,8 @@ #ifndef SUBSCRIBER_RECORD_ICE #define SUBSCRIBER_RECORD_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/cpp/src/IceStorm/V31Format.ice b/cpp/src/IceStorm/V31Format.ice index ca45b0a7f0c..9607990a156 100644 --- a/cpp/src/IceStorm/V31Format.ice +++ b/cpp/src/IceStorm/V31Format.ice @@ -10,6 +10,8 @@ #ifndef V31_FORMAT_ICE #define V31_FORMAT_ICE +[["cpp:header-ext:h"]] + #include module IceStorm diff --git a/cpp/src/IceStorm/V32Format.ice b/cpp/src/IceStorm/V32Format.ice index 248de06da41..860120756a2 100644 --- a/cpp/src/IceStorm/V32Format.ice +++ b/cpp/src/IceStorm/V32Format.ice @@ -10,6 +10,8 @@ #ifndef V32_FORMAT_ICE #define V32_FORMAT_ICE +[["cpp:header-ext:h"]] + #include module IceStorm diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 6c226c2db72..636c772b94d 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -44,10 +44,11 @@ extern "C" int mcpp_lib_main(int argc, char** argv); extern "C" void mcpp_use_mem_buffers(int tf); extern "C" char* mcpp_get_mem_buffer(Outdest od); -Slice::Preprocessor::Preprocessor(const string& path, const string& fileName, const vector& args) : +Slice::Preprocessor::Preprocessor(const string& path, const string& fileName, const vector& args, const string& cppSourceExt) : _path(path), _fileName(fileName), _args(args), + _cppSourceExt(cppSourceExt), _cppHandle(0) { } @@ -390,12 +391,12 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector #include #include +#include #include #include -#include +#include + +#include //TODO using namespace std; using namespace Slice; @@ -44,11 +47,13 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& bool imp, bool checksum, bool stream, bool ice) : _base(base), _headerExtension(headerExtension), + _implHeaderExtension(headerExtension), _sourceExtension(sourceExtension), _extraHeaders(extraHeaders), _include(include), _includePaths(includePaths), _dllExport(dllExport), + _dir(dir), _impl(imp), _checksum(checksum), _stream(stream), @@ -64,15 +69,41 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& { _base.erase(0, pos + 1); } +} + +Slice::Gen::~Gen() +{ + H << "\n\n#endif\n"; + C << '\n'; + + if(_impl) + { + implH << "\n\n#endif\n"; + implC << '\n'; + } +} + +void +Slice::Gen::generate(const UnitPtr& p) +{ + + // + // Check the header-ext global meta data if is not empty we override _headerExtension + // + string headerExtension = getHeaderExt(p->modules()); + if(!headerExtension.empty()) + { + _headerExtension = headerExtension; + } if(_impl) { - string fileImplH = _base + "I." + _headerExtension; + string fileImplH = _base + "I." + _implHeaderExtension; string fileImplC = _base + "I." + _sourceExtension; - if(!dir.empty()) + if(!_dir.empty()) { - fileImplH = dir + '/' + fileImplH; - fileImplC = dir + '/' + fileImplC; + fileImplH = _dir + '/' + fileImplH; + fileImplC = _dir + '/' + fileImplC; } struct stat st; @@ -120,10 +151,10 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& string fileH = _base + "." + _headerExtension; string fileC = _base + "." + _sourceExtension; - if(!dir.empty()) + if(!_dir.empty()) { - fileH = dir + '/' + fileH; - fileC = dir + '/' + fileC; + fileH = _dir + '/' + fileH; + fileC = _dir + '/' + fileC; } H.open(fileH.c_str()); @@ -158,23 +189,7 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string& H << "\n#ifndef __" << s << "__"; H << "\n#define __" << s << "__"; H << '\n'; -} - -Slice::Gen::~Gen() -{ - H << "\n\n#endif\n"; - C << '\n'; - - if(_impl) - { - implH << "\n\n#endif\n"; - implC << '\n'; - } -} -void -Slice::Gen::generate(const UnitPtr& p) -{ validateMetaData(p); writeExtraHeaders(C); @@ -193,6 +208,7 @@ Slice::Gen::generate(const UnitPtr& p) } C << _base << "." << _headerExtension << ">"; + H << "\n#include "; H << "\n#include "; H << "\n#include "; @@ -224,6 +240,7 @@ Slice::Gen::generate(const UnitPtr& p) } else if(p->hasNonLocalClassDecls()) { + H << "\n#include "; } @@ -274,7 +291,12 @@ Slice::Gen::generate(const UnitPtr& p) for(StringList::const_iterator q = includes.begin(); q != includes.end(); ++q) { - H << "\n#include <" << changeInclude(*q, _includePaths) << "." << _headerExtension << ">"; + string extension = getHeaderExt((*q), p->modules()); + if(extension.empty()) + { + extension = _headerExtension; + } + H << "\n#include <" << changeInclude(*q, _includePaths) << "." << extension << ">"; } H << "\n#include "; @@ -339,7 +361,7 @@ Slice::Gen::generate(const UnitPtr& p) { implH << _include << '/'; } - implH << _base << ".h>"; + implH << _base << "." << _headerExtension << ">"; writeExtraHeaders(implC); @@ -348,7 +370,7 @@ Slice::Gen::generate(const UnitPtr& p) { implC << _include << '/'; } - implC << _base << "I.h>"; + implC << _base << "I." << _implHeaderExtension << ">"; ImplVisitor implVisitor(implH, implC, _dllExport); p->visit(&implVisitor, false); @@ -5641,6 +5663,8 @@ Slice::Gen::MetaDataVisitor::visitModuleStart(const ModulePtr& p) StringList globalMetaData = dc->getMetaData(); string file = dc->filename(); static const string prefix = "cpp:"; + + int headerExtension = 0; for(StringList::const_iterator q = globalMetaData.begin(); q != globalMetaData.end(); ++q) { string s = *q; @@ -5653,7 +5677,15 @@ Slice::Gen::MetaDataVisitor::visitModuleStart(const ModulePtr& p) { continue; } - cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl; + else if(ss.find("header-ext:") == 0) + { + headerExtension++; + if(headerExtension == 1) + { + continue; + } + } + cerr << file << ": warning: ignoring invalid global metadata `" << s << "', the cpp:header-ext global metadata can only appear once per file." << endl; } _history.insert(s); } @@ -5866,3 +5898,47 @@ Slice::Gen::resetUseWstring(list& hist) hist.pop_back(); return use; } + +string +Slice::Gen::getHeaderExt(const string& file, const ModuleList& modules) +{ + string ext = ""; + if(!modules.empty()) // Just in case the Slice file has no definitions + { + for(ModuleList::const_iterator i = modules.begin(); i != modules.end(); ++i) + { + if((*i)->definitionContext()->filename() == file) + { + string meta = (*i)->definitionContext()->findMetaData("cpp:header-ext"); + string::size_type index = meta.find_last_of(":"); + if(index != string::npos && index + 1 < meta.size()) + { + ext = meta.substr(index + 1, meta.size() - index - 1); + } + } + } + } + return ext; +} + +string +Slice::Gen::getHeaderExt(const ModuleList& modules) +{ + string ext = ""; + if(!modules.empty()) // Just in case the Slice file has no definitions + { + for(ModuleList::const_iterator i = modules.begin(); i != modules.end(); ++i) + { + if((*i)->definitionContext()->includeLevel() == 0) + { + string meta = (*i)->definitionContext()->findMetaData("cpp:header-ext"); + string::size_type index = meta.find_last_of(":"); + if(index != string::npos && index + 1 < meta.size()) + { + ext = meta.substr(index + 1, meta.size() - index - 1); + } + } + } + } + return ext; +} diff --git a/cpp/src/slice2cpp/Gen.h b/cpp/src/slice2cpp/Gen.h index e3c1c9afc01..9cb699a205c 100644 --- a/cpp/src/slice2cpp/Gen.h +++ b/cpp/src/slice2cpp/Gen.h @@ -44,6 +44,20 @@ private: void writeExtraHeaders(::IceUtilInternal::Output&); + + // + // Get the header extension defined in the global metadata for a given file + // if there isn't defined returns a empty string + // + std::string getHeaderExt(const std::string& file, const ModuleList& modules); + + // + // Get the header extension defined in the global metadata for the current + // compiling file. + // if there isn't defined returns a empty string + // + std::string getHeaderExt(const ModuleList& modules); + ::IceUtilInternal::Output H; ::IceUtilInternal::Output C; @@ -52,11 +66,13 @@ private: std::string _base; std::string _headerExtension; + std::string _implHeaderExtension; std::string _sourceExtension; std::vector _extraHeaders; std::string _include; std::vector _includePaths; std::string _dllExport; + std::string _dir; bool _impl; bool _checksum; bool _stream; diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index 7e2ff8b58b1..86eafe9e64f 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -169,7 +169,7 @@ main(int argc, char* argv[]) { if(depend) { - Preprocessor icecpp(argv[0], *i, cppArgs); + Preprocessor icecpp(argv[0], *i, cppArgs, sourceExtension); if(!icecpp.printMakefileDependencies(Preprocessor::CPlusPlus, includePaths)) { return EXIT_FAILURE; @@ -177,7 +177,7 @@ main(int argc, char* argv[]) } else { - Preprocessor icecpp(argv[0], *i, cppArgs); + Preprocessor icecpp(argv[0], *i, cppArgs, sourceExtension); FILE* cppHandle = icecpp.preprocess(false); if(cppHandle == 0) diff --git a/slice/Freeze/BackgroundSaveEvictor.ice b/slice/Freeze/BackgroundSaveEvictor.ice index 381c0c6ce55..5dbdd4206a2 100644 --- a/slice/Freeze/BackgroundSaveEvictor.ice +++ b/slice/Freeze/BackgroundSaveEvictor.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_BACKGROUND_SAVE_EVICTOR_ICE #define FREEZE_BACKGROUND_SAVE_EVICTOR_ICE +[["cpp:header-ext:h"]] + #include module Freeze diff --git a/slice/Freeze/CatalogData.ice b/slice/Freeze/CatalogData.ice index 8df77614183..ad4d9dbe53e 100644 --- a/slice/Freeze/CatalogData.ice +++ b/slice/Freeze/CatalogData.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_CATALOG_DATA_ICE #define FREEZE_CATALOG_DATA_ICE +[["cpp:header-ext:h"]] + module Freeze { diff --git a/slice/Freeze/Connection.ice b/slice/Freeze/Connection.ice index 4fe590a50d7..834eff9c53c 100644 --- a/slice/Freeze/Connection.ice +++ b/slice/Freeze/Connection.ice @@ -13,6 +13,8 @@ #include #include +[["cpp:header-ext:h"]] + module Freeze { diff --git a/slice/Freeze/ConnectionF.ice b/slice/Freeze/ConnectionF.ice index 9a9b1e52ed0..b4d393b7049 100644 --- a/slice/Freeze/ConnectionF.ice +++ b/slice/Freeze/ConnectionF.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_CONNECTION_F_ICE #define FREEZE_CONNECTION_F_ICE +[["cpp:header-ext:h"]] + module Freeze { diff --git a/slice/Freeze/DB.ice b/slice/Freeze/DB.ice index cd7d617ed56..a12feb001aa 100644 --- a/slice/Freeze/DB.ice +++ b/slice/Freeze/DB.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_DB_ICE #define FREEZE_DB_ICE +[["cpp:header-ext:h"]] + /** * * Freeze provides automatic persistence for Ice servants. diff --git a/slice/Freeze/Evictor.ice b/slice/Freeze/Evictor.ice index 2022e795772..0f0979e6a9b 100644 --- a/slice/Freeze/Evictor.ice +++ b/slice/Freeze/Evictor.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_EVICTOR_ICE #define FREEZE_EVICTOR_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/Freeze/EvictorF.ice b/slice/Freeze/EvictorF.ice index a93f4d73c3c..8daa0b536fd 100644 --- a/slice/Freeze/EvictorF.ice +++ b/slice/Freeze/EvictorF.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_EVICTOR_F_ICE #define FREEZE_EVICTOR_F_ICE +[["cpp:header-ext:h"]] + module Freeze { diff --git a/slice/Freeze/EvictorStorage.ice b/slice/Freeze/EvictorStorage.ice index cb4f27e0953..4a2304edc90 100644 --- a/slice/Freeze/EvictorStorage.ice +++ b/slice/Freeze/EvictorStorage.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_EVICTOR_STORAGE_ICE #define FREEZE_EVICTOR_STORAGE_ICE +[["cpp:header-ext:h"]] + #include module Freeze diff --git a/slice/Freeze/Exception.ice b/slice/Freeze/Exception.ice index 53d9456cd37..31919486793 100644 --- a/slice/Freeze/Exception.ice +++ b/slice/Freeze/Exception.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_EXCEPTION_ICE #define FREEZE_EXCEPTION_ICE +[["cpp:header-ext:h"]] + module Freeze { diff --git a/slice/Freeze/Transaction.ice b/slice/Freeze/Transaction.ice index 34eac416b5d..ab8179ec3ae 100644 --- a/slice/Freeze/Transaction.ice +++ b/slice/Freeze/Transaction.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_TRANSACTION_ICE #define FREEZE_TRANSACTION_ICE +[["cpp:header-ext:h"]] + module Freeze { diff --git a/slice/Freeze/TransactionalEvictor.ice b/slice/Freeze/TransactionalEvictor.ice index dfdf7fd45ea..9acab43a232 100644 --- a/slice/Freeze/TransactionalEvictor.ice +++ b/slice/Freeze/TransactionalEvictor.ice @@ -10,6 +10,8 @@ #ifndef FREEZE_TRANSACTIONAL_EVICTOR_ICE #define FREEZE_TRANSACTIONAL_EVICTOR_ICE +[["cpp:header-ext:h"]] + #include module Freeze diff --git a/slice/Glacier2/PermissionsVerifier.ice b/slice/Glacier2/PermissionsVerifier.ice index 733d5b56f79..07cdda5a663 100644 --- a/slice/Glacier2/PermissionsVerifier.ice +++ b/slice/Glacier2/PermissionsVerifier.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_PERMISSIONS_VERIFIER_ICE #define GLACIER2_PERMISSIONS_VERIFIER_ICE +[["cpp:header-ext:h"]] + #include module Glacier2 diff --git a/slice/Glacier2/PermissionsVerifierF.ice b/slice/Glacier2/PermissionsVerifierF.ice index 1f20eb76b85..5620c94be55 100644 --- a/slice/Glacier2/PermissionsVerifierF.ice +++ b/slice/Glacier2/PermissionsVerifierF.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_PERMISSIONS_VERIFIER_F_ICE #define GLACIER2_PERMISSIONS_VERIFIER_F_ICE +[["cpp:header-ext:h"]] + module Glacier2 { diff --git a/slice/Glacier2/Router.ice b/slice/Glacier2/Router.ice index 2bc9a3ac317..cc8c090f1f4 100644 --- a/slice/Glacier2/Router.ice +++ b/slice/Glacier2/Router.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_ROUTER_ICE #define GLACIER2_ROUTER_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/Glacier2/RouterF.ice b/slice/Glacier2/RouterF.ice index 70664f44801..ec420e71f63 100644 --- a/slice/Glacier2/RouterF.ice +++ b/slice/Glacier2/RouterF.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_ROUTER_F_ICE #define GLACIER2_ROUTER_F_ICE +[["cpp:header-ext:h"]] + module Glacier2 { diff --git a/slice/Glacier2/SSLInfo.ice b/slice/Glacier2/SSLInfo.ice index d1ae83b1433..94132ecf01b 100644 --- a/slice/Glacier2/SSLInfo.ice +++ b/slice/Glacier2/SSLInfo.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_SSL_INFO_ICE #define GLACIER2_SSL_INFO_ICE +[["cpp:header-ext:h"]] + #include module Glacier2 diff --git a/slice/Glacier2/Session.ice b/slice/Glacier2/Session.ice index ea687194350..02596804fc1 100644 --- a/slice/Glacier2/Session.ice +++ b/slice/Glacier2/Session.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_SESSION_ICE #define GLACIER2_SESSION_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/Glacier2/SessionF.ice b/slice/Glacier2/SessionF.ice index 74a4faa5309..08386afc758 100644 --- a/slice/Glacier2/SessionF.ice +++ b/slice/Glacier2/SessionF.ice @@ -10,6 +10,8 @@ #ifndef GLACIER2_SESSION_F_ICE #define GLACIER2_SESSION_F_ICE +[["cpp:header-ext:h"]] + module Glacier2 { diff --git a/slice/Ice/BuiltinSequences.ice b/slice/Ice/BuiltinSequences.ice index 87e26022fce..306e6314a37 100644 --- a/slice/Ice/BuiltinSequences.ice +++ b/slice/Ice/BuiltinSequences.ice @@ -10,6 +10,8 @@ #ifndef ICE_BUILTIN_SEQUENCES_ICE #define ICE_BUILTIN_SEQUENCES_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Communicator.ice b/slice/Ice/Communicator.ice index 4d464677612..aaffff1b0f3 100644 --- a/slice/Ice/Communicator.ice +++ b/slice/Ice/Communicator.ice @@ -10,6 +10,8 @@ #ifndef ICE_COMMUNICATOR_ICE #define ICE_COMMUNICATOR_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/Ice/CommunicatorF.ice b/slice/Ice/CommunicatorF.ice index 2ea5062d412..ea8ae669fe9 100644 --- a/slice/Ice/CommunicatorF.ice +++ b/slice/Ice/CommunicatorF.ice @@ -10,6 +10,8 @@ #ifndef ICE_COMMUNICATOR_F_ICE #define ICE_COMMUNICATOR_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Connection.ice b/slice/Ice/Connection.ice index 8603a697994..29d4c59562a 100644 --- a/slice/Ice/Connection.ice +++ b/slice/Ice/Connection.ice @@ -10,6 +10,8 @@ #ifndef ICE_CONNECTION_ICE #define ICE_CONNECTION_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/Ice/ConnectionF.ice b/slice/Ice/ConnectionF.ice index f8602c60c90..b7c982d7537 100644 --- a/slice/Ice/ConnectionF.ice +++ b/slice/Ice/ConnectionF.ice @@ -10,6 +10,8 @@ #ifndef ICE_CONNECTION_F_ICE #define ICE_CONNECTION_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Current.ice b/slice/Ice/Current.ice index a3af5456927..40d46264adf 100644 --- a/slice/Ice/Current.ice +++ b/slice/Ice/Current.ice @@ -10,6 +10,8 @@ #ifndef ICE_CURRENT_ICE #define ICE_CURRENT_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/Ice/Endpoint.ice b/slice/Ice/Endpoint.ice index 84732f8b089..fafd424fc3b 100644 --- a/slice/Ice/Endpoint.ice +++ b/slice/Ice/Endpoint.ice @@ -10,6 +10,8 @@ #ifndef ICE_ENDPOINT_ICE #define ICE_ENDPOINT_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/FacetMap.ice b/slice/Ice/FacetMap.ice index 09aefe146f0..6299bf8e5f6 100644 --- a/slice/Ice/FacetMap.ice +++ b/slice/Ice/FacetMap.ice @@ -10,6 +10,8 @@ #ifndef ICE_FACET_MAP_ICE #define ICE_FACET_MAP_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Identity.ice b/slice/Ice/Identity.ice index 736759de678..649fdcad838 100644 --- a/slice/Ice/Identity.ice +++ b/slice/Ice/Identity.ice @@ -10,6 +10,8 @@ #ifndef ICE_IDENTITY_ICE #define ICE_IDENTITY_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/ImplicitContext.ice b/slice/Ice/ImplicitContext.ice index 2b26687aa33..40c53d54257 100644 --- a/slice/Ice/ImplicitContext.ice +++ b/slice/Ice/ImplicitContext.ice @@ -10,6 +10,8 @@ #ifndef ICE_IMPLICIT_CONTEXT_ICE #define ICE_IMPLICIT_CONTEXT_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/Ice/ImplicitContextF.ice b/slice/Ice/ImplicitContextF.ice index 4e4a552d522..8d91544e96f 100644 --- a/slice/Ice/ImplicitContextF.ice +++ b/slice/Ice/ImplicitContextF.ice @@ -10,6 +10,8 @@ #ifndef ICE_IMPLICIT_CONTEXT_F_ICE #define ICE_IMPLICIT_CONTEXT_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/LocalException.ice b/slice/Ice/LocalException.ice index b4cd5cba645..24923d87509 100644 --- a/slice/Ice/LocalException.ice +++ b/slice/Ice/LocalException.ice @@ -10,6 +10,8 @@ #ifndef ICE_LOCAL_EXCEPTION_ICE #define ICE_LOCAL_EXCEPTION_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/Ice/Locator.ice b/slice/Ice/Locator.ice index 8b5c74ea437..3b5325b90f4 100644 --- a/slice/Ice/Locator.ice +++ b/slice/Ice/Locator.ice @@ -10,6 +10,8 @@ #ifndef ICE_LOCATOR_ICE #define ICE_LOCATOR_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/Ice/LocatorF.ice b/slice/Ice/LocatorF.ice index 2490e4a31e7..401b6f5040c 100644 --- a/slice/Ice/LocatorF.ice +++ b/slice/Ice/LocatorF.ice @@ -10,6 +10,8 @@ #ifndef ICE_LOCATOR_F_ICE #define ICE_LOCATOR_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Logger.ice b/slice/Ice/Logger.ice index 42d4bcf2407..3baa235b7dd 100644 --- a/slice/Ice/Logger.ice +++ b/slice/Ice/Logger.ice @@ -10,6 +10,8 @@ #ifndef ICE_LOGGER_ICE #define ICE_LOGGER_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/LoggerF.ice b/slice/Ice/LoggerF.ice index a162f3eecbc..567670b6bfb 100644 --- a/slice/Ice/LoggerF.ice +++ b/slice/Ice/LoggerF.ice @@ -10,6 +10,8 @@ #ifndef ICE_LOGGER_F_ICE #define ICE_LOGGER_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/ObjectAdapter.ice b/slice/Ice/ObjectAdapter.ice index 264aa046784..c1d48a151e2 100644 --- a/slice/Ice/ObjectAdapter.ice +++ b/slice/Ice/ObjectAdapter.ice @@ -10,6 +10,8 @@ #ifndef ICE_OBJECT_ADAPTER_ICE #define ICE_OBJECT_ADAPTER_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/Ice/ObjectAdapterF.ice b/slice/Ice/ObjectAdapterF.ice index 47413a198d6..c124ba8f7fb 100644 --- a/slice/Ice/ObjectAdapterF.ice +++ b/slice/Ice/ObjectAdapterF.ice @@ -10,6 +10,8 @@ #ifndef ICE_OBJECT_ADAPTER_F_ICE #define ICE_OBJECT_ADAPTER_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/ObjectFactory.ice b/slice/Ice/ObjectFactory.ice index 06593a58c24..8e97300c874 100644 --- a/slice/Ice/ObjectFactory.ice +++ b/slice/Ice/ObjectFactory.ice @@ -10,6 +10,8 @@ #ifndef ICE_OBJECT_FACTORY_ICE #define ICE_OBJECT_FACTORY_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/ObjectFactoryF.ice b/slice/Ice/ObjectFactoryF.ice index 9b8f7fad0c5..fff74448aa0 100644 --- a/slice/Ice/ObjectFactoryF.ice +++ b/slice/Ice/ObjectFactoryF.ice @@ -7,8 +7,10 @@ // // ********************************************************************** -#ifndef ICE_SERVANT_FACTORY_F_ICE -#define ICE_SERVANT_FACTORY_F_ICE +#ifndef ICE_OBJECT_FACTORY_F_ICE +#define ICE_OBJECT_FACTORY_F_ICE + +[["cpp:header-ext:h"]] module Ice { diff --git a/slice/Ice/Plugin.ice b/slice/Ice/Plugin.ice index a872ed658aa..0d6e1515e9c 100644 --- a/slice/Ice/Plugin.ice +++ b/slice/Ice/Plugin.ice @@ -10,6 +10,8 @@ #ifndef ICE_PLUGIN_ICE #define ICE_PLUGIN_ICE +[["cpp:header-ext:h"]] + #include module Ice diff --git a/slice/Ice/PluginF.ice b/slice/Ice/PluginF.ice index 04aca2b7616..b30f0636adf 100644 --- a/slice/Ice/PluginF.ice +++ b/slice/Ice/PluginF.ice @@ -10,6 +10,8 @@ #ifndef ICE_PLUGIN_F_ICE #define ICE_PLUGIN_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Process.ice b/slice/Ice/Process.ice index 162e13d3958..1662775c1e3 100644 --- a/slice/Ice/Process.ice +++ b/slice/Ice/Process.ice @@ -10,6 +10,8 @@ #ifndef ICE_PROCESS_ICE #define ICE_PROCESS_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/ProcessF.ice b/slice/Ice/ProcessF.ice index 86951dc6fee..c9cb8d2297d 100644 --- a/slice/Ice/ProcessF.ice +++ b/slice/Ice/ProcessF.ice @@ -10,6 +10,8 @@ #ifndef ICE_PROCESS_F_ICE #define ICE_PROCESS_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Properties.ice b/slice/Ice/Properties.ice index c391403c711..f193c00caab 100644 --- a/slice/Ice/Properties.ice +++ b/slice/Ice/Properties.ice @@ -10,6 +10,8 @@ #ifndef ICE_PROPERTIES_ICE #define ICE_PROPERTIES_ICE +[["cpp:header-ext:h"]] + #include module Ice diff --git a/slice/Ice/PropertiesF.ice b/slice/Ice/PropertiesF.ice index cd93484aedb..8da07da5117 100644 --- a/slice/Ice/PropertiesF.ice +++ b/slice/Ice/PropertiesF.ice @@ -10,6 +10,8 @@ #ifndef ICE_PROPERTIES_F_ICE #define ICE_PROPERTIES_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Router.ice b/slice/Ice/Router.ice index 70b90801c31..385e353fc41 100644 --- a/slice/Ice/Router.ice +++ b/slice/Ice/Router.ice @@ -10,6 +10,8 @@ #ifndef ICE_ROUTER_ICE #define ICE_ROUTER_ICE +[["cpp:header-ext:h"]] + #include module Ice diff --git a/slice/Ice/RouterF.ice b/slice/Ice/RouterF.ice index 0bf87bd732b..47093b80825 100644 --- a/slice/Ice/RouterF.ice +++ b/slice/Ice/RouterF.ice @@ -10,6 +10,8 @@ #ifndef ICE_ROUTER_F_ICE #define ICE_ROUTER_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/ServantLocator.ice b/slice/Ice/ServantLocator.ice index 310c9c90ba5..504ea58e411 100644 --- a/slice/Ice/ServantLocator.ice +++ b/slice/Ice/ServantLocator.ice @@ -10,6 +10,8 @@ #ifndef ICE_SERVANT_LOCATOR_ICE #define ICE_SERVANT_LOCATOR_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/Ice/ServantLocatorF.ice b/slice/Ice/ServantLocatorF.ice index 458eff0d057..20e6398f4b0 100644 --- a/slice/Ice/ServantLocatorF.ice +++ b/slice/Ice/ServantLocatorF.ice @@ -10,6 +10,8 @@ #ifndef ICE_SERVANT_LOCATOR_F_ICE #define ICE_SERVANT_LOCATOR_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/SliceChecksumDict.ice b/slice/Ice/SliceChecksumDict.ice index 464081c54ea..87d2da1cd69 100644 --- a/slice/Ice/SliceChecksumDict.ice +++ b/slice/Ice/SliceChecksumDict.ice @@ -10,6 +10,8 @@ #ifndef ICE_SLICE_CHECKSUM_DICT_ICE #define ICE_SLICE_CHECKSUM_DICT_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/Stats.ice b/slice/Ice/Stats.ice index c6f57fb9ed6..45a58d25b31 100644 --- a/slice/Ice/Stats.ice +++ b/slice/Ice/Stats.ice @@ -10,6 +10,8 @@ #ifndef ICE_STATS_ICE #define ICE_STATS_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/Ice/StatsF.ice b/slice/Ice/StatsF.ice index 004858ab54c..540edd45712 100644 --- a/slice/Ice/StatsF.ice +++ b/slice/Ice/StatsF.ice @@ -10,6 +10,8 @@ #ifndef ICE_STATS_F_ICE #define ICE_STATS_F_ICE +[["cpp:header-ext:h"]] + module Ice { diff --git a/slice/IceBox/IceBox.ice b/slice/IceBox/IceBox.ice index b9c0c0cb118..e599a4323ef 100644 --- a/slice/IceBox/IceBox.ice +++ b/slice/IceBox/IceBox.ice @@ -10,6 +10,8 @@ #ifndef ICE_BOX_ICE_BOX_ICE #define ICE_BOX_ICE_BOX_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/IceGrid/Admin.ice b/slice/IceGrid/Admin.ice index 8660878aca6..212392a148e 100644 --- a/slice/IceGrid/Admin.ice +++ b/slice/IceGrid/Admin.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_ADMIN_ICE #define ICE_GRID_ADMIN_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/IceGrid/Descriptor.ice b/slice/IceGrid/Descriptor.ice index 3ac6dad3e41..2d1de16743b 100644 --- a/slice/IceGrid/Descriptor.ice +++ b/slice/IceGrid/Descriptor.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_DESCRIPTOR_ICE #define ICE_GRID_DESCRIPTOR_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/IceGrid/Exception.ice b/slice/IceGrid/Exception.ice index cbccce90ac0..0a2a692eb7e 100644 --- a/slice/IceGrid/Exception.ice +++ b/slice/IceGrid/Exception.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_EXCEPTION_ICE #define ICE_GRID_EXCEPTION_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/IceGrid/FileParser.ice b/slice/IceGrid/FileParser.ice index d99633e116a..7b27455eeaa 100644 --- a/slice/IceGrid/FileParser.ice +++ b/slice/IceGrid/FileParser.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_FILE_PARSER_ICE #define ICE_GRID_FILE_PARSER_ICE +[["cpp:header-ext:h"]] + #include module IceGrid diff --git a/slice/IceGrid/Locator.ice b/slice/IceGrid/Locator.ice index a236b37b6a9..91877f6a8b2 100644 --- a/slice/IceGrid/Locator.ice +++ b/slice/IceGrid/Locator.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_LOCATOR_ICE #define ICE_GRID_LOCATOR_ICE +[["cpp:header-ext:h"]] + #include module IceGrid diff --git a/slice/IceGrid/Observer.ice b/slice/IceGrid/Observer.ice index abbd069664e..8b89278c2da 100644 --- a/slice/IceGrid/Observer.ice +++ b/slice/IceGrid/Observer.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_OBSERVER_ICE #define ICE_GRID_OBSERVER_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/IceGrid/Query.ice b/slice/IceGrid/Query.ice index 2304e7edc77..4ea597e852c 100644 --- a/slice/IceGrid/Query.ice +++ b/slice/IceGrid/Query.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_QUERY_ICE #define ICE_GRID_QUERY_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/IceGrid/Registry.ice b/slice/IceGrid/Registry.ice index 5ef47fae173..6dd91bf6dae 100644 --- a/slice/IceGrid/Registry.ice +++ b/slice/IceGrid/Registry.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_REGISTRY_ICE #define ICE_GRID_REGISTRY_ICE +[["cpp:header-ext:h"]] + #include #include #include diff --git a/slice/IceGrid/Session.ice b/slice/IceGrid/Session.ice index ffd00c9f570..d071fc7ca6a 100644 --- a/slice/IceGrid/Session.ice +++ b/slice/IceGrid/Session.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_SESSION_ICE #define ICE_GRID_SESSION_ICE +[["cpp:header-ext:h"]] + #include #include diff --git a/slice/IceGrid/UserAccountMapper.ice b/slice/IceGrid/UserAccountMapper.ice index d145b08af50..4befb4da59b 100644 --- a/slice/IceGrid/UserAccountMapper.ice +++ b/slice/IceGrid/UserAccountMapper.ice @@ -10,6 +10,8 @@ #ifndef ICE_GRID_USERACCOUNTMAPPER_ICE #define ICE_GRID_USERACCOUNTMAPPER_ICE +[["cpp:header-ext:h"]] + module IceGrid { diff --git a/slice/IcePatch2/FileInfo.ice b/slice/IcePatch2/FileInfo.ice index 194d1034851..e85a784982b 100644 --- a/slice/IcePatch2/FileInfo.ice +++ b/slice/IcePatch2/FileInfo.ice @@ -10,6 +10,8 @@ #ifndef ICE_PATCH2_FILE_INFO_ICE #define ICE_PATCH2_FILE_INFO_ICE +[["cpp:header-ext:h"]] + #include module IcePatch2 diff --git a/slice/IcePatch2/FileServer.ice b/slice/IcePatch2/FileServer.ice index e18fb043bc4..7e1317c5de9 100644 --- a/slice/IcePatch2/FileServer.ice +++ b/slice/IcePatch2/FileServer.ice @@ -10,6 +10,8 @@ #ifndef ICE_PATCH2_FILE_SERVER_ICE #define ICE_PATCH2_FILE_SERVER_ICE +[["cpp:header-ext:h"]] + #include /** diff --git a/slice/IceStorm/IceStorm.ice b/slice/IceStorm/IceStorm.ice index 013ea0e6c23..8a0e96bd4dc 100644 --- a/slice/IceStorm/IceStorm.ice +++ b/slice/IceStorm/IceStorm.ice @@ -10,6 +10,8 @@ #ifndef ICE_STORM_ICE #define ICE_STORM_ICE +[["cpp:header-ext:h"]] + #include #include -- cgit v1.2.3 From d316cdad7d0a850a8a7828d5b9a7519123bbc29d Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Wed, 28 Jan 2009 06:54:53 +1000 Subject: Squashed commit of the following: commit cf1aad9f7f2ef0df6dff5300249e2f6683a3ab66 Author: michi Date: Wed Jan 28 06:47:55 2009 +1000 Added test to C++ to include class with name that is a C++ keyword. The keyword tests for the other language mappings all already contained a class named with a keyword. commit 9dd664f3b3ac11c06936fbb5cf51bd8c2b6f87dd Author: michi Date: Wed Jan 28 06:34:39 2009 +1000 Bug 3677: slice2cpp generates bad code for class named with C++ keyword --- CHANGES | 3 +++ cpp/src/slice2cpp/Gen.cpp | 2 +- cpp/test/Slice/keyword/Client.cpp | 12 ++++++------ cpp/test/Slice/keyword/Key.ice | 8 ++++---- 4 files changed, 14 insertions(+), 11 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/CHANGES b/CHANGES index ae0b8ca51fb..568cce9efff 100644 --- a/CHANGES +++ b/CHANGES @@ -58,6 +58,9 @@ General Changes C++ Changes =========== +- Fixed bug in slice2cpp that caused bad code to be generated for classes + whose name was a C++ keyword. + - Fixed a bug in IceSSL where the IceSSL.CheckCertName property did not have any effect. diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 51ea19f40d2..22a033421c6 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3857,7 +3857,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) H << sp << nl << scoped << " _init;"; H << eb << ';'; _doneStaticSymbol = true; - H << sp << nl << "static " << scoped << "__staticInit _" << p->name() << "_init;"; + H << sp << nl << "static " << p->name() << "__staticInit _" << p->name() << "_init;"; } if(p->isLocal()) diff --git a/cpp/test/Slice/keyword/Client.cpp b/cpp/test/Slice/keyword/Client.cpp index d96b6a8694a..5eaf65563a8 100644 --- a/cpp/test/Slice/keyword/Client.cpp +++ b/cpp/test/Slice/keyword/Client.cpp @@ -31,7 +31,7 @@ public: } }; -class complI: public _cpp_and::_cpp_compl +class switchI: public _cpp_and::_cpp_switch { public: virtual void foo(const _cpp_and::charPrx&, Ice::Int&, const ::Ice::Current&) @@ -58,15 +58,15 @@ class friendI : public _cpp_and::_cpp_friend public: virtual _cpp_and::_cpp_auto _cpp_goto(_cpp_and::_cpp_continue, const _cpp_and::_cpp_auto&, const _cpp_and::deletePtr&, - const _cpp_and::complPtr&, const _cpp_and::doPtr&, const _cpp_and::breakPrx&, - const _cpp_and::charPrx&, const _cpp_and::complPrx&, const _cpp_and::doPrx&, + const _cpp_and::switchPtr&, const _cpp_and::doPtr&, const _cpp_and::breakPrx&, + const _cpp_and::charPrx&, const _cpp_and::switchPrx&, const _cpp_and::doPrx&, ::Ice::Int, ::Ice::Int, ::Ice::Int, ::Ice::Int) { return _cpp_and::_cpp_auto(); } }; -class fooI : public _cpp_and::AMI_compl_foo +class fooI : public _cpp_and::AMI_switch_foo { public: @@ -99,9 +99,9 @@ testtypes() e->_cpp_explicit(); _cpp_and::charPtr e1 = new charI(); - _cpp_and::complPrx f; + _cpp_and::switchPrx f; f->foo_async(new fooI(), e); - _cpp_and::complPtr f1 = new complI(); + _cpp_and::switchPtr f1 = new switchI(); _cpp_and::doPrx g; g->_cpp_case(0, d2); diff --git a/cpp/test/Slice/keyword/Key.ice b/cpp/test/Slice/keyword/Key.ice index 2c4238c688c..bb1d0a8e311 100644 --- a/cpp/test/Slice/keyword/Key.ice +++ b/cpp/test/Slice/keyword/Key.ice @@ -35,12 +35,12 @@ interface char void explicit(); }; -class compl +class switch { ["ami"] void foo(char* export, out int volatile); }; -class do extends compl implements char, break +class do extends switch implements char, break { }; @@ -60,8 +60,8 @@ exception sizeof extends return local interface friend { - auto goto(continue if, auto d, delete inline, compl private, do mutable, break* namespace, - char* new, compl* not, do* operator, int or, int protected, int public, int register) + auto goto(continue if, auto d, delete inline, switch private, do mutable, break* namespace, + char* new, switch* not, do* operator, int or, int protected, int public, int register) throws return, sizeof; }; -- cgit v1.2.3