[hydra-commits] hydra/ice branch, master, updated.

Commits to the Hydra project code repositories hydra-commits at lists.digium.com
Fri Jun 25 10:01:30 CDT 2010


branch "master" has been updated
       via  8824a937cecb899455808c36333547c24893f16f (commit)
       via  d62653452896c681c37cf40d2e38c33b2fd0d35e (commit)
       via  9a0d91ac3c95cc6fd6658e253ec165eace62f478 (commit)
       via  c7e2f730ac1a1b4672510e135800d59675f3b771 (commit)
       via  32d56ab3b12e024059cf784ce646f96d50d253f9 (commit)
      from  8d9a37c93c609897c41d0386b31dc82730687996 (commit)

Summary of changes:
 Makefile.mak                                       |    5 +
 cpp/allTests.py                                    |    1 +
 cpp/include/Slice/JavaUtil.h                       |    4 +
 cpp/include/Slice/Parser.h                         |   20 ++
 cpp/include/Slice/PythonUtil.h                     |    4 +-
 cpp/include/Slice/RubyUtil.h                       |    4 +-
 cpp/src/Slice/JavaUtil.cpp                         |   34 ++
 cpp/src/Slice/Parser.cpp                           |   95 ++++++
 cpp/src/Slice/PythonUtil.cpp                       |  159 ++++++----
 cpp/src/Slice/RubyUtil.cpp                         |  119 +++++---
 cpp/src/slice2cpp/Gen.cpp                          |  303 +++++++++++-------
 cpp/src/slice2cpp/Gen.h                            |   55 +++-
 cpp/src/slice2cpp/Main.cpp                         |    6 +-
 cpp/src/slice2cs/Gen.cpp                           |  297 ++++++++++++------
 cpp/src/slice2cs/Gen.h                             |   72 ++++-
 cpp/src/slice2cs/Main.cpp                          |    5 +-
 cpp/src/slice2java/Gen.cpp                         |  187 +++++++----
 cpp/src/slice2java/Gen.h                           |   59 +++-
 cpp/src/slice2java/Main.cpp                        |    6 +-
 cpp/src/slice2py/Main.cpp                          |    8 +-
 cpp/src/slice2rb/Main.cpp                          |    6 +-
 cpp/test/Ice/Makefile                              |    3 +-
 cpp/test/Ice/Makefile.mak                          |    1 +
 cpp/test/Ice/versioning/.depend                    |    4 +
 cpp/test/Ice/versioning/.depend.mak                |    4 +
 cpp/test/Ice/versioning/AllTests.cpp               |   47 +++
 cpp/test/Ice/versioning/Client.cpp                 |   57 ++++
 cpp/test/Ice/versioning/Makefile                   |   46 +++
 cpp/test/Ice/versioning/Makefile.mak               |   48 +++
 cpp/test/Ice/versioning/Server.cpp                 |   65 ++++
 cpp/test/Ice/versioning/Test.ice                   |   59 ++++
 cpp/test/Ice/versioning/TestI.cpp                  |   40 +++
 cpp/test/Ice/versioning/TestI.h                    |   41 +++
 cpp/test/Ice/versioning/run.py                     |   48 +++
 .../occi => test/Ice/versioning/version1}/.depend  |    0
 .../Ice/versioning/version1}/.depend.mak           |    0
 cpp/test/Ice/versioning/version1/Makefile          |   47 +++
 cpp/test/Ice/versioning/version1/Makefile.mak      |   50 +++
 .../occi => test/Ice/versioning/version2}/.depend  |    0
 .../Ice/versioning/version2}/.depend.mak           |    0
 cpp/test/Ice/versioning/version2/Makefile          |   47 +++
 cpp/test/Ice/versioning/version2/Makefile.mak      |   50 +++
 cs/allTests.py                                     |    1 +
 cs/src/Ice/BasicStream.cs                          |   15 +
 cs/src/Ice/Makefile                                |    1 +
 cs/src/Ice/Makefile.mak                            |    1 +
 cs/src/Ice/MigrationProxy.cs                       |    9 +
 cs/test/Ice/Makefile                               |    1 +
 cs/test/Ice/Makefile.mak                           |    3 +-
 .../Oracle/occi => cs/test/Ice/versioning}/.depend |    0
 .../occi => cs/test/Ice/versioning}/.depend.mak    |    0
 cs/test/Ice/versioning/InitialI.cs                 |   36 +++
 cs/test/Ice/versioning/Makefile                    |   43 +++
 cs/test/Ice/versioning/Makefile.mak                |   31 ++
 cs/test/Ice/versioning/Server.cs                   |   65 ++++
 cs/test/Ice/versioning/Test.ice                    |   59 ++++
 cs/test/Ice/versioning/generated/.gitignore        |    1 +
 cs/test/Ice/versioning/run.py                      |   47 +++
 .../test/Ice/versioning/version1}/.depend          |    0
 .../test/Ice/versioning/version1}/.depend.mak      |    0
 cs/test/Ice/versioning/version1/AllTests.cs        |   60 ++++
 cs/test/Ice/versioning/version1/Client.cs          |   58 ++++
 cs/test/Ice/versioning/version1/Makefile           |   34 ++
 cs/test/Ice/versioning/version1/Makefile.mak       |   31 ++
 .../Ice/versioning/version1/generated/.gitignore   |    1 +
 .../test/Ice/versioning/version2}/.depend          |    0
 .../test/Ice/versioning/version2}/.depend.mak      |    0
 cs/test/Ice/versioning/version2/AllTests.cs        |   60 ++++
 cs/test/Ice/versioning/version2/Client.cs          |   58 ++++
 cs/test/Ice/versioning/version2/Makefile           |   34 ++
 cs/test/Ice/versioning/version2/Makefile.mak       |   31 ++
 .../Ice/versioning/version2/generated/.gitignore   |    1 +
 java/allTests.py                                   |    1 +
 java/build.xml                                     |   12 +
 java/src/Ice/MigrationProxy.java                   |    9 +
 java/src/IceInternal/BasicStream.java              |   25 ++-
 java/src/ant/Slice2JavaTask.java                   |   11 +
 java/src/ant/SliceTask.java                        |   10 +
 java/test/Ice/versioning/Client1Private.ice        |   55 ++++
 java/test/Ice/versioning/Client2Private.ice        |   55 ++++
 java/test/Ice/versioning/InitialI.java             |   31 ++
 java/test/Ice/versioning/Server.java               |   45 +++
 java/test/Ice/versioning/ServerPrivate.ice         |   54 ++++
 java/test/Ice/versioning/run.py                    |   55 ++++
 java/test/Ice/versioning/version1/AllTests.java    |   59 ++++
 java/test/Ice/versioning/version1/Client.java      |   41 +++
 java/test/Ice/versioning/version2/AllTests.java    |   59 ++++
 java/test/Ice/versioning/version2/Client.java      |   39 +++
 py/modules/IcePy/Slice.cpp                         |    5 +-
 py/test/Ice/versioning/AllTests1.py                |   53 ++++
 py/test/Ice/versioning/AllTests2.py                |   52 +++
 py/test/Ice/versioning/Client1.py                  |   34 ++
 py/test/Ice/versioning/Client1Private.ice          |   55 ++++
 py/test/Ice/versioning/Client2.py                  |   34 ++
 py/test/Ice/versioning/Client2Private.ice          |   55 ++++
 py/test/Ice/versioning/Server.py                   |   62 ++++
 py/test/Ice/versioning/ServerPrivate.ice           |   54 ++++
 rb/src/IceRuby/Slice.cpp                           |    5 +-
 rb/test/Ice/versioning/AllTests1.rb                |   60 ++++
 rb/test/Ice/versioning/AllTests2.rb                |   60 ++++
 rb/test/Ice/versioning/Client1.rb                  |   39 +++
 rb/test/Ice/versioning/Client1Private.ice          |   55 ++++
 rb/test/Ice/versioning/Client1Private.rb           |  328 ++++++++++++++++++++
 rb/test/Ice/versioning/Client2.rb                  |   39 +++
 rb/test/Ice/versioning/Client2Private.ice          |   55 ++++
 105 files changed, 3942 insertions(+), 451 deletions(-)
 create mode 100644 cpp/test/Ice/versioning/.depend
 create mode 100644 cpp/test/Ice/versioning/.depend.mak
 create mode 100644 cpp/test/Ice/versioning/AllTests.cpp
 create mode 100644 cpp/test/Ice/versioning/Client.cpp
 create mode 100644 cpp/test/Ice/versioning/Makefile
 create mode 100644 cpp/test/Ice/versioning/Makefile.mak
 create mode 100644 cpp/test/Ice/versioning/Server.cpp
 create mode 100644 cpp/test/Ice/versioning/Test.ice
 create mode 100644 cpp/test/Ice/versioning/TestI.cpp
 create mode 100644 cpp/test/Ice/versioning/TestI.h
 create mode 100755 cpp/test/Ice/versioning/run.py
 copy cpp/{demo/Database/Oracle/occi => test/Ice/versioning/version1}/.depend (100%)
 copy cpp/{demo/Database/Oracle/occi => test/Ice/versioning/version1}/.depend.mak (100%)
 create mode 100644 cpp/test/Ice/versioning/version1/Makefile
 create mode 100644 cpp/test/Ice/versioning/version1/Makefile.mak
 copy cpp/{demo/Database/Oracle/occi => test/Ice/versioning/version2}/.depend (100%)
 copy cpp/{demo/Database/Oracle/occi => test/Ice/versioning/version2}/.depend.mak (100%)
 create mode 100644 cpp/test/Ice/versioning/version2/Makefile
 create mode 100644 cpp/test/Ice/versioning/version2/Makefile.mak
 create mode 100644 cs/src/Ice/MigrationProxy.cs
 copy {cpp/demo/Database/Oracle/occi => cs/test/Ice/versioning}/.depend (100%)
 copy {cpp/demo/Database/Oracle/occi => cs/test/Ice/versioning}/.depend.mak (100%)
 create mode 100644 cs/test/Ice/versioning/InitialI.cs
 create mode 100644 cs/test/Ice/versioning/Makefile
 create mode 100644 cs/test/Ice/versioning/Makefile.mak
 create mode 100644 cs/test/Ice/versioning/Server.cs
 create mode 100644 cs/test/Ice/versioning/Test.ice
 create mode 100644 cs/test/Ice/versioning/generated/.gitignore
 create mode 100755 cs/test/Ice/versioning/run.py
 copy {cpp/demo/Database/Oracle/occi => cs/test/Ice/versioning/version1}/.depend (100%)
 copy {cpp/demo/Database/Oracle/occi => cs/test/Ice/versioning/version1}/.depend.mak (100%)
 create mode 100644 cs/test/Ice/versioning/version1/AllTests.cs
 create mode 100644 cs/test/Ice/versioning/version1/Client.cs
 create mode 100644 cs/test/Ice/versioning/version1/Makefile
 create mode 100755 cs/test/Ice/versioning/version1/Makefile.mak
 create mode 100644 cs/test/Ice/versioning/version1/generated/.gitignore
 copy {cpp/demo/Database/Oracle/occi => cs/test/Ice/versioning/version2}/.depend (100%)
 copy {cpp/demo/Database/Oracle/occi => cs/test/Ice/versioning/version2}/.depend.mak (100%)
 create mode 100644 cs/test/Ice/versioning/version2/AllTests.cs
 create mode 100644 cs/test/Ice/versioning/version2/Client.cs
 create mode 100644 cs/test/Ice/versioning/version2/Makefile
 create mode 100755 cs/test/Ice/versioning/version2/Makefile.mak
 create mode 100644 cs/test/Ice/versioning/version2/generated/.gitignore
 create mode 100644 java/src/Ice/MigrationProxy.java
 create mode 100644 java/test/Ice/versioning/Client1Private.ice
 create mode 100644 java/test/Ice/versioning/Client2Private.ice
 create mode 100644 java/test/Ice/versioning/InitialI.java
 create mode 100644 java/test/Ice/versioning/Server.java
 create mode 100644 java/test/Ice/versioning/ServerPrivate.ice
 create mode 100755 java/test/Ice/versioning/run.py
 create mode 100644 java/test/Ice/versioning/version1/AllTests.java
 create mode 100644 java/test/Ice/versioning/version1/Client.java
 create mode 100644 java/test/Ice/versioning/version2/AllTests.java
 create mode 100644 java/test/Ice/versioning/version2/Client.java
 create mode 100644 py/test/Ice/versioning/AllTests1.py
 create mode 100644 py/test/Ice/versioning/AllTests2.py
 create mode 100644 py/test/Ice/versioning/Client1.py
 create mode 100644 py/test/Ice/versioning/Client1Private.ice
 create mode 100644 py/test/Ice/versioning/Client2.py
 create mode 100644 py/test/Ice/versioning/Client2Private.ice
 create mode 100644 py/test/Ice/versioning/Server.py
 create mode 100644 py/test/Ice/versioning/ServerPrivate.ice
 create mode 100644 rb/test/Ice/versioning/AllTests1.rb
 create mode 100644 rb/test/Ice/versioning/AllTests2.rb
 create mode 100644 rb/test/Ice/versioning/Client1.rb
 create mode 100644 rb/test/Ice/versioning/Client1Private.ice
 create mode 100644 rb/test/Ice/versioning/Client1Private.rb
 create mode 100644 rb/test/Ice/versioning/Client2.rb
 create mode 100644 rb/test/Ice/versioning/Client2Private.ice


