[hydra-commits] beagles: branch ice/hydra-modified-ice r667 - in /ice/branches/hydra-modified...

SVN commits to the Hydra project hydra-commits at lists.digium.com
Mon Jun 7 10:41:32 CDT 2010


Author: beagles
Date: Mon Jun  7 10:41:32 2010
New Revision: 667

URL: https://origsvn.digium.com/svn-view/hydra?view=rev&rev=667
Log:
Merge slice2java-classes translator modification branch.

Modified:
    ice/branches/hydra-modified-ice/   (props changed)
    ice/branches/hydra-modified-ice/Makefile.mak   (props changed)
    ice/branches/hydra-modified-ice/cpp/include/Slice/FileTracker.h
    ice/branches/hydra-modified-ice/cpp/include/Slice/JavaUtil.h
    ice/branches/hydra-modified-ice/cpp/src/IceBox/ServiceManagerI.cpp   (props changed)
    ice/branches/hydra-modified-ice/cpp/src/IceBox/ServiceManagerI.h   (props changed)
    ice/branches/hydra-modified-ice/cpp/src/Slice/FileTracker.cpp
    ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.cpp
    ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.h
    ice/branches/hydra-modified-ice/cpp/src/slice2java/Main.cpp
    ice/branches/hydra-modified-ice/cs/src/IceBox/ServiceManagerI.cs   (props changed)
    ice/branches/hydra-modified-ice/java/test/Ice/slicing/exceptions/   (props changed)
    ice/branches/hydra-modified-ice/scripts/TestUtil.py   (props changed)
    ice/branches/hydra-modified-ice/slice/IceBox/IceBox.ice   (props changed)

Propchange: ice/branches/hydra-modified-ice/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -2,5 +2,6 @@
 /ice/branches/skipped-slice-recovery:565-582
 /ice/branches/slice-preserving-translators:583-618
 /ice/branches/slice-translator-versioning:645-663
+/ice/branches/slice2java-classes:526-666
 /ice/upstream/3.4.0:509-608
 /ice/upstream/3.4b:362-508

Propchange: ice/branches/hydra-modified-ice/Makefile.mak
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -3,4 +3,6 @@
 /ice/branches/skipped-slice-recovery/Makefile.mak:565-582
 /ice/branches/slice-preserving-translators/Makefile.mak:583-618
 /ice/branches/slice-translator-versioning/Makefile.mak:645-663
-/ice/upstream/3.4.0/Makefile.mak:509-510
+/ice/branches/slice2java-classes/Makefile.mak:526-666
+/ice/upstream/3.4.0/Makefile.mak:509-525
+/ice/upstream/3.4b/Makefile.mak:362-508

Modified: ice/branches/hydra-modified-ice/cpp/include/Slice/FileTracker.h
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/hydra-modified-ice/cpp/include/Slice/FileTracker.h?view=diff&rev=667&r1=666&r2=667
==============================================================================
--- ice/branches/hydra-modified-ice/cpp/include/Slice/FileTracker.h (original)
+++ ice/branches/hydra-modified-ice/cpp/include/Slice/FileTracker.h Mon Jun  7 10:41:32 2010
@@ -54,6 +54,7 @@
 
     void cleanup();
     void dumpxml();
+    void dumpfiles();
 
 private:
 

Modified: ice/branches/hydra-modified-ice/cpp/include/Slice/JavaUtil.h
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/hydra-modified-ice/cpp/include/Slice/JavaUtil.h?view=diff&rev=667&r1=666&r2=667
==============================================================================
--- ice/branches/hydra-modified-ice/cpp/include/Slice/JavaUtil.h (original)
+++ ice/branches/hydra-modified-ice/cpp/include/Slice/JavaUtil.h Mon Jun  7 10:41:32 2010
@@ -36,7 +36,7 @@
     // printHeader() and then emits a "package" statement if
     // necessary.
     //
-    void openClass(const std::string&, const std::string& = std::string());
+    virtual void openClass(const std::string&, const std::string& = std::string());
 
     virtual void printHeader();
 };

Propchange: ice/branches/hydra-modified-ice/cpp/src/IceBox/ServiceManagerI.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -2,5 +2,7 @@
 /ice/branches/preserve-graphs/cpp/src/IceBox/ServiceManagerI.cpp:619-664
 /ice/branches/skipped-slice-recovery/cpp/src/IceBox/ServiceManagerI.cpp:565-582
 /ice/branches/slice-translator-versioning/cpp/src/IceBox/ServiceManagerI.cpp:645-663
