summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2java')
-rwxr-xr-xcpp/src/slice2java/.depend.mak43
-rw-r--r--cpp/src/slice2java/Gen.cpp614
-rw-r--r--cpp/src/slice2java/Gen.h22
-rw-r--r--cpp/src/slice2java/Main.cpp6
-rw-r--r--cpp/src/slice2java/Makefile.mak50
-rw-r--r--cpp/src/slice2java/Slice2Java.rc8
-rw-r--r--cpp/src/slice2java/msbuild/slice2java.vcxproj99
-rw-r--r--cpp/src/slice2java/msbuild/slice2java.vcxproj.filters35
8 files changed, 226 insertions, 651 deletions
diff --git a/cpp/src/slice2java/.depend.mak b/cpp/src/slice2java/.depend.mak
deleted file mode 100755
index b5c1e55c3f5..00000000000
--- a/cpp/src/slice2java/.depend.mak
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Gen.obj: \
- Gen.cpp \
- "Gen.h" \
- "$(includedir)\Slice\Parser.h" \
- "$(includedir)\IceUtil\Shared.h" \
- "$(includedir)\IceUtil\Config.h" \
- "$(includedir)\IceUtil\Atomic.h" \
- "$(includedir)\IceUtil\Handle.h" \
- "$(includedir)\IceUtil\Exception.h" \
- "$(includedir)\Slice\JavaUtil.h" \
- "$(includedir)\IceUtil\OutputUtil.h" \
- "$(includedir)\Slice\Checksum.h" \
- "$(includedir)\Slice\Util.h" \
- "$(includedir)\IceUtil\Functional.h" \
- "$(includedir)\IceUtil\Iterator.h" \
- "$(includedir)\IceUtil\StringUtil.h" \
- "$(includedir)\IceUtil\InputUtil.h" \
-
-Main.obj: \
- Main.cpp \
- "$(includedir)\IceUtil\Options.h" \
- "$(includedir)\IceUtil\Config.h" \
- "$(includedir)\IceUtil\RecMutex.h" \
- "$(includedir)\IceUtil\Lock.h" \
- "$(includedir)\IceUtil\ThreadException.h" \
- "$(includedir)\IceUtil\Exception.h" \
- "$(includedir)\IceUtil\Time.h" \
- "$(includedir)\IceUtil\MutexProtocol.h" \
- "$(includedir)\IceUtil\Shared.h" \
- "$(includedir)\IceUtil\Atomic.h" \
- "$(includedir)\IceUtil\Handle.h" \
- "$(includedir)\IceUtil\CtrlCHandler.h" \
- "$(includedir)\IceUtil\Mutex.h" \
- "$(includedir)\IceUtil\MutexPtrLock.h" \
- "$(includedir)\Slice\Preprocessor.h" \
- "$(includedir)\Slice\FileTracker.h" \
- "$(includedir)\Slice\Parser.h" \
- "$(includedir)\Slice\Util.h" \
- "$(includedir)\IceUtil\OutputUtil.h" \
- "Gen.h" \
- "$(includedir)\Slice\JavaUtil.h" \
- "$(includedir)\Slice\Checksum.h" \
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 608a492c31f..4c3a91cd463 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -124,6 +124,7 @@ initValue(const TypePtr& p)
case Builtin::KindObject:
case Builtin::KindObjectProxy:
case Builtin::KindLocalObject:
+ case Builtin::KindValue:
{
return "null";
}
@@ -760,7 +761,7 @@ Slice::JavaVisitor::writeMarshalDataMember(Output& out, const string& package, c
}
else
{
- out << nl << "if(__has_" << member->name() << " && __os.writeOpt(" << member->tag() << ", "
+ out << nl << "if(__has_" << member->name() << " && __os.writeOptional(" << member->tag() << ", "
<< getOptionalFormat(member->type()) << "))";
out << sb;
writeMarshalUnmarshalCode(out, package, member->type(), OptionalMember, false, 0, fixKwd(member->name()), true,
@@ -792,7 +793,7 @@ Slice::JavaVisitor::writeUnmarshalDataMember(Output& out, const string& package,
}
else
{
- out << nl << "if(__has_" << member->name() << " = __is.readOpt(" << member->tag() << ", "
+ out << nl << "if(__has_" << member->name() << " = __is.readOptional(" << member->tag() << ", "
<< getOptionalFormat(member->type()) << "))";
out << sb;
writeMarshalUnmarshalCode(out, package, member->type(), OptionalMember, false, 0, fixKwd(member->name()), false,
@@ -802,66 +803,10 @@ Slice::JavaVisitor::writeUnmarshalDataMember(Output& out, const string& package,
}
void
-Slice::JavaVisitor::writeStreamMarshalDataMember(Output& out, const string& package, const DataMemberPtr& member,
- int& iter)
-{
- if(!member->optional())
- {
- writeStreamMarshalUnmarshalCode(out, package, member->type(), false, 0, fixKwd(member->name()), true,
- iter, false, member->getMetaData());
- }
- else
- {
- out << nl << "if(__has_" << member->name() << " && __outS.writeOptional(" << member->tag() << ", "
- << getOptionalFormat(member->type()) << "))";
- out << sb;
- writeStreamMarshalUnmarshalCode(out, package, member->type(), true, member->tag(), fixKwd(member->name()),
- true, iter, false, member->getMetaData());
- out << eb;
- }
-}
-
-void
-Slice::JavaVisitor::writeStreamUnmarshalDataMember(Output& out, const string& package, const DataMemberPtr& member,
- int& iter, bool needPatcher, int& patchIter)
-{
- string patchParams;
- if(needPatcher)
- {
- BuiltinPtr builtin = BuiltinPtr::dynamicCast(member->type());
- if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(member->type()))
- {
- ostringstream ostr;
- ostr << "new Patcher(" << patchIter++ << ')';
- patchParams = ostr.str();
- }
- }
-
- if(!member->optional())
- {
- writeStreamMarshalUnmarshalCode(out, package, member->type(), false, 0, fixKwd(member->name()), false,
- iter, false, member->getMetaData(), patchParams);
- }
- else
- {
- out << nl << "if(__has_" << member->name() << " = __inS.readOptional(" << member->tag() << ", "
- << getOptionalFormat(member->type()) << "))";
- out << sb;
- writeStreamMarshalUnmarshalCode(out, package, member->type(), true, member->tag(), fixKwd(member->name()),
- false, iter, false, member->getMetaData(), patchParams);
- out << eb;
- }
-}
-
-void
Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataMemberList& classMembers,
- const DataMemberList& optionalMembers, bool stream)
+ const DataMemberList& optionalMembers)
{
- out << sp << nl << "private class Patcher implements IceInternal.Patcher";
- if(stream)
- {
- out << ", Ice.ReadObjectCallback";
- }
+ out << sp << nl << "private class Patcher implements Ice.ReadObjectCallback";
out << sb;
if(classMembers.size() > 1)
{
@@ -871,7 +816,7 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM
out << eb;
}
- out << sp << nl << "public void" << nl << "patch(Ice.Object v)";
+ out << sp << nl << "public void" << nl << "objectReady(Ice.Object v)";
out << sb;
if(classMembers.size() > 1)
{
@@ -1008,14 +953,6 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM
}
out << eb;
- if(stream)
- {
- out << sp << nl << "public void" << nl << "invoke(Ice.Object v)";
- out << sb;
- out << nl << "patch(v);";
- out << eb;
- }
-
if(classMembers.size() > 1)
{
out << sp << nl << "private int __member;";
@@ -1026,7 +963,7 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM
}
void
-Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& p, bool stream)
+Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
@@ -1294,7 +1231,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
//
// Unmarshal 'in' parameters.
//
- out << nl << "IceInternal.BasicStream __is = __inS.startReadParams();";
+ out << nl << "Ice.InputStream __is = __inS.startReadParams();";
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
TypePtr paramType = (*pli)->type();
@@ -1386,7 +1323,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
//
if(!outParams.empty() || ret)
{
- out << nl << "IceInternal.BasicStream __os = __inS.__startWriteParams("
+ out << nl << "Ice.OutputStream __os = __inS.__startWriteParams("
<< opFormatTypeToString(op) << ");";
writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true);
if(op->returnsClasses(false))
@@ -1441,7 +1378,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
//
// Unmarshal 'in' parameters.
//
- out << nl << "IceInternal.BasicStream __is = __inS.startReadParams();";
+ out << nl << "Ice.InputStream __is = __inS.startReadParams();";
iter = 0;
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
@@ -1686,48 +1623,24 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
if(preserved && !basePreserved)
{
- out << sp << nl << "public void __write(IceInternal.BasicStream __os)";
+ out << sp << nl << "public void __write(Ice.OutputStream __os)";
out << sb;
- out << nl << "__os.startWriteObject(__slicedData);";
+ out << nl << "__os.startObject(__slicedData);";
out << nl << "__writeImpl(__os);";
- out << nl << "__os.endWriteObject();";
+ out << nl << "__os.endObject();";
out << eb;
- out << sp << nl << "public void __read(IceInternal.BasicStream __is)";
+ out << sp << nl << "public void __read(Ice.InputStream __is)";
out << sb;
- out << nl << "__is.startReadObject();";
+ out << nl << "__is.startObject();";
out << nl << "__readImpl(__is);";
- out << nl << "__slicedData = __is.endReadObject(true);";
+ out << nl << "__slicedData = __is.endObject(true);";
out << eb;
-
- if(stream)
- {
- out << sp << nl << "public void __write(Ice.OutputStream __outS)";
- out << sb;
- if(preserved)
- {
- out << nl << "__outS.startObject(__slicedData);";
- }
- else
- {
- out << nl << "__outS.startObject(null);";
- }
- out << nl << "__writeImpl(__outS);";
- out << nl << "__outS.endObject();";
- out << eb;
-
- out << sp << nl << "public void __read(Ice.InputStream __inS)";
- out << sb;
- out << nl << "__inS.startObject();";
- out << nl << "__readImpl(__inS);";
- out << nl << "__slicedData = __inS.endObject(true);";
- out << eb;
- }
}
- out << sp << nl << "protected void __writeImpl(IceInternal.BasicStream __os)";
+ out << sp << nl << "protected void __writeImpl(Ice.OutputStream __os)";
out << sb;
- out << nl << "__os.startWriteSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
+ out << nl << "__os.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
iter = 0;
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
{
@@ -1740,7 +1653,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
{
writeMarshalDataMember(out, package, *d, iter);
}
- out << nl << "__os.endWriteSlice();";
+ out << nl << "__os.endSlice();";
if(base)
{
out << nl << "super.__writeImpl(__os);";
@@ -1752,12 +1665,12 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
if(classMembers.size() != 0)
{
- writePatcher(out, package, classMembers, optionalMembers, stream);
+ writePatcher(out, package, classMembers, optionalMembers);
}
- out << sp << nl << "protected void __readImpl(IceInternal.BasicStream __is)";
+ out << sp << nl << "protected void __readImpl(Ice.InputStream __is)";
out << sb;
- out << nl << "__is.startReadSlice();";
+ out << nl << "__is.startSlice();";
int patchIter = 0;
const bool needCustomPatcher = classMembers.size() > 1;
@@ -1773,61 +1686,13 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr&
{
writeUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
}
- out << nl << "__is.endReadSlice();";
+ out << nl << "__is.endSlice();";
if(base)
{
out << nl << "super.__readImpl(__is);";
}
out << eb;
- if(stream)
- {
- out << sp << nl << "protected void __writeImpl(Ice.OutputStream __outS)";
- out << sb;
- out << nl << "__outS.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
- iter = 0;
- for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
- {
- if(!(*d)->optional())
- {
- writeStreamMarshalDataMember(out, package, *d, iter);
- }
- }
- for(DataMemberList::const_iterator d = optionalMembers.begin(); d != optionalMembers.end(); ++d)
- {
- writeStreamMarshalDataMember(out, package, *d, iter);
- }
- out << nl << "__outS.endSlice();";
- if(base)
- {
- out << nl << "super.__writeImpl(__outS);";
- }
- out << eb;
-
- out << sp << nl << "protected void __readImpl(Ice.InputStream __inS)";
- out << sb;
- out << nl << "__inS.startSlice();";
- iter = 0;
- patchIter = 0;
- for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
- {
- if(!(*d)->optional())
- {
- writeStreamUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
- }
- }
- for(DataMemberList::const_iterator d = optionalMembers.begin(); d != optionalMembers.end(); ++d)
- {
- writeStreamUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
- }
- out << nl << "__inS.endSlice();";
- if(base)
- {
- out << nl << "super.__readImpl(__inS);";
- }
- out << eb;
- }
-
if(preserved && !basePreserved)
{
out << sp << nl << "protected Ice.SlicedData __slicedData;";
@@ -1938,6 +1803,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
case Builtin::KindObject:
case Builtin::KindObjectProxy:
case Builtin::KindLocalObject:
+ case Builtin::KindValue:
{
out << value;
break;
@@ -2395,7 +2261,7 @@ Slice::Gen::~Gen()
}
void
-Slice::Gen::generate(const UnitPtr& p, bool stream)
+Slice::Gen::generate(const UnitPtr& p)
{
JavaGenerator::validateMetaData(p);
@@ -2405,7 +2271,7 @@ Slice::Gen::generate(const UnitPtr& p, bool stream)
PackageVisitor packageVisitor(_dir);
p->visit(&packageVisitor, false);
- TypesVisitor typesVisitor(_dir, stream);
+ TypesVisitor typesVisitor(_dir);
p->visit(&typesVisitor, false);
CompactIdVisitor compactIdVisitor(_dir);
@@ -2414,13 +2280,13 @@ Slice::Gen::generate(const UnitPtr& p, bool stream)
HolderVisitor holderVisitor(_dir);
p->visit(&holderVisitor, false);
- HelperVisitor helperVisitor(_dir, stream);
+ HelperVisitor helperVisitor(_dir);
p->visit(&helperVisitor, false);
ProxyVisitor proxyVisitor(_dir);
p->visit(&proxyVisitor, false);
- DispatcherVisitor dispatcherVisitor(_dir, stream);
+ DispatcherVisitor dispatcherVisitor(_dir);
p->visit(&dispatcherVisitor, false);
AsyncVisitor asyncVisitor(_dir);
@@ -2882,8 +2748,8 @@ Slice::Gen::PackageVisitor::visitModuleStart(const ModulePtr& p)
return false;
}
-Slice::Gen::TypesVisitor::TypesVisitor(const string& dir, bool stream) :
- JavaVisitor(dir), _stream(stream)
+Slice::Gen::TypesVisitor::TypesVisitor(const string& dir) :
+ JavaVisitor(dir)
{
}
@@ -3071,9 +2937,9 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << ';';
//
- // Generate asynchronous API for local operations marked with "async" metadata.
+ // Generate asynchronous API for local operations marked with "async-oneway" metadata.
//
- if(p->hasMetaData("async") || op->hasMetaData("async"))
+ if(p->hasMetaData("async-oneway") || op->hasMetaData("async-oneway"))
{
vector<string> inParams = getInOutParams(op, package, InParam, true, true);
@@ -3275,20 +3141,17 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isInterface() && p->allOperations().size() == 0 && !p->isLocal())
{
out << sp;
- out << nl << "private static class __F implements Ice.ObjectFactory";
+ out << nl << "private static class __F implements Ice.ValueFactory";
out << sb;
out << nl << "public Ice.Object create(String type)";
out << sb;
out << nl << "assert(type.equals(ice_staticId()));";
out << nl << "return new " << fixKwd(name) << "();";
out << eb;
- out << sp << nl << "public void destroy()";
- out << sb;
- out << eb;
out << eb;
- out << nl << "private static Ice.ObjectFactory _factory = new __F();";
+ out << nl << "private static Ice.ValueFactory _factory = new __F();";
out << sp;
- out << nl << "public static Ice.ObjectFactory" << nl << "ice_factory()";
+ out << nl << "public static Ice.ValueFactory" << nl << "ice_factory()";
out << sb;
out << nl << "return _factory;";
out << eb;
@@ -3299,7 +3162,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
//
if(!p->isInterface() && !p->isLocal())
{
- writeDispatchAndMarshalling(out, p, _stream);
+ writeDispatchAndMarshalling(out, p);
}
return true;
@@ -3654,9 +3517,9 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
}
- out << sp << nl << "public String" << nl << "ice_name()";
+ out << sp << nl << "public String" << nl << "ice_id()";
out << sb;
- out << nl << "return \"" << scoped.substr(2) << "\";";
+ out << nl << "return \"" << scoped << "\";";
out << eb;
return true;
@@ -3683,41 +3546,24 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "public void" << nl << "__write(IceInternal.BasicStream __os)";
+ out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __os)";
out << sb;
- out << nl << "__os.startWriteException(__slicedData);";
+ out << nl << "__os.startException(__slicedData);";
out << nl << "__writeImpl(__os);";
- out << nl << "__os.endWriteException();";
+ out << nl << "__os.endException();";
out << eb;
- out << sp << nl << "public void" << nl << "__read(IceInternal.BasicStream __is)";
+ out << sp << nl << "public void" << nl << "__read(Ice.InputStream __is)";
out << sb;
- out << nl << "__is.startReadException();";
+ out << nl << "__is.startException();";
out << nl << "__readImpl(__is);";
- out << nl << "__slicedData = __is.endReadException(true);";
+ out << nl << "__slicedData = __is.endException(true);";
out << eb;
-
- if(_stream)
- {
- out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __outS)";
- out << sb;
- out << nl << "__outS.startException(__slicedData);";
- out << nl << "__writeImpl(__outS);";
- out << nl << "__outS.endException();";
- out << eb;
-
- out << sp << nl << "public void" << nl << "__read(Ice.InputStream __inS)";
- out << sb;
- out << nl << "__inS.startException();";
- out << nl << "__readImpl(__inS);";
- out << nl << "__slicedData = __inS.endException(true);";
- out << eb;
- }
}
- out << sp << nl << "protected void" << nl << "__writeImpl(IceInternal.BasicStream __os)";
+ out << sp << nl << "protected void" << nl << "__writeImpl(Ice.OutputStream __os)";
out << sb;
- out << nl << "__os.startWriteSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
+ out << nl << "__os.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
iter = 0;
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
{
@@ -3730,7 +3576,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
writeMarshalDataMember(out, package, *d, iter);
}
- out << nl << "__os.endWriteSlice();";
+ out << nl << "__os.endSlice();";
if(base)
{
out << nl << "super.__writeImpl(__os);";
@@ -3742,11 +3588,11 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(classMembers.size() != 0)
{
- writePatcher(out, package, classMembers, optionalMembers, _stream);
+ writePatcher(out, package, classMembers, optionalMembers);
}
- out << sp << nl << "protected void" << nl << "__readImpl(IceInternal.BasicStream __is)";
+ out << sp << nl << "protected void" << nl << "__readImpl(Ice.InputStream __is)";
out << sb;
- out << nl << "__is.startReadSlice();";
+ out << nl << "__is.startSlice();";
iter = 0;
int patchIter = 0;
const bool needCustomPatcher = classMembers.size() > 1;
@@ -3761,61 +3607,13 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
writeUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
}
- out << nl << "__is.endReadSlice();";
+ out << nl << "__is.endSlice();";
if(base)
{
out << nl << "super.__readImpl(__is);";
}
out << eb;
- if(_stream)
- {
- out << sp << nl << "protected void" << nl << "__writeImpl(Ice.OutputStream __outS)";
- out << sb;
- out << nl << "__outS.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
- iter = 0;
- for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
- {
- if(!(*d)->optional())
- {
- writeStreamMarshalDataMember(out, package, *d, iter);
- }
- }
- for(DataMemberList::const_iterator d = optionalMembers.begin(); d != optionalMembers.end(); ++d)
- {
- writeStreamMarshalDataMember(out, package, *d, iter);
- }
- out << nl << "__outS.endSlice();";
- if(base)
- {
- out << nl << "super.__writeImpl(__outS);";
- }
- out << eb;
-
- out << sp << nl << "protected void" << nl << "__readImpl(Ice.InputStream __inS)";
- out << sb;
- out << nl << "__inS.startSlice();";
- iter = 0;
- patchIter = 0;
- for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
- {
- if(!(*d)->optional())
- {
- writeStreamUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
- }
- }
- for(DataMemberList::const_iterator d = optionalMembers.begin(); d != optionalMembers.end(); ++d)
- {
- writeStreamUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
- }
- out << nl << "__inS.endSlice();";
- if(base)
- {
- out << nl << "super.__readImpl(__inS);";
- }
- out << eb;
- }
-
if(p->usesClasses(false))
{
if(!base || (base && !base->usesClasses(false)))
@@ -3979,6 +3777,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
case Builtin::KindObject:
case Builtin::KindObjectProxy:
case Builtin::KindLocalObject:
+ case Builtin::KindValue:
{
out << nl << "if(" << memberName << " != _r." << memberName << ')';
out << sb;
@@ -4074,7 +3873,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void" << nl << "__write(IceInternal.BasicStream __os)";
+ out << sp << nl << "public void" << nl << "ice_write(Ice.OutputStream __os)";
out << sb;
iter = 0;
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
@@ -4087,10 +3886,10 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(classMembers.size() != 0)
{
- writePatcher(out, package, classMembers, DataMemberList(), _stream);
+ writePatcher(out, package, classMembers, DataMemberList());
}
- out << sp << nl << "public void" << nl << "__read(IceInternal.BasicStream __is)";
+ out << sp << nl << "public void" << nl << "ice_read(Ice.InputStream __is)";
out << sb;
iter = 0;
int patchIter = 0;
@@ -4101,75 +3900,28 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
}
out << eb;
- if(_stream)
- {
- out << sp << nl << "public void" << nl << "ice_write(Ice.OutputStream __outS)";
- out << sb;
- iter = 0;
- for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
- {
- writeStreamMarshalDataMember(out, package, *d, iter);
- }
- out << eb;
-
- out << sp << nl << "public void" << nl << "ice_read(Ice.InputStream __inS)";
- out << sb;
- iter = 0;
- patchIter = 0;
- for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
- {
- writeStreamUnmarshalDataMember(out, package, *d, iter, needCustomPatcher, patchIter);
- }
- out << eb;
- }
-
- out << sp << nl << "static public void" << nl << "__write(IceInternal.BasicStream __os, " << name << " __v)";
+ out << sp << nl << "static public void" << nl << "ice_write(Ice.OutputStream __os, " << name << " __v)";
out << sb;
out << nl << "if(__v == null)";
out << sb;
- out << nl << "__nullMarshalValue.__write(__os);";
+ out << nl << "__nullMarshalValue.ice_write(__os);";
out << eb;
out << nl << "else";
out << sb;
- out << nl << "__v.__write(__os);";
+ out << nl << "__v.ice_write(__os);";
out << eb;
out << eb;
- out << sp << nl << "static public " << name << nl << "__read(IceInternal.BasicStream __is, " << name << " __v)";
+ out << sp << nl << "static public " << name << nl << "ice_read(Ice.InputStream __is, " << name << " __v)";
out << sb;
out << nl << "if(__v == null)";
out << sb;
out << nl << " __v = new " << name << "();";
out << eb;
- out << nl << "__v.__read(__is);";
+ out << nl << "__v.ice_read(__is);";
out << nl << "return __v;";
out << eb;
- if(_stream)
- {
- out << sp << nl << "static public void" << nl << "ice_write(Ice.OutputStream __outS, " << name << " __v)";
- out << sb;
- out << nl << "if(__v == null)";
- out << sb;
- out << nl << "__nullMarshalValue.ice_write(__outS);";
- out << eb;
- out << nl << "else";
- out << sb;
- out << nl << "__v.ice_write(__outS);";
- out << eb;
- out << eb;
-
- out << sp << nl << "static public " << name << nl << "ice_read(Ice.InputStream __inS, " << name << " __v)";
- out << sb;
- out << nl << "if(__v == null)";
- out << sb;
- out << nl << " __v = new " << name << "();";
- out << eb;
- out << nl << "__v.ice_read(__inS);";
- out << nl << "return __v;";
- out << eb;
- }
-
out << nl << nl << "private static final " << name << " __nullMarshalValue = new " << name << "();";
}
@@ -4539,12 +4291,12 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void" << nl << "__write(IceInternal.BasicStream __os)";
+ out << sp << nl << "public void" << nl << "ice_write(Ice.OutputStream __os)";
out << sb;
out << nl << "__os.writeEnum(value(), " << p->maxValue() << ");";
out << eb;
- out << sp << nl << "public static void" << nl << "__write(IceInternal.BasicStream __os, " << name << " __v)";
+ out << sp << nl << "public static void" << nl << "ice_write(Ice.OutputStream __os, " << name << " __v)";
out << sb;
out << nl << "if(__v == null)";
out << sb;
@@ -4557,38 +4309,12 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << eb;
- out << sp << nl << "public static " << name << nl << "__read(IceInternal.BasicStream __is)";
+ out << sp << nl << "public static " << name << nl << "ice_read(Ice.InputStream __is)";
out << sb;
out << nl << "int __v = __is.readEnum(" << p->maxValue() << ");";
out << nl << "return __validate(__v);";
out << eb;
- if(_stream)
- {
- out << sp << nl << "public void" << nl << "ice_write(Ice.OutputStream __outS)";
- out << sb;
- out << nl << "__outS.writeEnum(value(), " << p->maxValue() << ");";
- out << eb;
-
- out << sp << nl << "public static void" << nl << "ice_write(Ice.OutputStream __outS, " << name << " __v)";
- out << sb;
- out << nl << "if(__v == null)";
- out << sb;
- out << nl << "__outS.writeEnum(" << absolute << '.' << firstEnum << ".value(), " << p->maxValue() << ");";
- out << eb;
- out << nl << "else";
- out << sb;
- out << nl << "__outS.writeEnum(__v.value(), " << p->maxValue() << ");";
- out << eb;
- out << eb;
-
- out << sp << nl << "public static " << name << nl << "ice_read(Ice.InputStream __inS)";
- out << sb;
- out << nl << "int __v = __inS.readEnum(" << p->maxValue() << ");";
- out << nl << "return __validate(__v);";
- out << eb;
- }
-
out << sp << nl << "private static " << name
<< nl << "__validate(int __v)";
out << sb;
@@ -4786,7 +4512,7 @@ Slice::Gen::HolderVisitor::writeHolder(const TypePtr& p)
out << eb;
out << sp << nl << "public void";
- out << nl << "patch(Ice.Object v)";
+ out << nl << "objectReady(Ice.Object v)";
out << sb;
out << nl << "if(v == null || v instanceof " << typeS << ")";
out << sb;
@@ -4830,8 +4556,8 @@ Slice::Gen::HolderVisitor::writeHolder(const TypePtr& p)
close();
}
-Slice::Gen::HelperVisitor::HelperVisitor(const string& dir, bool stream) :
- JavaVisitor(dir), _stream(stream)
+Slice::Gen::HelperVisitor::HelperVisitor(const string& dir) :
+ JavaVisitor(dir)
{
}
@@ -4943,13 +4669,13 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
out << nl << "catch(Ice.UserException __ex)";
out << sb;
- out << nl << "throw new Ice.UnknownUserException(__ex.ice_name(), __ex);";
+ out << nl << "throw new Ice.UnknownUserException(__ex.ice_id(), __ex);";
out << eb;
out << eb;
if(ret || !outParams.empty())
{
- out << nl << "IceInternal.BasicStream __is = __result.startReadParams();";
+ out << nl << "Ice.InputStream __is = __result.startReadParams();";
const ParamDeclList paramList = op->parameters();
ParamDeclList pl;
for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
@@ -5157,12 +4883,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "return __ids[" << scopedPos << "];";
out << eb;
- out << sp << nl << "public static void __write(IceInternal.BasicStream __os, " << name << "Prx v)";
+ out << sp << nl << "public static void __write(Ice.OutputStream __os, " << name << "Prx v)";
out << sb;
out << nl << "__os.writeProxy(v);";
out << eb;
- out << sp << nl << "public static " << name << "Prx __read(IceInternal.BasicStream __is)";
+ out << sp << nl << "public static " << name << "Prx __read(Ice.InputStream __is)";
out << sb;
out << nl << "Ice.ObjectPrx proxy = __is.readProxy();";
out << nl << "if(proxy != null)";
@@ -5174,31 +4900,6 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "return null;";
out << eb;
- if(_stream)
- {
- out << sp << nl << "public static void write(Ice.OutputStream __outS, " << name << "Prx v)";
- out << sb;
- out << nl << "__outS.writeProxy(v);";
- out << eb;
-
- out << sp << nl << "public static " << name << "Prx read(Ice.InputStream __inS)";
- out << sb;
- out << nl << "Ice.ObjectPrx proxy = __inS.readProxy();";
- out << nl << "if(proxy != null)";
- out << sb;
- out << nl << name << "PrxHelper result = new " << name << "PrxHelper();";
- out << nl << "result.__copyFrom(proxy);";
- out << nl << "return result;";
- out << eb;
- out << nl << "return null;";
- out << eb;
-
- out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
- out << sb;
- out << nl << "return Ice.OptionalFormat.FSize;";
- out << eb;
- }
-
//
// Avoid serialVersionUID warnings for Proxy Helper classes.
//
@@ -5207,76 +4908,6 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
close();
- if(_stream)
- {
- //
- // Class helper.
- //
- open(getAbsolute(p, "", "", "Helper"), p->file());
-
- Output& out2 = output();
-
- out2 << sp << nl << "public final class " << name << "Helper";
- out2 << sb;
-
- out2 << sp << nl << "public static void write(Ice.OutputStream __outS, " << fixKwd(name) << " __v)";
- out2 << sb;
- out2 << nl << "__outS.writeObject(__v);";
- out2 << eb;
-
- out2 << sp << nl << "public static void read(Ice.InputStream __inS, " << name << "Holder __h)";
- out2 << sb;
- out2 << nl << "__inS.readObject(__h);";
- out2 << eb;
-
- out2 << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
- out2 << sb;
- out2 << nl << "return " << getOptionalFormat(p->declaration()) << ';';
- out2 << eb;
-
- out2 << eb;
- close();
- }
-
- return false;
-}
-
-bool
-Slice::Gen::HelperVisitor::visitStructStart(const StructPtr& p)
-{
- if(!p->isLocal() && _stream)
- {
- string name = p->name();
- string fixedName = fixKwd(name);
-
- open(getAbsolute(p, "", "", "Helper"), p->file());
-
- Output& out = output();
-
- out << sp << nl << "public final class " << name << "Helper";
- out << sb;
-
- out << sp << nl << "public static void write(Ice.OutputStream __outS, " << fixedName << " __v)";
- out << sb;
- out << nl << "__v.ice_write(__outS);";
- out << eb;
-
- out << sp << nl << "public static " << fixedName << " read(Ice.InputStream __inS)";
- out << sb;
- out << nl << fixedName << " __v = new " << fixedName << "();";
- out << nl << "__v.ice_read(__inS);";
- out << nl << "return __v;";
- out << eb;
-
- out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
- out << sb;
- out << nl << "return " << getOptionalFormat(p) << ';';
- out << eb;
-
- out << eb;
- close();
- }
-
return false;
}
@@ -5370,7 +5001,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void" << nl << "write(IceInternal.BasicStream __os, " << typeS << " __v)";
+ out << nl << "public static void" << nl << "write(Ice.OutputStream __os, " << typeS << " __v)";
out << sb;
iter = 0;
writeSequenceMarshalUnmarshalCode(out, package, p, "__v", true, iter, false);
@@ -5381,7 +5012,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
{
out << nl << "@SuppressWarnings(\"unchecked\")";
}
- out << nl << "public static " << typeS << nl << "read(IceInternal.BasicStream __is)";
+ out << nl << "public static " << typeS << nl << "read(Ice.InputStream __is)";
out << sb;
out << nl << typeS << " __v;";
iter = 0;
@@ -5389,33 +5020,6 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << nl << "return __v;";
out << eb;
- if(_stream)
- {
- out << sp << nl << "public static void write(Ice.OutputStream __outS, " << typeS << " __v)";
- out << sb;
- iter = 0;
- writeStreamSequenceMarshalUnmarshalCode(out, package, p, "__v", true, iter, false);
- out << eb;
-
- out << sp;
- if(suppressUnchecked)
- {
- out << nl << "@SuppressWarnings(\"unchecked\")";
- }
- out << nl << "public static " << typeS << " read(Ice.InputStream __inS)";
- out << sb;
- out << nl << typeS << " __v;";
- iter = 0;
- writeStreamSequenceMarshalUnmarshalCode(out, package, p, "__v", false, iter, false);
- out << nl << "return __v;";
- out << eb;
-
- out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
- out << sb;
- out << nl << "return " << getOptionalFormat(p) << ';';
- out << eb;
- }
-
out << eb;
close();
}
@@ -5449,14 +5053,14 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void" << nl << "write(IceInternal.BasicStream __os, " << formalType << " __v)";
+ out << nl << "public static void" << nl << "write(Ice.OutputStream __os, " << formalType << " __v)";
out << sb;
iter = 0;
writeDictionaryMarshalUnmarshalCode(out, package, p, "__v", true, iter, false);
out << eb;
out << sp << nl << "public static " << formalType
- << nl << "read(IceInternal.BasicStream __is)";
+ << nl << "read(Ice.InputStream __is)";
out << sb;
out << nl << formalType << " __v;";
iter = 0;
@@ -5464,69 +5068,11 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << nl << "return __v;";
out << eb;
- if(_stream)
- {
- out << sp << nl << "public static void write(Ice.OutputStream __outS, " << formalType
- << " __v)";
- out << sb;
- iter = 0;
- writeStreamDictionaryMarshalUnmarshalCode(out, package, p, "__v", true, iter, false);
- out << eb;
-
- out << sp << nl << "public static " << formalType << " read(Ice.InputStream __inS)";
- out << sb;
- out << nl << formalType << " __v;";
- iter = 0;
- writeStreamDictionaryMarshalUnmarshalCode(out, package, p, "__v", false, iter, false);
- out << nl << "return __v;";
- out << eb;
-
- out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
- out << sb;
- out << nl << "return " << getOptionalFormat(p) << ';';
- out << eb;
- }
-
out << eb;
close();
}
void
-Slice::Gen::HelperVisitor::visitEnum(const EnumPtr& p)
-{
- if(!p->isLocal() && _stream)
- {
- string name = p->name();
- string fixedName = fixKwd(name);
-
- open(getAbsolute(p, "", "", "Helper"), p->file());
-
- Output& out = output();
-
- out << sp << nl << "public final class " << name << "Helper";
- out << sb;
-
- out << sp << nl << "public static void write(Ice.OutputStream __outS, " << fixedName << " __v)";
- out << sb;
- out << nl << "__v.ice_write(__outS);";
- out << eb;
-
- out << sp << nl << "public static " << fixedName << " read(Ice.InputStream __inS)";
- out << sb;
- out << nl << "return " << fixedName << ".ice_read(__inS);";
- out << eb;
-
- out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
- out << sb;
- out << nl << "return " << getOptionalFormat(p) << ';';
- out << eb;
-
- out << eb;
- close();
- }
-}
-
-void
Slice::Gen::HelperVisitor::writeOperation(const ClassDefPtr& p, const string& package, const OperationPtr& op,
bool optionalMapping)
{
@@ -5875,7 +5421,7 @@ Slice::Gen::HelperVisitor::writeOperation(const ClassDefPtr& p, const string& pa
iter = 0;
if(!inArgs.empty())
{
- out << nl << "IceInternal.BasicStream __os = __result.startWriteParams("
+ out << nl << "Ice.OutputStream __os = __result.startWriteParams("
<< opFormatTypeToString(op) << ");";
ParamDeclList pl;
for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
@@ -6211,8 +5757,8 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
}
}
-Slice::Gen::DispatcherVisitor::DispatcherVisitor(const string& dir, bool stream) :
- JavaVisitor(dir), _stream(stream)
+Slice::Gen::DispatcherVisitor::DispatcherVisitor(const string& dir) :
+ JavaVisitor(dir)
{
}
@@ -6245,7 +5791,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "throw new java.lang.CloneNotSupportedException();";
out << eb;
- writeDispatchAndMarshalling(out, p, _stream);
+ writeDispatchAndMarshalling(out, p);
//
// Avoid serialVersionUID warnings for dispatch classes.
@@ -6319,6 +5865,7 @@ Slice::Gen::BaseImplVisitor::writeDecl(Output& out, const string& package, const
case Builtin::KindObject:
case Builtin::KindObjectProxy:
case Builtin::KindLocalObject:
+ case Builtin::KindValue:
{
out << " = null";
break;
@@ -6392,6 +5939,7 @@ Slice::Gen::BaseImplVisitor::writeReturn(Output& out, const TypePtr& type, bool
case Builtin::KindObject:
case Builtin::KindObjectProxy:
case Builtin::KindLocalObject:
+ case Builtin::KindValue:
{
out << nl << "return null;";
break;
@@ -6848,7 +6396,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
{
out << nl << "try";
out << sb;
- out << nl << "IceInternal.BasicStream __os = this.__startWriteParams("
+ out << nl << "Ice.OutputStream __os = this.__startWriteParams("
<< opFormatTypeToString(p) << ");";
writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false);
if(p->returnsClasses(false))
diff --git a/cpp/src/slice2java/Gen.h b/cpp/src/slice2java/Gen.h
index 2617eb9905e..1b65bf71f9b 100644
--- a/cpp/src/slice2java/Gen.h
+++ b/cpp/src/slice2java/Gen.h
@@ -86,12 +86,12 @@ protected:
//
// Generate a patcher class.
//
- void writePatcher(::IceUtilInternal::Output&, const std::string&, const DataMemberList&, const DataMemberList&, bool);
+ void writePatcher(::IceUtilInternal::Output&, const std::string&, const DataMemberList&, const DataMemberList&);
//
// Generate dispatch and marshalling methods for a class or interface.
//
- void writeDispatchAndMarshalling(::IceUtilInternal::Output&, const ClassDefPtr&, bool);
+ void writeDispatchAndMarshalling(::IceUtilInternal::Output&, const ClassDefPtr&);
//
// Write a constant or default value initializer.
@@ -129,7 +129,7 @@ public:
const std::string&);
~Gen();
- void generate(const UnitPtr&, bool);
+ void generate(const UnitPtr&);
void generateTie(const UnitPtr&);
void generateImpl(const UnitPtr&);
void generateImplTie(const UnitPtr&);
@@ -176,7 +176,7 @@ private:
{
public:
- TypesVisitor(const std::string&, bool);
+ TypesVisitor(const std::string&);
virtual bool visitClassDefStart(const ClassDefPtr&);
virtual void visitClassDefEnd(const ClassDefPtr&);
@@ -194,8 +194,6 @@ private:
// Verifies that a data member method does not conflict with an operation.
//
bool validateMethod(const OperationList&, const std::string&, int, const std::string&, const std::string&);
-
- bool _stream;
};
class CompactIdVisitor : public JavaVisitor
@@ -228,19 +226,15 @@ private:
{
public:
- HelperVisitor(const std::string&, bool);
+ HelperVisitor(const std::string&);
virtual bool visitClassDefStart(const ClassDefPtr&);
- virtual bool visitStructStart(const StructPtr&);
virtual void visitSequence(const SequencePtr&);
virtual void visitDictionary(const DictionaryPtr&);
- virtual void visitEnum(const EnumPtr&);
private:
void writeOperation(const ClassDefPtr&, const std::string&, const OperationPtr&, bool);
-
- bool _stream;
};
class ProxyVisitor : public JavaVisitor
@@ -258,13 +252,9 @@ private:
{
public:
- DispatcherVisitor(const std::string&, bool);
+ DispatcherVisitor(const std::string&);
virtual bool visitClassDefStart(const ClassDefPtr&);
-
- private:
-
- bool _stream;
};
class BaseImplVisitor : public JavaVisitor
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index d71460f58aa..7b9737d98a2 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -80,7 +80,6 @@ usage(const char* n)
"--ice Allow reserved Ice prefix in Slice identifiers.\n"
"--underscore Allow underscores in Slice identifiers.\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"
;
}
@@ -108,7 +107,6 @@ compile(int argc, char* argv[])
opts.addOpt("", "ice");
opts.addOpt("", "underscore");
opts.addOpt("", "checksum", IceUtilInternal::Options::NeedArg);
- opts.addOpt("", "stream");
opts.addOpt("", "meta", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
@@ -189,8 +187,6 @@ compile(int argc, char* argv[])
string checksumClass = opts.optArg("checksum");
- bool stream = opts.isSet("stream");
-
bool listGenerated = opts.isSet("list-generated");
StringList globalMetadata;
@@ -353,7 +349,7 @@ compile(int argc, char* argv[])
try
{
Gen gen(argv[0], icecpp->getBaseName(), includePaths, output);
- gen.generate(p, stream);
+ gen.generate(p);
if(tie)
{
gen.generateTie(p);
diff --git a/cpp/src/slice2java/Makefile.mak b/cpp/src/slice2java/Makefile.mak
deleted file mode 100644
index 26a40e3aa55..00000000000
--- a/cpp/src/slice2java/Makefile.mak
+++ /dev/null
@@ -1,50 +0,0 @@
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-top_srcdir = ..\..
-
-NAME = $(top_srcdir)\bin\slice2java.exe
-
-TARGETS = $(NAME)
-
-OBJS = .\Gen.obj \
- .\Main.obj
-
-!include $(top_srcdir)/config/Make.rules.mak
-
-CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
-
-!if "$(GENERATE_PDB)" == "yes"
-PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
-!endif
-
-RES_FILE = Slice2Java.res
-
-$(NAME): $(OBJS) Slice2Java.res
- $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(OBJS) $(SETARGV) $(PREOUT)$@ $(PRELIBS) \
- $(BASELIBS) $(RES_FILE)
- @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
- $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
- @if defined SIGN_CERTIFICATE echo ^ ^ ^ Signing $@ && \
- signtool sign /f "$(SIGN_CERTIFICATE)" /p $(SIGN_PASSWORD) /t $(SIGN_TIMESTAMPSERVER) $@
-
-clean::
- del /q $(NAME:.exe=.*)
- del /q Slice2Java.res
-
-install:: all
- copy $(NAME) "$(install_bindir)"
-
-
-!if "$(GENERATE_PDB)" == "yes"
-
-install:: all
- copy $(NAME:.exe=.pdb) "$(install_bindir)"
-
-!endif
diff --git a/cpp/src/slice2java/Slice2Java.rc b/cpp/src/slice2java/Slice2Java.rc
index a589969595d..8747e3d0fec 100644
--- a/cpp/src/slice2java/Slice2Java.rc
+++ b/cpp/src/slice2java/Slice2Java.rc
@@ -1,8 +1,8 @@
#include "winver.h"
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,6,1,0
- PRODUCTVERSION 3,6,1,0
+ FILEVERSION 3,7,0,0
+ PRODUCTVERSION 3,7,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -19,12 +19,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Slice to Java Translator\0"
- VALUE "FileVersion", "3.6.1\0"
+ VALUE "FileVersion", "3.7.0\0"
VALUE "InternalName", "slice2java\0"
VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0"
VALUE "OriginalFilename", "slice2java.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.6.1\0"
+ VALUE "ProductVersion", "3.7.0\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/src/slice2java/msbuild/slice2java.vcxproj b/cpp/src/slice2java/msbuild/slice2java.vcxproj
new file mode 100644
index 00000000000..c6149ed65db
--- /dev/null
+++ b/cpp/src/slice2java/msbuild/slice2java.vcxproj
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A503D0D4-22BB-4BDB-B996-862D14DA3349}</ProjectGuid>
+ <RootNamespace>slice2java</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <Import Project="$(MSBuildThisFileDirectory)\..\..\..\msbuild\ice.cpp98.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Gen.cpp" />
+ <ClCompile Include="..\Main.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\Slice2Java.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\Gen.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/cpp/src/slice2java/msbuild/slice2java.vcxproj.filters b/cpp/src/slice2java/msbuild/slice2java.vcxproj.filters
new file mode 100644
index 00000000000..48e5f9c9a3a
--- /dev/null
+++ b/cpp/src/slice2java/msbuild/slice2java.vcxproj.filters
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{A44EC71A-9B0B-424C-8966-3C20C4451E12}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{080E8F6A-9743-430D-AC92-9763481380CE}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{267D903A-EF93-4356-A227-C89396D7B931}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Gen.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\Slice2Java.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\Gen.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file