- Log -----------------------------------------------------------------
commit 8824a937cecb899455808c36333547c24893f16f
Merge: 8d9a37c d626534
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Jun 25 12:26:26 2010 -0230

    Merging changes from slice-translator-versioning branch:
    
    Adds support for suppressing parts of a Slice namespace in the generated code.
    While type identifiers are modified, the Ice type IDs continue to contain the parts that
    belong to the suppressed scopes. The result is that you can introduce versioning via
    namespace without necessarily modifying client code (a rebuild is necessary) without
    violating the Ice type system. Contains:
    
     - modifications to the Slice translators
     - test applications

diff --cc cpp/src/slice2java/Gen.cpp
index 8fd5b47,902833e..df4e500
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@@ -112,9 -34,29 +112,31 @@@ using IceUtilInternal::eb
  using IceUtilInternal::spar;
  using IceUtilInternal::epar;
  
 +static const string preserveTag("preserve");
 +
  static string
+ suppressedabsolute(const ContainerPtr& cp, string absolute, bool _suppress)
+ {
+     string suppressed_absolute = absolute;
+ 
+     if (_suppress) {
+ 	for (ContainedPtr contained = ContainedPtr::dynamicCast(cp); contained; contained = ContainedPtr::dynamicCast(contained->container())) {
+ 	    ModulePtr mod = ModulePtr::dynamicCast(contained);
+ 	    if (mod && mod->hasMetaData("suppress")) {
+ 		string suppress_string = "." + mod->name();
+ 		string::size_type pos = suppressed_absolute.rfind(suppress_string);
+ 		if(pos != string::npos)
+ 		{
+ 		    suppressed_absolute.replace(pos, suppress_string.length(), "");
+ 		}
+ 	    }
+ 	}
+     }
+ 
+     return suppressed_absolute;
+ }
+ 
+ static string
  sliceModeToIceMode(Operation::Mode opMode)
  {
      string mode;
@@@ -1926,11 -1743,11 +1948,12 @@@ Slice::JavaVisitor::writeDocCommentPara
      }
  }
  