+/ice/branches/slice2java-classes/cpp/src/IceBox/ServiceManagerI.cpp:526-666
 /ice/trunk/cpp/src/IceBox/ServiceManagerI.cpp:57-149
-/ice/upstream/3.4.0/cpp/src/IceBox/ServiceManagerI.cpp:509-510
+/ice/upstream/3.4.0/cpp/src/IceBox/ServiceManagerI.cpp:509-525
+/ice/upstream/3.4b/cpp/src/IceBox/ServiceManagerI.cpp:362-508

Propchange: ice/branches/hydra-modified-ice/cpp/src/IceBox/ServiceManagerI.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -2,5 +2,7 @@
 /ice/branches/preserve-graphs/cpp/src/IceBox/ServiceManagerI.h:619-664
 /ice/branches/skipped-slice-recovery/cpp/src/IceBox/ServiceManagerI.h:565-582
 /ice/branches/slice-translator-versioning/cpp/src/IceBox/ServiceManagerI.h:645-663
+/ice/branches/slice2java-classes/cpp/src/IceBox/ServiceManagerI.h:526-666
 /ice/trunk/cpp/src/IceBox/ServiceManagerI.h:57-149
-/ice/upstream/3.4.0/cpp/src/IceBox/ServiceManagerI.h:509-510
+/ice/upstream/3.4.0/cpp/src/IceBox/ServiceManagerI.h:509-525
+/ice/upstream/3.4b/cpp/src/IceBox/ServiceManagerI.h:362-508

Modified: ice/branches/hydra-modified-ice/cpp/src/Slice/FileTracker.cpp
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/hydra-modified-ice/cpp/src/Slice/FileTracker.cpp?view=diff&rev=667&r1=666&r2=667
==============================================================================
--- ice/branches/hydra-modified-ice/cpp/src/Slice/FileTracker.cpp (original)
+++ ice/branches/hydra-modified-ice/cpp/src/Slice/FileTracker.cpp Mon Jun  7 10:41:32 2010
@@ -178,6 +178,22 @@
     cout << "</generated>" << endl;
 }
 
+void
+Slice::FileTracker::dumpfiles()
+{
+    for(map<string, string>::const_iterator p = _errors.begin(); p != _errors.end(); ++p)
+    {
+        map<string, list<string> >::const_iterator q = _generated.find(p->first);
+        if(q != _generated.end())
+	{
+            for(list<string>::const_iterator r = q->second.begin(); r != q->second.end(); ++r)
+            {
+                cout << *r << endl;
+            }
+	}
+    }
+}
+
 string
 Slice::FileTracker::escape(const string& str) const
 {

Modified: ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.cpp
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.cpp?view=diff&rev=667&r1=666&r2=667
==============================================================================
--- ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.cpp (original)
+++ ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.cpp Mon Jun  7 10:41:32 2010
@@ -11,12 +11,90 @@
 #include <Gen.h>
 #include <Slice/Checksum.h>
 #include <Slice/Util.h>
+#include <Slice/FileTracker.h>
 #include <IceUtil/Functional.h>
 #include <IceUtil/Iterator.h>
 #include <IceUtil/StringUtil.h>
 #include <cstring>
 
 #include <limits>
+//
+// This class was added to support generating a listing of the files that would be
+// generated without actually generating them.
+//
+class NullJavaOutput : public Slice::JavaOutput
+{
+public:
+    NullJavaOutput() 
+    {
+    }
+
+    NullJavaOutput(std::ostream& os) :
+	Slice::JavaOutput(os)
+    {
+    }
+
+    NullJavaOutput(const char* s) :
+	Slice::JavaOutput(s)
+    {
+    }
+
+    void openClass(const std::string& cls, const std::string& prefix)
+    {
+	std::string package;
+	std::string file;
+	std::string path = prefix;
+
+	std::string::size_type pos = cls.rfind('.');
+	if(pos != std::string::npos)
+	{
+	    package = cls.substr(0, pos);
+	    file = cls.substr(pos + 1);
+	    std::string dir = package;
+
+	    //
+	    // Create package directories if necessary.
+	    //
+	    pos = 0;
+	    std::string::size_type start = 0;
+	    do
+	    {
+		if(!path.empty())
+		{
+		    path += "/";
+		}
+		pos = dir.find('.', start);
+		if(pos != std::string::npos)
+		{
+		    path += dir.substr(start, pos - start);
+		    start = pos + 1;
+		}
+		else
+		{
+		    path += dir.substr(start);
+		}
+		Slice::FileTracker::instance()->addDirectory(path);
+	    }
+	    while(pos != std::string::npos);
+	}
+	else
+	{
+	    file = cls;
+	}
+	file += ".java";
+
+	//
+	// Open class file.
+	//
+	if(!path.empty())
+	{
+	    path += "/";
+	}
+	path += file;
+
+	Slice::FileTracker::instance()->addFile(path);
+    }
+};
 
 using namespace std;
 using namespace Slice;
@@ -101,8 +179,9 @@
     return deprecateReason;
 }
 