- Slice::Gen::Gen(const string& name, const string& base, const vector<string>& includePaths, const string& dir, bool listOnly) :
 -Slice::Gen::Gen(const string& name, const string& base, const vector<string>& includePaths, const string& dir, bool suppress) :
++Slice::Gen::Gen(const string& name, const string& base, const vector<string>& includePaths, const string& dir, bool suppress, bool listOnly) :
      _base(base),
      _includePaths(includePaths),
      _dir(dir),
 -    _suppress(suppress)
++    _suppress(suppress),
 +    _listOnly(listOnly)
  {
  }
  
@@@ -1941,46 -1758,50 +1964,50 @@@ Slice::Gen::~Gen(
  void
  Slice::Gen::generate(const UnitPtr& p, bool stream)
  {
+     if(_suppress)
+     {
+ 	p->setScopeGeneratorPolicy(createSuppressorGenerator());
+     }
      JavaGenerator::validateMetaData(p);
  
-     OpsVisitor opsVisitor(_dir, _listOnly);
 -    OpsVisitor opsVisitor(_dir, _suppress);
++    OpsVisitor opsVisitor(_dir, _suppress, _listOnly);
      p->visit(&opsVisitor, false);
  
 -    PackageVisitor packageVisitor(_dir);
 +    PackageVisitor packageVisitor(_dir, _listOnly);
      p->visit(&packageVisitor, false);
  
-     TypesVisitor typesVisitor(_dir, _listOnly, stream);
 -    TypesVisitor typesVisitor(_dir, stream, _suppress);
++    TypesVisitor typesVisitor(_dir, stream, _suppress, _listOnly);
      p->visit(&typesVisitor, false);
  
-     HolderVisitor holderVisitor(_dir, _listOnly, stream);
 -    HolderVisitor holderVisitor(_dir, stream, _suppress);
++    HolderVisitor holderVisitor(_dir, stream, _suppress, _listOnly);
      p->visit(&holderVisitor, false);
  
-     HelperVisitor helperVisitor(_dir, _listOnly, stream);
 -    HelperVisitor helperVisitor(_dir, stream, _suppress);
++    HelperVisitor helperVisitor(_dir, stream, _suppress, _listOnly);
      p->visit(&helperVisitor, false);
  
-     ProxyVisitor proxyVisitor(_dir, _listOnly);
 -    ProxyVisitor proxyVisitor(_dir, _suppress);
++    ProxyVisitor proxyVisitor(_dir, _suppress, _listOnly);
      p->visit(&proxyVisitor, false);
  
-     DelegateVisitor delegateVisitor(_dir, _listOnly);
 -    DelegateVisitor delegateVisitor(_dir, _suppress);
++    DelegateVisitor delegateVisitor(_dir, _suppress, _listOnly);
      p->visit(&delegateVisitor, false);
  
-     DelegateMVisitor delegateMVisitor(_dir, _listOnly);
 -    DelegateMVisitor delegateMVisitor(_dir, _suppress);
++    DelegateMVisitor delegateMVisitor(_dir, _suppress, _listOnly);
      p->visit(&delegateMVisitor, false);
  
-     DelegateDVisitor delegateDVisitor(_dir, _listOnly);
 -    DelegateDVisitor delegateDVisitor(_dir, _suppress);
++    DelegateDVisitor delegateDVisitor(_dir, _suppress, _listOnly);
      p->visit(&delegateDVisitor, false);
  
-     DispatcherVisitor dispatcherVisitor(_dir, _listOnly, stream);
 -    DispatcherVisitor dispatcherVisitor(_dir, stream, _suppress);
++    DispatcherVisitor dispatcherVisitor(_dir, stream, _suppress, _listOnly);
      p->visit(&dispatcherVisitor, false);
  
-     AsyncVisitor asyncVisitor(_dir, _listOnly);
 -    AsyncVisitor asyncVisitor(_dir, _suppress);
++    AsyncVisitor asyncVisitor(_dir, _suppress, _listOnly);
      p->visit(&asyncVisitor, false);
  }
  
  void
  Slice::Gen::generateTie(const UnitPtr& p)
  {
-     TieVisitor tieVisitor(_dir, _listOnly);
 -    TieVisitor tieVisitor(_dir, _suppress);
++    TieVisitor tieVisitor(_dir, _suppress, _listOnly);
      p->visit(&tieVisitor, false);
  }
  
@@@ -2053,8 -1874,8 +2080,8 @@@ Slice::Gen::writeChecksumClass(const st
      out << nl;
  }
  
- Slice::Gen::OpsVisitor::OpsVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::OpsVisitor::OpsVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::OpsVisitor::OpsVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
@@@ -2195,8 -2016,8 +2222,8 @@@ Slice::Gen::OpsVisitor::writeOperations
      close();
  }
  
- Slice::Gen::TieVisitor::TieVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::TieVisitor::TieVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::TieVisitor::TieVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
@@@ -2418,8 -2239,8 +2445,8 @@@ Slice::Gen::PackageVisitor::visitModule
      return false;
  }
  
- Slice::Gen::TypesVisitor::TypesVisitor(const string& dir, bool listOnly, bool stream) :
-     JavaVisitor(dir, listOnly), _stream(stream)
 -Slice::Gen::TypesVisitor::TypesVisitor(const string& dir, bool stream, bool suppress) :
 -    JavaVisitor(dir), _stream(stream), _suppress(suppress)
++Slice::Gen::TypesVisitor::TypesVisitor(const string& dir, bool stream, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _stream(stream), _suppress(suppress)
  {
  }
  
@@@ -3893,8 -3617,8 +3945,8 @@@ Slice::Gen::TypesVisitor::validateGette
      return true;
  }
  
- Slice::Gen::HolderVisitor::HolderVisitor(const string& dir, bool listOnly, bool stream) :
-     JavaVisitor(dir, listOnly), _stream(stream)
 -Slice::Gen::HolderVisitor::HolderVisitor(const string& dir, bool stream, bool suppress) :
 -    JavaVisitor(dir), _stream(stream), _suppress(suppress)