-Slice::JavaVisitor::JavaVisitor(const string& dir) :
-    JavaGenerator(dir)
+Slice::JavaVisitor::JavaVisitor(const string& dir, bool listOnly) :
+    JavaGenerator(dir),
+    _listOnly(listOnly)
 {
 }
 
@@ -1489,6 +1568,17 @@
     }
 }
 
+Slice::JavaOutput*
+Slice::JavaVisitor::createOutput()
+{
+    if(_listOnly) 
+    {
+	return new NullJavaOutput(_os);
+    }
+
+    return JavaGenerator::createOutput();
+}
+
 StringList
 Slice::JavaVisitor::splitComment(const ContainedPtr& p)
 {
@@ -1855,11 +1945,12 @@
     }
 }
 
-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)
 {
 }
 
@@ -1872,58 +1963,58 @@
 {
     JavaGenerator::validateMetaData(p);
 
-    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, stream, _suppress);
+    TypesVisitor typesVisitor(_dir, stream, _suppress, _listOnly);
     p->visit(&typesVisitor, false);
 
-    HolderVisitor holderVisitor(_dir, stream, _suppress);
+    HolderVisitor holderVisitor(_dir, stream, _suppress, _listOnly);
     p->visit(&holderVisitor, false);
 
-    HelperVisitor helperVisitor(_dir, stream, _suppress);
+    HelperVisitor helperVisitor(_dir, stream, _suppress, _listOnly);
     p->visit(&helperVisitor, false);
 
-    ProxyVisitor proxyVisitor(_dir, _suppress);
+    ProxyVisitor proxyVisitor(_dir, _suppress, _listOnly);
     p->visit(&proxyVisitor, false);
 
-    DelegateVisitor delegateVisitor(_dir, _suppress);
+    DelegateVisitor delegateVisitor(_dir, _suppress, _listOnly);
     p->visit(&delegateVisitor, false);
 
-    DelegateMVisitor delegateMVisitor(_dir, _suppress);
+    DelegateMVisitor delegateMVisitor(_dir, _suppress, _listOnly);
     p->visit(&delegateMVisitor, false);
 
-    DelegateDVisitor delegateDVisitor(_dir, _suppress);
+    DelegateDVisitor delegateDVisitor(_dir, _suppress, _listOnly);
     p->visit(&delegateDVisitor, false);
 
-    DispatcherVisitor dispatcherVisitor(_dir, stream, _suppress);
+    DispatcherVisitor dispatcherVisitor(_dir, stream, _suppress, _listOnly);
     p->visit(&dispatcherVisitor, false);
 
-    AsyncVisitor asyncVisitor(_dir, _suppress);
+    AsyncVisitor asyncVisitor(_dir, _suppress, _listOnly);
     p->visit(&asyncVisitor, false);
 }
 
 void
 Slice::Gen::generateTie(const UnitPtr& p)
 {
-    TieVisitor tieVisitor(_dir, _suppress);
+    TieVisitor tieVisitor(_dir, _suppress, _listOnly);
     p->visit(&tieVisitor, false);
 }
 
 void
 Slice::Gen::generateImpl(const UnitPtr& p)
 {
-    ImplVisitor implVisitor(_dir);
+    ImplVisitor implVisitor(_dir, _listOnly);
     p->visit(&implVisitor, false);
 }
 
 void
 Slice::Gen::generateImplTie(const UnitPtr& p)
 {
-    ImplTieVisitor implTieVisitor(_dir);
+    ImplTieVisitor implTieVisitor(_dir, _listOnly);
     p->visit(&implTieVisitor, false);
 }
 