++Slice::Gen::HolderVisitor::HolderVisitor(const string& dir, bool stream, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _stream(stream), _suppress(suppress)
  {
  }
  
@@@ -4046,8 -3770,8 +4098,8 @@@ Slice::Gen::HolderVisitor::writeHolder(
      close();
  }
  
- Slice::Gen::HelperVisitor::HelperVisitor(const string& dir, bool listOnly, bool stream) :
-     JavaVisitor(dir, listOnly), _stream(stream)
 -Slice::Gen::HelperVisitor::HelperVisitor(const string& dir, bool stream, bool suppress) :
 -    JavaVisitor(dir), _stream(stream), _suppress(suppress)
++Slice::Gen::HelperVisitor::HelperVisitor(const string& dir, bool stream, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _stream(stream), _suppress(suppress)
  {
  }
  
@@@ -4938,8 -4663,8 +4991,8 @@@ Slice::Gen::HelperVisitor::visitEnum(co
      }
  }
  
- Slice::Gen::ProxyVisitor::ProxyVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::ProxyVisitor::ProxyVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::ProxyVisitor::ProxyVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
@@@ -5116,8 -4841,8 +5169,8 @@@ Slice::Gen::ProxyVisitor::visitOperatio
      }
  }
  
- Slice::Gen::DelegateVisitor::DelegateVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::DelegateVisitor::DelegateVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::DelegateVisitor::DelegateVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
@@@ -5190,8 -4915,8 +5243,8 @@@ Slice::Gen::DelegateVisitor::visitClass
      return false;
  }
  
- Slice::Gen::DelegateMVisitor::DelegateMVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::DelegateMVisitor::DelegateMVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::DelegateMVisitor::DelegateMVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
@@@ -5389,8 -5114,8 +5442,8 @@@ Slice::Gen::DelegateMVisitor::visitClas
      return false;
  }
  
- Slice::Gen::DelegateDVisitor::DelegateDVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::DelegateDVisitor::DelegateDVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::DelegateDVisitor::DelegateDVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
@@@ -5574,8 -5299,8 +5627,8 @@@ Slice::Gen::DelegateDVisitor::visitClas
      return false;
  }
  
- Slice::Gen::DispatcherVisitor::DispatcherVisitor(const string& dir, bool listOnly, bool stream) :
-     JavaVisitor(dir, listOnly), _stream(stream)
 -Slice::Gen::DispatcherVisitor::DispatcherVisitor(const string& dir, bool stream, bool suppress) :
 -    JavaVisitor(dir), _stream(stream), _suppress(suppress)
++Slice::Gen::DispatcherVisitor::DispatcherVisitor(const string& dir, bool stream, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _stream(stream), _suppress(suppress)
  {
  }
  
@@@ -6018,8 -5743,8 +6071,8 @@@ Slice::Gen::ImplTieVisitor::visitClassD
      return false;
  }
  
- Slice::Gen::AsyncVisitor::AsyncVisitor(const string& dir, bool listOnly) :
-     JavaVisitor(dir, listOnly)
 -Slice::Gen::AsyncVisitor::AsyncVisitor(const string& dir, bool suppress) :
 -    JavaVisitor(dir), _suppress(suppress)
++Slice::Gen::AsyncVisitor::AsyncVisitor(const string& dir, bool suppress, bool listOnly) :
++    JavaVisitor(dir, listOnly), _suppress(suppress)
  {
  }
  
diff --cc cpp/src/slice2java/Gen.h
index fea37cc,27aa6a1..9e27606
--- a/cpp/src/slice2java/Gen.h
+++ b/cpp/src/slice2java/Gen.h
@@@ -106,7 -100,7 +106,8 @@@ public
          const std::string&,
          const std::vector<std::string>&,
          const std::string&,
- 	bool listOnly);
++	bool,
+ 	bool);
      ~Gen();
  
      void generate(const UnitPtr&, bool);
@@@ -121,13 -115,14 +122,14 @@@ private
      std::string _base;
      std::vector<std::string> _includePaths;
      std::string _dir;
 -