@@ -1982,8 +2073,8 @@
     out << nl;
 }
 
-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)
 {
 }
 
@@ -2124,8 +2215,8 @@
     close();
 }
 
-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)
 {
 }
 
@@ -2322,8 +2413,8 @@
     return false;
 }
 
-Slice::Gen::PackageVisitor::PackageVisitor(const string& dir) :
-    JavaVisitor(dir)
+Slice::Gen::PackageVisitor::PackageVisitor(const string& dir, bool listOnly) :
+    JavaVisitor(dir, listOnly)
 {
 }
 
@@ -2347,8 +2438,8 @@
     return false;
 }
 
-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)
 {
 }
 
@@ -3810,8 +3901,8 @@
     return true;
 }
 
-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)
 {
 }
 
@@ -3963,8 +4054,8 @@
     close();
 }
 
-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)
 {
 }
 
@@ -4856,8 +4947,8 @@
     }
 }
 
-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)
 {
 }
 
@@ -5034,8 +5125,8 @@
     }
 }
 
-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)
 {
 }
 
@@ -5108,8 +5199,8 @@
     return false;
 }
 
-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)
 {
 }
 
@@ -5307,8 +5398,8 @@
     return false;
 }
 
-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)
 {
 }
 
@@ -5492,8 +5583,8 @@
     return false;
 }
 
-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)
 {
 }
 
@@ -5534,8 +5625,8 @@
     return false;
 }
 
-Slice::Gen::BaseImplVisitor::BaseImplVisitor(const string& dir) :
-    JavaVisitor(dir)
+Slice::Gen::BaseImplVisitor::BaseImplVisitor(const string& dir, bool listOnly) :
+    JavaVisitor(dir, listOnly)
 {
 }
 
@@ -5788,8 +5879,8 @@
     }
 }
 
-Slice::Gen::ImplVisitor::ImplVisitor(const string& dir) :
-    BaseImplVisitor(dir)
+Slice::Gen::ImplVisitor::ImplVisitor(const string& dir, bool listOnly) :
+    BaseImplVisitor(dir, listOnly)
 {
 }
 
@@ -5846,8 +5937,8 @@
     return false;
 }
 
-Slice::Gen::ImplTieVisitor::ImplTieVisitor(const string& dir) :
-    BaseImplVisitor(dir)
+Slice::Gen::ImplTieVisitor::ImplTieVisitor(const string& dir, bool listOnly) :
+    BaseImplVisitor(dir, listOnly)
 {
 }
 
@@ -5936,8 +6027,8 @@
     return false;
 }
 
-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)
 {
 }
 

Modified: ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.h
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.h?view=diff&rev=667&r1=666&r2=667
==============================================================================
--- ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.h (original)
+++ ice/branches/hydra-modified-ice/cpp/src/slice2java/Gen.h Mon Jun  7 10:41:32 2010
@@ -25,7 +25,7 @@
 
 protected:
 
-    JavaVisitor(const std::string&);
+    JavaVisitor(const std::string&, bool listOnly);
 
     enum ParamDir { InParam, OutParam };
 
@@ -76,6 +76,8 @@
     // Generate assignment statements for those data members that have default values.
     //
     void writeDataMemberInitializers(::IceUtilInternal::Output&, const DataMemberList&, const std::string&);
+
+    JavaOutput* createOutput();
 
     //
     // Write doc comments.
@@ -90,6 +92,10 @@
     static void writeDocCommentAMI(::IceUtilInternal::Output&, const OperationPtr&, ParamDir, const std::string& = "",
                                    const std::string& = "", const std::string& = "");
     static void writeDocCommentParam(::IceUtilInternal::Output&, const OperationPtr&, ParamDir, bool = true);
+
+private:
+    bool _listOnly;
+    std::ostringstream _os;
 };
 
 class Gen : private ::IceUtil::noncopyable
@@ -100,6 +106,7 @@
         const std::string&,
         const std::vector<std::string>&,
         const std::string&,
+	bool,
 	bool);
     ~Gen();
 
@@ -115,15 +122,14 @@
     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, bool);
         virtual bool visitClassDefStart(const ClassDefPtr&);
 
     private:
@@ -135,8 +141,7 @@
     {
     public:
 
-	    TieVisitor(const std::string&, bool);
-
+        TieVisitor(const std::string&, bool, bool);
         virtual bool visitClassDefStart(const ClassDefPtr&);
 
     private:
@@ -148,7 +153,7 @@
     {
     public:
 
-        PackageVisitor(const std::string&);
+        PackageVisitor(const std::string&, bool);
 
         virtual bool visitModuleStart(const ModulePtr&);
     };
@@ -157,7 +162,7 @@
     {
     public:
 
-	    TypesVisitor(const std::string&, bool, bool);
+        TypesVisitor(const std::string&, bool, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
         virtual void visitClassDefEnd(const ClassDefPtr&);
@@ -186,7 +191,7 @@
     {
     public:
 
-	    HolderVisitor(const std::string&, bool, bool);
+        HolderVisitor(const std::string&, bool, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
         virtual bool visitStructStart(const StructPtr&);
@@ -207,7 +212,7 @@
     {
     public:
 
-	    HelperVisitor(const std::string&, bool, bool);
+        HelperVisitor(const std::string&, bool, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
         virtual bool visitStructStart(const StructPtr&);
@@ -226,7 +231,7 @@
     {
     public:
 
-	    ProxyVisitor(const std::string&, bool);
+        ProxyVisitor(const std::string&, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
         virtual void visitClassDefEnd(const ClassDefPtr&);
@@ -241,7 +246,7 @@
     {
     public:
 
-	    DelegateVisitor(const std::string&, bool);
+        DelegateVisitor(const std::string&, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
 
@@ -254,7 +259,7 @@
     {
     public:
 
-	    DelegateMVisitor(const std::string&, bool);
+        DelegateMVisitor(const std::string&, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
 
@@ -267,7 +272,7 @@
     {
     public:
 
-	    DelegateDVisitor(const std::string&, bool);
+        DelegateDVisitor(const std::string&, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
 
@@ -280,7 +285,7 @@
     {
     public:
 
-	    DispatcherVisitor(const std::string&, bool, bool);
+        DispatcherVisitor(const std::string&, bool, bool, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
 
@@ -295,7 +300,7 @@
     {
     public:
 
-        BaseImplVisitor(const std::string&);
+        BaseImplVisitor(const std::string&, bool);
 
     protected:
 
@@ -322,7 +327,7 @@
     {
     public:
 
-        ImplVisitor(const std::string&);
+        ImplVisitor(const std::string&, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
     };
@@ -331,7 +336,7 @@
     {
     public:
 
-        ImplTieVisitor(const std::string&);
+        ImplTieVisitor(const std::string&, bool);
 
         virtual bool visitClassDefStart(const ClassDefPtr&);
     };
@@ -340,7 +345,7 @@
     {
     public:
 
-	    AsyncVisitor(const std::string&, bool);
+        AsyncVisitor(const std::string&, bool, bool);
 
         virtual void visitOperation(const OperationPtr&);
 

Modified: ice/branches/hydra-modified-ice/cpp/src/slice2java/Main.cpp
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/hydra-modified-ice/cpp/src/slice2java/Main.cpp?view=diff&rev=667&r1=666&r2=667
==============================================================================
--- ice/branches/hydra-modified-ice/cpp/src/slice2java/Main.cpp (original)
+++ ice/branches/hydra-modified-ice/cpp/src/slice2java/Main.cpp Mon Jun  7 10:41:32 2010
@@ -79,6 +79,7 @@
         "--stream                Generate marshaling support for public stream API.\n"
         "--meta META             Define global metadata directive META.\n"
 	"--suppress               Suppress tagged modules from being written.\n"
+	"--classfiles            Generate a listing of the files that would be created, but do not generate them.\n"
         ;
 }
 
@@ -105,6 +106,7 @@
     opts.addOpt("", "stream");
     opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
     opts.addOpt("", "suppress");
+    opts.addOpt("", "classfiles");
 
     vector<string>args;
     try
@@ -173,6 +175,8 @@
 
     bool listGenerated = opts.isSet("list-generated");
 
+    bool listFiles = opts.isSet("classfiles");
+
     StringList globalMetadata;
     vector<string> v = opts.argVec("meta");
     copy(v.begin(), v.end(), back_inserter(globalMetadata));
@@ -189,6 +193,13 @@
     if(impl && implTie)
     {
         getErrorStream() << argv[0] << ": error: cannot specify both --impl and --impl-tie" << endl;
+        usage(argv[0]);
+        return EXIT_FAILURE;
+    }
+
+    if(!checksumClass.empty() && listFiles)
+    {
+        getErrorStream() << argv[0] << ": error: cannot specify both --checksum and --list-files" << endl;
         usage(argv[0]);
         return EXIT_FAILURE;
     }
@@ -298,7 +309,7 @@
                 {
                     try
                     {
-                        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)
                         {
@@ -320,7 +331,7 @@
                             ChecksumMap m = createChecksums(p);
                             copy(m.begin(), m.end(), inserter(checksums, checksums.begin()));
                         }
-                        if(listGenerated)
+                        if(listGenerated || listFiles)
                         {
                             FileTracker::instance()->setOutput(os.str(), false);
                         }
@@ -385,6 +396,11 @@
         FileTracker::instance()->dumpxml();
     }
 
+    if(listFiles)
+    {
+        FileTracker::instance()->dumpfiles();
+    }
+
     return status;
 }
 

Propchange: ice/branches/hydra-modified-ice/cs/src/IceBox/ServiceManagerI.cs
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -2,5 +2,7 @@
 /ice/branches/preserve-graphs/cs/src/IceBox/ServiceManagerI.cs:619-664
 /ice/branches/skipped-slice-recovery/cs/src/IceBox/ServiceManagerI.cs:565-582
 /ice/branches/slice-translator-versioning/cs/src/IceBox/ServiceManagerI.cs:645-663
+/ice/branches/slice2java-classes/cs/src/IceBox/ServiceManagerI.cs:526-666
 /ice/trunk/cs/src/IceBox/ServiceManagerI.cs:57-149
-/ice/upstream/3.4.0/cs/src/IceBox/ServiceManagerI.cs:509-510
+/ice/upstream/3.4.0/cs/src/IceBox/ServiceManagerI.cs:509-525
+/ice/upstream/3.4b/cs/src/IceBox/ServiceManagerI.cs:362-508

Propchange: ice/branches/hydra-modified-ice/java/test/Ice/slicing/exceptions/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -2,4 +2,6 @@
 /ice/branches/preserve-graphs/java/test/Ice/slicing/exceptions:619-665
 /ice/branches/skipped-slice-recovery/java/test/Ice/slicing/exceptions:565-582
 /ice/branches/slice-preserving-translators/java/test/Ice/slicing/exceptions:583-618
-/ice/upstream/3.4.0/java/test/Ice/slicing/exceptions:509-510,607
+/ice/branches/slice2java-classes/java/test/Ice/slicing/exceptions:526-666
+/ice/upstream/3.4.0/java/test/Ice/slicing/exceptions:509-525,607
+/ice/upstream/3.4b/java/test/Ice/slicing/exceptions:362-508

Propchange: ice/branches/hydra-modified-ice/scripts/TestUtil.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -3,4 +3,6 @@
 /ice/branches/skipped-slice-recovery/scripts/TestUtil.py:565-582
 /ice/branches/slice-preserving-translators/scripts/TestUtil.py:583-618
 /ice/branches/slice-translator-versioning/scripts/TestUtil.py:645-663
-/ice/upstream/3.4.0/scripts/TestUtil.py:509-510
+/ice/branches/slice2java-classes/scripts/TestUtil.py:526-666
+/ice/upstream/3.4.0/scripts/TestUtil.py:509-525
+/ice/upstream/3.4b/scripts/TestUtil.py:362-508

Propchange: ice/branches/hydra-modified-ice/slice/IceBox/IceBox.ice
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  7 10:41:32 2010
@@ -2,5 +2,7 @@
 /ice/branches/preserve-graphs/slice/IceBox/IceBox.ice:619-664
 /ice/branches/skipped-slice-recovery/slice/IceBox/IceBox.ice:565-582
 /ice/branches/slice-translator-versioning/slice/IceBox/IceBox.ice:645-663
+/ice/branches/slice2java-classes/slice/IceBox/IceBox.ice:526-666
 /ice/trunk/slice/IceBox/IceBox.ice:57-149
-/ice/upstream/3.4.0/slice/IceBox/IceBox.ice:509-510
+/ice/upstream/3.4.0/slice/IceBox/IceBox.ice:509-525
+/ice/upstream/3.4b/slice/IceBox/IceBox.ice:362-508





More information about the asterisk-scf-commits mailing list