+     bool _suppress;
 +    bool _listOnly;
  
      class OpsVisitor : public JavaVisitor
      {
      public:
  
-         OpsVisitor(const std::string&, bool);
 -	    OpsVisitor(const std::string&, bool);
++        OpsVisitor(const std::string&, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
  
@@@ -139,9 -135,13 +142,13 @@@
      {
      public:
  
-         TieVisitor(const std::string&, bool);
 -	    TieVisitor(const std::string&, bool);
++        TieVisitor(const std::string&, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
+ 
+     private:
+ 
+ 	bool _suppress;
      };
  
      class PackageVisitor : public JavaVisitor
@@@ -157,7 -157,7 +164,7 @@@
      {
      public:
  
-         TypesVisitor(const std::string&, bool, bool);
 -	    TypesVisitor(const std::string&, bool, bool);
++        TypesVisitor(const std::string&, bool, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
          virtual void visitClassDefEnd(const ClassDefPtr&);
@@@ -184,7 -186,7 +193,7 @@@
      {
      public:
  
-         HolderVisitor(const std::string&, bool, bool);
 -	    HolderVisitor(const std::string&, bool, bool);
++        HolderVisitor(const std::string&, bool, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
          virtual bool visitStructStart(const StructPtr&);
@@@ -203,7 -207,7 +214,7 @@@
      {
      public:
  
-         HelperVisitor(const std::string&, bool, bool);
 -	    HelperVisitor(const std::string&, bool, bool);
++        HelperVisitor(const std::string&, bool, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
          virtual bool visitStructStart(const StructPtr&);
@@@ -220,7 -226,7 +233,7 @@@
      {
      public:
  
-         ProxyVisitor(const std::string&, bool);
 -	    ProxyVisitor(const std::string&, bool);
++        ProxyVisitor(const std::string&, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
          virtual void visitClassDefEnd(const ClassDefPtr&);
@@@ -231,34 -241,46 +248,46 @@@
      {
      public:
  
-         DelegateVisitor(const std::string&, bool);
 -	    DelegateVisitor(const std::string&, bool);
++        DelegateVisitor(const std::string&, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
+ 
+     private:
+ 
+ 	bool _suppress;
      };
  
      class DelegateMVisitor : public JavaVisitor
      {
      public:
  
-         DelegateMVisitor(const std::string&, bool);
 -	    DelegateMVisitor(const std::string&, bool);
++        DelegateMVisitor(const std::string&, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
+ 
+     private:
+ 
+ 	bool _suppress;
      };
  
      class DelegateDVisitor : public JavaVisitor
      {
      public:
  
-         DelegateDVisitor(const std::string&, bool);
 -	    DelegateDVisitor(const std::string&, bool);
++        DelegateDVisitor(const std::string&, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
+ 
+     private:
+ 
+ 	bool _suppress;
      };
  
      class DispatcherVisitor : public JavaVisitor
      {
      public:
  
-         DispatcherVisitor(const std::string&, bool, bool);
 -	    DispatcherVisitor(const std::string&, bool, bool);
++        DispatcherVisitor(const std::string&, bool, bool, bool);
  
          virtual bool visitClassDefStart(const ClassDefPtr&);
  
@@@ -314,7 -340,7 +347,7 @@@
      {
      public:
  
-         AsyncVisitor(const std::string&, bool);
 -	    AsyncVisitor(const std::string&, bool);
++        AsyncVisitor(const std::string&, bool, bool);
  
          virtual void visitOperation(const OperationPtr&);
  
diff --cc cpp/src/slice2java/Main.cpp
index d866405,d00e54f..c2651d8
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@@ -80,7 -80,7 +80,8 @@@ usage(const char* n
          "--checksum CLASS        Generate checksums for Slice definitions into CLASS.\n"
          "--stream                Generate marshaling support for public stream API.\n"
          "--meta META             Define global metadata directive META.\n"
 +	"--classfiles            Generate a listing of the files that would be created, but do not generate them.\n"
+ 	"--suppress               Suppress tagged modules from being written.\n"
          ;
  }
  
@@@ -107,7 -107,7 +108,8 @@@ compile(int argc, char* argv[]
      opts.addOpt("", "checksum", IceUtilInternal::Options::NeedArg);
      opts.addOpt("", "stream");
      opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
 +    opts.addOpt("", "classfiles");
+     opts.addOpt("", "suppress");
  
      vector<string>args;
      try
@@@ -319,7 -312,7 +323,7 @@@
                  {
                      try
                      {
-                         Gen gen(argv[0], icecpp->getBaseName(), includePaths, output, listFiles);
 -                        Gen gen(argv[0], icecpp->getBaseName(), includePaths, output, suppress);
++                        Gen gen(argv[0], icecpp->getBaseName(), includePaths, output, suppress, listFiles);
                          gen.generate(p, stream);
                          if(tie)
                          {

-----------------------------------------------------------------------


-- 
hydra/ice




More information about the asterisk-scf-commits mailing list