diff options
author | Mark Spruiell <mes@zeroc.com> | 2016-05-11 14:35:33 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2016-05-11 14:35:33 -0700 |
commit | 778d6231d1521f1b36426969f797b02e8ff5c66a (patch) | |
tree | 798cb498e5a2297225b2132937d3a713c25f508c /cpp/src | |
parent | Replaced BDB by LMDB (diff) | |
download | ice-778d6231d1521f1b36426969f797b02e8ff5c66a.tar.bz2 ice-778d6231d1521f1b36426969f797b02e8ff5c66a.tar.xz ice-778d6231d1521f1b36426969f797b02e8ff5c66a.zip |
cleaning up stream API in C++/Java/JS
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 6 | ||||
-rw-r--r-- | cpp/src/Ice/InputStream.cpp | 114 | ||||
-rw-r--r-- | cpp/src/Ice/Object.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/OpaqueEndpointI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/OutputStream.cpp | 58 | ||||
-rw-r--r-- | cpp/src/Ice/SlicedData.cpp | 24 | ||||
-rw-r--r-- | cpp/src/Slice/JavaUtil.cpp | 66 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 46 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 50 | ||||
-rw-r--r-- | cpp/src/slice2js/JsUtil.cpp | 8 |
10 files changed, 191 insertions, 191 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index ca2207179df..dc5e94f852a 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -73,10 +73,10 @@ throwUOE(const string& expectedType, const ValuePtr& v) // value factory, in this case raise a NoValueFactoryException // instead. // - UnknownSlicedObject* uso = dynamic_cast<UnknownSlicedObject*>(v.get()); - if(uso) + UnknownSlicedValue* usv = dynamic_cast<UnknownSlicedValue*>(v.get()); + if(usv) { - throw NoValueFactoryException(__FILE__, __LINE__, "", uso->getUnknownTypeId()); + throw NoValueFactoryException(__FILE__, __LINE__, "", usv->getUnknownTypeId()); } string type = v->ice_id(); diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp index dedbb66a07b..3a68ba04040 100644 --- a/cpp/src/Ice/InputStream.cpp +++ b/cpp/src/Ice/InputStream.cpp @@ -176,7 +176,7 @@ Ice::InputStream::initialize(const EncodingVersion& encoding) #endif _traceSlicing = false; _closure = 0; - _sliceObjects = true; + _sliceValues = true; _startSeq = -1; _minSeqSize = 0; } @@ -192,7 +192,7 @@ Ice::InputStream::clear() } _startSeq = -1; - _sliceObjects = true; + _sliceValues = true; } void @@ -233,9 +233,9 @@ Ice::InputStream::setCollectObjects(bool b) #endif void -Ice::InputStream::setSliceObjects(bool b) +Ice::InputStream::setSliceValues(bool b) { - _sliceObjects = b; + _sliceValues = b; } void @@ -270,7 +270,7 @@ Ice::InputStream::swap(InputStream& other) #endif std::swap(_traceSlicing, other._traceSlicing); std::swap(_closure, other._closure); - std::swap(_sliceObjects, other._sliceObjects); + std::swap(_sliceValues, other._sliceValues); // // Swap is never called for streams that have encapsulations being read. However, @@ -304,7 +304,7 @@ Ice::InputStream::resetEncapsulation() } Int -Ice::InputStream::getEncapsSize() +Ice::InputStream::getEncapsulationSize() { assert(_currentEncaps); return _currentEncaps->sz - static_cast<Int>(sizeof(Int)) - 2; @@ -331,20 +331,20 @@ Ice::InputStream::skipEncapsulation() } void -Ice::InputStream::readPendingObjects() +Ice::InputStream::readPendingValues() { if(_currentEncaps && _currentEncaps->decoder) { - _currentEncaps->decoder->readPendingObjects(); + _currentEncaps->decoder->readPendingValues(); } else if(getEncoding() == Ice::Encoding_1_0) { // - // If using the 1.0 encoding and no objects were read, we - // still read an empty sequence of pending objects if + // If using the 1.0 encoding and no instances were read, we + // still read an empty sequence of pending instances if // requested (i.e.: if this is called). // - // This is required by the 1.0 encoding, even if no objects + // This is required by the 1.0 encoding, even if no instances // are written we do marshal an empty sequence if marshaled // data types use classes. // @@ -1488,11 +1488,11 @@ Ice::InputStream::initEncaps() ValueFactoryManagerPtr vfm = valueFactoryManager(); if(_currentEncaps->encoding == Encoding_1_0) { - _currentEncaps->decoder = new EncapsDecoder10(this, _currentEncaps, _sliceObjects, vfm); + _currentEncaps->decoder = new EncapsDecoder10(this, _currentEncaps, _sliceValues, vfm); } else { - _currentEncaps->decoder = new EncapsDecoder11(this, _currentEncaps, _sliceObjects, vfm); + _currentEncaps->decoder = new EncapsDecoder11(this, _currentEncaps, _sliceValues, vfm); } } } @@ -1595,7 +1595,7 @@ Ice::InputStream::EncapsDecoder::addPatchEntry(Int index, PatchFunc patchFunc, v assert(index > 0); // - // Check if already un-marshalled the object. If that's the case, + // Check if we already unmarshaled the object. If that's the case, // just patch the object smart pointer and we're done. // IndexToPtrMap::iterator p = _unmarshaledMap.find(index); @@ -1606,9 +1606,9 @@ Ice::InputStream::EncapsDecoder::addPatchEntry(Int index, PatchFunc patchFunc, v } // - // Add patch entry if the object isn't un-marshalled yet, the + // Add a patch entry if the object isn't unmarshaled yet, the // smart pointer will be patched when the instance is - // un-marshalled. + // unmarshaled. // PatchMap::iterator q = _patchMap.find(index); @@ -1634,8 +1634,8 @@ void Ice::InputStream::EncapsDecoder::unmarshal(Int index, const Ice::ValuePtr& v) { // - // Add the object to the map of un-marshalled objects, this must - // be done before reading the objects (for circular references). + // Add the object to the map of unmarshaled instances, this must + // be done before reading the instances (for circular references). // _unmarshaledMap.insert(make_pair(index, v)); @@ -1645,7 +1645,7 @@ Ice::InputStream::EncapsDecoder::unmarshal(Int index, const Ice::ValuePtr& v) v->__read(_stream); // - // Patch all instances now that the object is un-marshalled. + // Patch all instances now that the object is unmarshaled. // PatchMap::iterator patchPos = _patchMap.find(index); if(patchPos != _patchMap.end()) @@ -1667,27 +1667,27 @@ Ice::InputStream::EncapsDecoder::unmarshal(Int index, const Ice::ValuePtr& v) _patchMap.erase(patchPos); } - if(_objectList.empty() && _patchMap.empty()) + if(_valueList.empty() && _patchMap.empty()) { _stream->postUnmarshal(v); } else { - _objectList.push_back(v); + _valueList.push_back(v); if(_patchMap.empty()) { // - // Iterate over the object list and invoke ice_postUnmarshal on - // each object. We must do this after all objects have been - // unmarshaled in order to ensure that any object data members + // Iterate over the value list and invoke ice_postUnmarshal on + // each value. We must do this after all values have been + // unmarshaled in order to ensure that any value data members // have been properly patched. // - for(ObjectList::iterator p = _objectList.begin(); p != _objectList.end(); ++p) + for(ValueList::iterator p = _valueList.begin(); p != _valueList.end(); ++p) { _stream->postUnmarshal(*p); } - _objectList.clear(); + _valueList.clear(); } } } @@ -1732,7 +1732,7 @@ Ice::InputStream::EncapsDecoder10::throwException(const UserExceptionFactoryPtr& // User exception with the 1.0 encoding start with a boolean flag // that indicates whether or not the exception has classes. // - // This allows reading the pending objects even if some part of + // This allows reading the pending values even if some part of // the exception was sliced. // bool usesClasses; @@ -1776,7 +1776,7 @@ Ice::InputStream::EncapsDecoder10::throwException(const UserExceptionFactoryPtr& ex.__read(_stream); if(usesClasses) { - readPendingObjects(); + readPendingValues(); } throw; @@ -1823,9 +1823,9 @@ SlicedDataPtr Ice::InputStream::EncapsDecoder10::endInstance(bool) { // - // Read the Ice::Object slice. + // Read the Ice::Value slice. // - if(_sliceType == ObjectSlice) + if(_sliceType == ValueSlice) { startSlice(); Int sz = _stream->readSize(); // For compatibility with the old AFM. @@ -1853,12 +1853,12 @@ Ice::InputStream::EncapsDecoder10::startSlice() } // - // For objects, first read the type ID boolean which indicates + // For values, first read the type ID boolean which indicates // whether or not the type ID is encoded as a string or as an // index. For exceptions, the type ID is always encoded as a // string. // - if(_sliceType == ObjectSlice) + if(_sliceType == ValueSlice) { bool isIndex; _stream->read(isIndex); @@ -1891,7 +1891,7 @@ Ice::InputStream::EncapsDecoder10::skipSlice() } void -Ice::InputStream::EncapsDecoder10::readPendingObjects() +Ice::InputStream::EncapsDecoder10::readPendingValues() { Int num; do @@ -1925,7 +1925,7 @@ Ice::InputStream::EncapsDecoder10::readInstance() throw MarshalException(__FILE__, __LINE__, "invalid object id"); } - _sliceType = ObjectSlice; + _sliceType = ValueSlice; _skipFirstSlice = false; // @@ -1956,11 +1956,11 @@ Ice::InputStream::EncapsDecoder10::readInstance() } // - // If object slicing is disabled, stop un-marshalling. + // If value slicing is disabled, stop unmarshaling. // - if(!_sliceObjects) + if(!_sliceValues) { - throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and object slicing is disabled", + throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and value slicing is disabled", _typeId); } @@ -1972,7 +1972,7 @@ Ice::InputStream::EncapsDecoder10::readInstance() } // - // Un-marshal the object and add-it to the map of un-marshaled objects. + // Unmarshal the instance and add it to the map of unmarshaled instances. // unmarshal(index, v); } @@ -2129,11 +2129,11 @@ Ice::InputStream::EncapsDecoder11::startSlice() _stream->read(_current->sliceFlags); // - // Read the type ID, for object slices the type ID is encoded as a + // Read the type ID, for value slices the type ID is encoded as a // string or as an index, for exceptions it's always encoded as a // string. // - if(_current->sliceType == ObjectSlice) + if(_current->sliceType == ValueSlice) { if((_current->sliceFlags & FLAG_HAS_TYPE_ID_COMPACT) == FLAG_HAS_TYPE_ID_COMPACT) // Must be checked first! { @@ -2240,7 +2240,7 @@ Ice::InputStream::EncapsDecoder11::skipSlice() } else { - if(_current->sliceType == ObjectSlice) + if(_current->sliceType == ValueSlice) { throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and compact format prevents " @@ -2325,14 +2325,14 @@ Ice::InputStream::EncapsDecoder11::readInstance(Int index, PatchFunc patchFunc, return index; } - push(ObjectSlice); + push(ValueSlice); // // Get the object ID before we start reading slices. If some // slices are skiped, the indirect object table are still read and - // might read other objects. + // might read other instances. // - index = ++_objectIdIndex; + index = ++_valueIdIndex; // // Read the first slice header. @@ -2368,11 +2368,11 @@ Ice::InputStream::EncapsDecoder11::readInstance(Int index, PatchFunc patchFunc, } // - // If object slicing is disabled, stop un-marshalling. + // If value slicing is disabled, stop unmarshaling. // - if(!_sliceObjects) + if(!_sliceValues) { - throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and object slicing is disabled", + throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and value slicing is disabled", _current->typeId); } @@ -2382,7 +2382,7 @@ Ice::InputStream::EncapsDecoder11::readInstance(Int index, PatchFunc patchFunc, skipSlice(); // - // If this is the last slice, keep the object as an opaque UnknownSlicedObject. + // If this is the last slice, keep the object as an opaque UnknownSlicedValue. // if(_current->sliceFlags & FLAG_IS_LAST_SLICE) { @@ -2394,7 +2394,7 @@ Ice::InputStream::EncapsDecoder11::readInstance(Int index, PatchFunc patchFunc, v = newInstance(Object::ice_staticId()); if(!v) { - v = ICE_MAKE_SHARED(UnknownSlicedObject, mostDerivedId); + v = ICE_MAKE_SHARED(UnknownSlicedValue, mostDerivedId); } break; @@ -2404,7 +2404,7 @@ Ice::InputStream::EncapsDecoder11::readInstance(Int index, PatchFunc patchFunc, } // - // Un-marshal the object + // Unmarshal the object. // unmarshal(index, v); @@ -2440,21 +2440,21 @@ Ice::InputStream::EncapsDecoder11::readSlicedData() for(SliceInfoSeq::size_type n = 0; n < _current->slices.size(); ++n) { // - // We use the "objects" list in SliceInfo to hold references - // to the target objects. Note that the objects might not have + // We use the "instances" list in SliceInfo to hold references + // to the target instances. Note that the instances might not have // been read yet in the case of a circular reference to an - // enclosing object. + // enclosing instance. // const IndexList& table = _current->indirectionTables[n]; - vector<ValuePtr>& objects = _current->slices[n]->objects; - objects.resize(table.size()); + vector<ValuePtr>& instances = _current->slices[n]->instances; + instances.resize(table.size()); IndexList::size_type j = 0; for(IndexList::const_iterator p = table.begin(); p != table.end(); ++p) { #ifdef ICE_CPP11_MAPPING - addPatchEntry(*p, &patchHandle<Value>, &objects[j++]); + addPatchEntry(*p, &patchHandle<Value>, &instances[j++]); #else - addPatchEntry(*p, &patchHandle<Object>, &objects[j++]); + addPatchEntry(*p, &patchHandle<Object>, &instances[j++]); #endif } } diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 4df368298e6..7b049322512 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -242,17 +242,17 @@ Ice::Object::ice_postUnmarshal() void Ice::Object::__write(Ice::OutputStream* os) const { - os->startObject(0); + os->startValue(0); __writeImpl(os); - os->endObject(); + os->endValue(); } void Ice::Object::__read(Ice::InputStream* is) { - is->startObject(); + is->startValue(); __readImpl(is); - is->endObject(false); + is->endValue(false); } Ice::Int diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp index 8a680864e3f..838fcc6252f 100644 --- a/cpp/src/Ice/OpaqueEndpointI.cpp +++ b/cpp/src/Ice/OpaqueEndpointI.cpp @@ -50,7 +50,7 @@ IceInternal::OpaqueEndpointI::OpaqueEndpointI(vector<string>& args) : IceInternal::OpaqueEndpointI::OpaqueEndpointI(Short type, InputStream* s) : _type(type) { _rawEncoding = s->getEncoding(); - Int sz = s->getEncapsSize(); + Int sz = s->getEncapsulationSize(); s->readBlob(const_cast<vector<Byte>&>(_rawBytes), sz); } diff --git a/cpp/src/Ice/OutputStream.cpp b/cpp/src/Ice/OutputStream.cpp index c9b4ca0a5de..ee28c1e5325 100644 --- a/cpp/src/Ice/OutputStream.cpp +++ b/cpp/src/Ice/OutputStream.cpp @@ -231,20 +231,20 @@ Ice::OutputStream::startEncapsulation() } void -Ice::OutputStream::writePendingObjects() +Ice::OutputStream::writePendingValues() { if(_currentEncaps && _currentEncaps->encoder) { - _currentEncaps->encoder->writePendingObjects(); + _currentEncaps->encoder->writePendingValues(); } else if(getEncoding() == Ice::Encoding_1_0) { // - // If using the 1.0 encoding and no objects were written, we - // still write an empty sequence for pending objects if + // If using the 1.0 encoding and no instances were written, we + // still write an empty sequence for pending instances if // requested (i.e.: if this is called). // - // This is required by the 1.0 encoding, even if no objects + // This is required by the 1.0 encoding, even if no instances // are written we do marshal an empty sequence if marshaled // data types use classes. // @@ -920,7 +920,7 @@ Ice::OutputStream::EncapsEncoder10::write(const ValuePtr& v) // if(v) { - _stream->write(-registerObject(v)); + _stream->write(-registerValue(v)); } else { @@ -936,7 +936,7 @@ Ice::OutputStream::EncapsEncoder10::write(const UserException& v) // flag that indicates whether or not the exception uses // classes. // - // This allows reading the pending objects even if some part of + // This allows reading the pending instances even if some part of // the exception was sliced. // bool usesClasses = v.__usesClasses(); @@ -944,7 +944,7 @@ Ice::OutputStream::EncapsEncoder10::write(const UserException& v) v.__write(_stream); if(usesClasses) { - writePendingObjects(); + writePendingValues(); } } @@ -957,7 +957,7 @@ Ice::OutputStream::EncapsEncoder10::startInstance(SliceType sliceType, const Sli void Ice::OutputStream::EncapsEncoder10::endInstance() { - if(_sliceType == ObjectSlice) + if(_sliceType == ValueSlice) { // // Write the Object slice. @@ -973,11 +973,11 @@ void Ice::OutputStream::EncapsEncoder10::startSlice(const string& typeId, int, bool /*last*/) { // - // For object slices, encode a boolean to indicate how the type ID + // For instance slices, encode a boolean to indicate how the type ID // is encoded and the type ID either as a string or index. For // exception slices, always encode the type ID as a string. // - if(_sliceType == ObjectSlice) + if(_sliceType == ValueSlice) { Int index = registerTypeId(typeId); if(index < 0) @@ -1013,15 +1013,15 @@ Ice::OutputStream::EncapsEncoder10::endSlice() } void -Ice::OutputStream::EncapsEncoder10::writePendingObjects() +Ice::OutputStream::EncapsEncoder10::writePendingValues() { while(!_toBeMarshaledMap.empty()) { // - // Consider the to be marshalled objects as marshalled now, + // Consider the to be marshalled instances as marshalled now, // this is necessary to avoid adding again the "to be - // marshalled objects" into _toBeMarshaledMap while writing - // objects. + // marshalled instances" into _toBeMarshaledMap while writing + // instances. // _marshaledMap.insert(_toBeMarshaledMap.begin(), _toBeMarshaledMap.end()); @@ -1059,7 +1059,7 @@ Ice::OutputStream::EncapsEncoder10::writePendingObjects() } Int -Ice::OutputStream::EncapsEncoder10::registerObject(const ValuePtr& v) +Ice::OutputStream::EncapsEncoder10::registerValue(const ValuePtr& v) { assert(v); @@ -1085,8 +1085,8 @@ Ice::OutputStream::EncapsEncoder10::registerObject(const ValuePtr& v) // We haven't seen this instance previously, create a new // index, and insert it into the to-be-marshaled map. // - _toBeMarshaledMap.insert(make_pair(v, ++_objectIdIndex)); - return _objectIdIndex; + _toBeMarshaledMap.insert(make_pair(v, ++_valueIdIndex)); + return _valueIdIndex; } void @@ -1099,9 +1099,9 @@ Ice::OutputStream::EncapsEncoder11::write(const ValuePtr& v) else if(_current && _encaps->format == SlicedFormat) { // - // If writting an object within a slice and using the sliced - // format, write an index from the object indirection - // table. The indirect object table is encoded at the end of + // If writing an instance within a slice and using the sliced + // format, write an index from the instance indirection + // table. The indirect instance table is encoded at the end of // each slice and is always read (even if the Slice is // unknown). // @@ -1176,11 +1176,11 @@ Ice::OutputStream::EncapsEncoder11::startSlice(const string& typeId, int compact _stream->write(Byte(0)); // Placeholder for the slice flags // - // For object slices, encode the flag and the type ID either as a + // For instance slices, encode the flag and the type ID either as a // string or index. For exception slices, always encode the type // ID a string. // - if(_current->sliceType == ObjectSlice) + if(_current->sliceType == ValueSlice) { // // Encode the type ID (only in the first slice for the compact @@ -1255,10 +1255,10 @@ Ice::OutputStream::EncapsEncoder11::endSlice() _current->sliceFlags |= FLAG_HAS_INDIRECTION_TABLE; // - // Write the indirection object table. + // Write the indirect instance table. // _stream->writeSize(static_cast<Int>(_current->indirectionTable.size())); - ObjectList::const_iterator p; + ValueList::const_iterator p; for(p = _current->indirectionTable.begin(); p != _current->indirectionTable.end(); ++p) { writeInstance(*p); @@ -1303,7 +1303,7 @@ Ice::OutputStream::EncapsEncoder11::writeSlicedData(const SlicedDataPtr& slicedD // // We only remarshal preserved slices if we are using the sliced // format. Otherwise, we ignore the preserved slices, which - // essentially "slices" the object into the most-derived type + // essentially "slices" the instance into the most-derived type // known by the sender. // if(_encaps->format != SlicedFormat) @@ -1326,9 +1326,9 @@ Ice::OutputStream::EncapsEncoder11::writeSlicedData(const SlicedDataPtr& slicedD } // - // Make sure to also re-write the object indirection table. + // Make sure to also re-write the instance indirection table. // - _current->indirectionTable = (*p)->objects; + _current->indirectionTable = (*p)->instances; endSlice(); } @@ -1353,7 +1353,7 @@ Ice::OutputStream::EncapsEncoder11::writeInstance(const ValuePtr& v) // We haven't seen this instance previously, create a new ID, // insert it into the marshaled map, and write the instance. // - _marshaledMap.insert(make_pair(v, ++_objectIdIndex)); + _marshaledMap.insert(make_pair(v, ++_valueIdIndex)); try { diff --git a/cpp/src/Ice/SlicedData.cpp b/cpp/src/Ice/SlicedData.cpp index 9418bbf6d8d..a746be2803f 100644 --- a/cpp/src/Ice/SlicedData.cpp +++ b/cpp/src/Ice/SlicedData.cpp @@ -17,7 +17,7 @@ using namespace Ice; #ifndef ICE_CPP11_MAPPING IceUtil::Shared* Ice::upCast(SliceInfo* p) { return p; } IceUtil::Shared* Ice::upCast(SlicedData* p) { return p; } -IceUtil::Shared* Ice::upCast(UnknownSlicedObject* p) { return p; } +IceUtil::Shared* Ice::upCast(UnknownSlicedValue* p) { return p; } #endif Ice::SlicedData::SlicedData(const SliceInfoSeq& seq) : @@ -35,7 +35,7 @@ Ice::SlicedData::__gcVisitMembers(IceInternal::GCVisitor& visitor) // for(SliceInfoSeq::const_iterator p = slices.begin(); p != slices.end(); ++p) { - for(vector<ObjectPtr>::iterator q = (*p)->objects.begin(); q != (*p)->objects.end(); ++q) + for(vector<ObjectPtr>::iterator q = (*p)->instances.begin(); q != (*p)->instances.end(); ++q) { if(q->get()->__gcVisit(visitor)) { @@ -46,7 +46,7 @@ Ice::SlicedData::__gcVisitMembers(IceInternal::GCVisitor& visitor) } void -Ice::UnknownSlicedObject::__gcVisitMembers(IceInternal::GCVisitor& _v) +Ice::UnknownSlicedValue::__gcVisitMembers(IceInternal::GCVisitor& _v) { if(_slicedData) { @@ -55,32 +55,32 @@ Ice::UnknownSlicedObject::__gcVisitMembers(IceInternal::GCVisitor& _v) } #endif -Ice::UnknownSlicedObject::UnknownSlicedObject(const string& unknownTypeId) : _unknownTypeId(unknownTypeId) +Ice::UnknownSlicedValue::UnknownSlicedValue(const string& unknownTypeId) : _unknownTypeId(unknownTypeId) { } const string& -Ice::UnknownSlicedObject::getUnknownTypeId() const +Ice::UnknownSlicedValue::getUnknownTypeId() const { return _unknownTypeId; } SlicedDataPtr -Ice::UnknownSlicedObject::getSlicedData() const +Ice::UnknownSlicedValue::getSlicedData() const { return _slicedData; } void -Ice::UnknownSlicedObject::__write(Ice::OutputStream* __os) const +Ice::UnknownSlicedValue::__write(Ice::OutputStream* __os) const { - __os->startObject(_slicedData); - __os->endObject(); + __os->startValue(_slicedData); + __os->endValue(); } void -Ice::UnknownSlicedObject::__read(Ice::InputStream* __is) +Ice::UnknownSlicedValue::__read(Ice::InputStream* __is) { - __is->startObject(); - _slicedData = __is->endObject(true); + __is->startValue(); + _slicedData = __is->endValue(true); } diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 67893e4ce24..c4e4061ea39 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -1172,32 +1172,32 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, { if(optionalParam) { - out << nl << stream << ".writeObject(" << tag << ", " << v << ");"; + out << nl << stream << ".writeValue(" << tag << ", " << v << ");"; } else { - out << nl << stream << ".writeObject(" << v << ");"; + out << nl << stream << ".writeValue(" << v << ");"; } } else { if(optionalParam) { - out << nl << stream << ".readObject(" << tag << ", " << param << ");"; + out << nl << stream << ".readValue(" << tag << ", " << param << ");"; } else if(holder && mode == OptionalNone) { - out << nl << stream << ".readObject(" << param << ");"; + out << nl << stream << ".readValue(" << param << ");"; } else { if(patchParams.empty()) { - out << nl << stream << ".readObject(new Patcher());"; + out << nl << stream << ".readValue(new Patcher());"; } else { - out << nl << stream << ".readObject(" << patchParams << ");"; + out << nl << stream << ".readValue(" << patchParams << ");"; } } } @@ -1263,7 +1263,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << "int __pos = " << stream << ".startSize();"; - out << nl << typeS << "Helper.__write(" << stream << ", " << v << ".get());"; + out << nl << typeS << "Helper.write(" << stream << ", " << v << ".get());"; out << nl << stream << ".endSize(__pos);"; out << eb; } @@ -1272,7 +1272,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << "if(" << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << "int __pos = " << stream << ".startSize();"; - out << nl << typeS << "Helper.__write(" << stream << ", " << v << ");"; + out << nl << typeS << "Helper.write(" << stream << ", " << v << ");"; out << nl << stream << ".endSize(__pos);"; out << eb; } @@ -1280,12 +1280,12 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, else if(mode == OptionalMember) { out << nl << "int __pos = " << stream << ".startSize();"; - out << nl << typeS << "Helper.__write(" << stream << ", " << v << ");"; + out << nl << typeS << "Helper.write(" << stream << ", " << v << ");"; out << nl << stream << ".endSize(__pos);"; } else { - out << nl << typeS << "Helper.__write(" << stream << ", " << v << ");"; + out << nl << typeS << "Helper.write(" << stream << ", " << v << ");"; } } else @@ -1295,7 +1295,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; out << nl << stream << ".skip(4);"; - out << nl << v << ".set(" << typeS << "Helper.__read(" << stream << "));"; + out << nl << v << ".set(" << typeS << "Helper.read(" << stream << "));"; out << eb; if(mode == OptionalOutParam) { @@ -1308,11 +1308,11 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, else if(mode == OptionalMember) { out << nl << stream << ".skip(4);"; - out << nl << v << " = " << typeS << "Helper.__read(" << stream << ");"; + out << nl << v << " = " << typeS << "Helper.read(" << stream << ");"; } else { - out << nl << v << " = " << typeS << "Helper.__read(" << stream << ");"; + out << nl << v << " = " << typeS << "Helper.read(" << stream << ");"; } } return; @@ -1325,11 +1325,11 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, { if(optionalParam) { - out << nl << stream << ".writeObject(" << tag << ", " << v << ");"; + out << nl << stream << ".writeValue(" << tag << ", " << v << ");"; } else { - out << nl << stream << ".writeObject(" << v << ");"; + out << nl << stream << ".writeValue(" << v << ");"; } } else @@ -1339,7 +1339,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, string typeS = typeToString(type, TypeModeIn, package); out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << stream << ".readObject(new Ice.OptionalObject(" << v << ", " << typeS << ".class, " + out << nl << stream << ".readValue(new Ice.OptionalObject(" << v << ", " << typeS << ".class, " << getStaticId(type, package) << "));"; out << eb; if(mode == OptionalOutParam) @@ -1354,17 +1354,17 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, { if(holder && mode == OptionalNone) { - out << nl << stream << ".readObject(" << param << ");"; + out << nl << stream << ".readValue(" << param << ");"; } else { if(patchParams.empty()) { - out << nl << stream << ".readObject(new Patcher());"; + out << nl << stream << ".readValue(new Patcher());"; } else { - out << nl << stream << ".readObject(" << patchParams << ");"; + out << nl << stream << ".readValue(" << patchParams << ");"; } } } @@ -1405,13 +1405,13 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, if(st->isVariableLength()) { out << nl << "int __pos = " << stream << ".startSize();"; - out << nl << typeS << ".ice_write(" << stream << ", " << val << ");"; + out << nl << typeS << ".write(" << stream << ", " << val << ");"; out << nl << stream << ".endSize(__pos);"; } else { out << nl << stream << ".writeSize(" << st->minWireSize() << ");"; - out << nl << typeS << ".ice_write(" << stream << ", " << val << ");"; + out << nl << typeS << ".write(" << stream << ", " << val << ");"; } if(optionalParam) { @@ -1420,7 +1420,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } else { - out << nl << typeS << ".ice_write(" << stream << ", " << v << ");"; + out << nl << typeS << ".write(" << stream << ", " << v << ");"; } } else @@ -1440,7 +1440,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } out << nl << typeS << " __tmpOpt = new " << typeS << "();"; - out << nl << "__tmpOpt.ice_read(" << stream << ");"; + out << nl << "__tmpOpt.__read(" << stream << ");"; out << nl << v << ".set(__tmpOpt);"; out << eb; @@ -1463,11 +1463,11 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, { out << nl << stream << ".skipSize();"; } - out << nl << v << " = " << typeS << ".ice_read(" << stream << ", " << v << ");"; + out << nl << v << " = " << typeS << ".read(" << stream << ", " << v << ");"; } else { - out << nl << v << " = " << typeS << ".ice_read(" << stream << ", " << v << ");"; + out << nl << v << " = " << typeS << ".read(" << stream << ", " << v << ");"; } } return; @@ -1486,20 +1486,20 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << "if(" << v << " != null && " << v << ".isSet() && " << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << typeS << ".ice_write(" << stream << ", " << v << ".get());"; + out << nl << typeS << ".write(" << stream << ", " << v << ".get());"; out << eb; } else { out << nl << "if(" << stream << ".writeOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << typeS << ".ice_write(" << stream << ", " << v << ");"; + out << nl << typeS << ".write(" << stream << ", " << v << ");"; out << eb; } } else { - out << nl << typeS << ".ice_write(" << stream << ", " << v << ");"; + out << nl << typeS << ".write(" << stream << ", " << v << ");"; } } else @@ -1508,7 +1508,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, { out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(type) << "))"; out << sb; - out << nl << v << ".set(" << typeS << ".ice_read(" << stream << "));"; + out << nl << v << ".set(" << typeS << ".read(" << stream << "));"; out << eb; if(mode == OptionalOutParam) { @@ -1520,7 +1520,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } else { - out << nl << v << " = " << typeS << ".ice_read(" << stream << ");"; + out << nl << v << " = " << typeS << ".read(" << stream << ");"; } } return; @@ -1994,7 +1994,7 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out, writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, arg, false, iter, false, StringList(), "new IceInternal.DictionaryPatcher<" + keyTypeStr + ", " + valueTypeStr + - ">(" + v + ", " + typeS + ".class, \"" + type->typeId() + "\", __key)"); + ">(" + v + ", " + typeS + ".class, __key)"); } else { @@ -2318,7 +2318,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << v << ".add(null);"; ostringstream patchParams; patchParams << "new IceInternal.ListPatcher<" << origContentS << ">(" << v << ", " << origContentS - << ".class, __type" << iter << ", __i" << iter << ')'; + << ".class, __i" << iter << ')'; writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "__elem", false, iter, false, StringList(), patchParams.str()); } @@ -2558,7 +2558,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out, if(isObject) { patchParams << "new IceInternal.SequencePatcher(" << v << ", " << origContentS - << ".class, __type" << iter << ", __i" << iter << ')'; + << ".class, __i" << iter << ')'; writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, o.str(), false, iter, false, StringList(), patchParams.str()); } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index ff29afac5d8..b78467e3415 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2098,7 +2098,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, inParams, 0, true, TypeContextInParam); if(p->sendsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << nl << "__og.endWriteParams();"; C << eb; @@ -2177,7 +2177,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) writeUnmarshalCode(C, outParams, p, true); if(p->returnsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "__og.endReadParams();"; } @@ -2212,7 +2212,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, inParams, 0, true, TypeContextInParam); if(p->sendsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << nl << "__result->endWriteParams();"; } @@ -2275,7 +2275,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) writeUnmarshalCode(C, outParams, p, true, _useWstring | TypeContextAMIEnd); if(p->returnsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "__result->__endReadParams();"; } @@ -2339,7 +2339,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) writeUnmarshalCode(C, outParams, p, true, _useWstring | TypeContextAMIPrivateEnd); if(p->returnsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "__result->__endReadParams();"; } @@ -2999,17 +2999,17 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << sp; C << nl << "void" << nl << scoped.substr(2) << "::__write(::Ice::OutputStream* __os) const"; C << sb; - C << nl << "__os->startObject(__slicedData);"; + C << nl << "__os->startValue(__slicedData);"; C << nl << "__writeImpl(__os);"; - C << nl << "__os->endObject();"; + C << nl << "__os->endValue();"; C << eb; C << sp; C << nl << "void" << nl << scoped.substr(2) << "::__read(::Ice::InputStream* __is)"; C << sb; - C << nl << "__is->startObject();"; + C << nl << "__is->startValue();"; C << nl << "__readImpl(__is);"; - C << nl << "__slicedData = __is->endObject(true);"; + C << nl << "__slicedData = __is->endValue(true);"; C << eb; } @@ -3340,7 +3340,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) writeUnmarshalCode(C, inParams, 0, true, TypeContextInParam); if(p->sendsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "__inS.endReadParams();"; } @@ -3368,7 +3368,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, outParams, p, true); if(p->returnsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << nl << "__inS.__endWriteParams(true);"; } @@ -3402,7 +3402,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) writeUnmarshalCode(C, inParams, 0, true, TypeContextInParam); if(p->sendsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "__inS.endReadParams();"; } @@ -4704,7 +4704,7 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, outParams, p, false, TypeContextInParam); if(p->returnsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << nl << "__endWriteParams(true);"; C << eb; @@ -6335,7 +6335,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, inParams, 0, true, TypeContextInParam); if(p->sendsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << eb; } @@ -6445,7 +6445,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p) } if(p->returnsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "return v;"; C << eb; @@ -6488,7 +6488,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p) ParamDeclPtr q = (*outParams.begin()); writeMarshalUnmarshalCode(C, q->type(), false, 0, "v", false, q->getMetaData()); } - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; C << nl << "return v;"; C << eb; } @@ -7325,7 +7325,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p) writeUnmarshalCode(C, inParams, 0, true, TypeContextInParam); if(p->sendsClasses(false)) { - C << nl << "__is->readPendingObjects();"; + C << nl << "__is->readPendingValues();"; } C << nl << "__inS.endReadParams();"; } @@ -7354,7 +7354,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, outParams, p, true); if(p->returnsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << nl << "__inS.__endWriteParams(true);"; } @@ -7429,7 +7429,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p) writeMarshalCode(C, outParams, p, true); if(p->returnsClasses(false)) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingValues();"; } C << nl << "inS->__endWriteParams(true);"; } @@ -7587,17 +7587,17 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p) C << sp; C << nl << "void" << nl << scoped.substr(2) << "::__write(::Ice::OutputStream* __os) const"; C << sb; - C << nl << "__os->startObject(__slicedData);"; + C << nl << "__os->startValue(__slicedData);"; C << nl << "__writeImpl(__os);"; - C << nl << "__os->endObject();"; + C << nl << "__os->endValue();"; C << eb; C << sp; C << nl << "void" << nl << scoped.substr(2) << "::__read(::Ice::InputStream* __is)"; C << sb; - C << nl << "__is->startObject();"; + C << nl << "__is->startValue();"; C << nl << "__readImpl(__is);"; - C << nl << "__slicedData = __is->endObject(true);"; + C << nl << "__slicedData = __is->endValue(true);"; C << eb; } diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 038568cf64c..97f46017c45 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -845,7 +845,7 @@ void Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataMemberList& classMembers, const DataMemberList& optionalMembers) { - out << sp << nl << "private class Patcher implements Ice.ReadObjectCallback"; + out << sp << nl << "private class Patcher implements Ice.ReadValueCallback"; out << sb; if(classMembers.size() > 1) { @@ -855,7 +855,7 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM out << eb; } - out << sp << nl << "public void" << nl << "objectReady(Ice.Object v)"; + out << sp << nl << "public void" << nl << "valueReady(Ice.Object v)"; out << sb; if(classMembers.size() > 1) { @@ -1302,7 +1302,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& writeMarshalUnmarshalParams(out, package, inParams, 0, iter, false, true, true); if(op->sendsClasses(false)) { - out << nl << "__is.readPendingObjects();"; + out << nl << "__is.readPendingValues();"; } out << nl << "__inS.endReadParams();"; } @@ -1367,7 +1367,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true); if(op->returnsClasses(false)) { - out << nl << "__os.writePendingObjects();"; + out << nl << "__os.writePendingValues();"; } out << nl << "__inS.__endWriteParams(true);"; } @@ -1449,7 +1449,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& writeMarshalUnmarshalParams(out, package, inParams, 0, iter, false, true, true); if(op->sendsClasses(false)) { - out << nl << "__is.readPendingObjects();"; + out << nl << "__is.readPendingValues();"; } out << nl << "__inS.endReadParams();"; } @@ -1664,16 +1664,16 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& { out << sp << nl << "public void __write(Ice.OutputStream __os)"; out << sb; - out << nl << "__os.startObject(__slicedData);"; + out << nl << "__os.startValue(__slicedData);"; out << nl << "__writeImpl(__os);"; - out << nl << "__os.endObject();"; + out << nl << "__os.endValue();"; out << eb; out << sp << nl << "public void __read(Ice.InputStream __is)"; out << sb; - out << nl << "__is.startObject();"; + out << nl << "__is.startValue();"; out << nl << "__readImpl(__is);"; - out << nl << "__slicedData = __is.endObject(true);"; + out << nl << "__slicedData = __is.endValue(true);"; out << eb; } @@ -4047,7 +4047,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(!p->isLocal()) { - out << sp << nl << "public void" << nl << "ice_write(Ice.OutputStream __os)"; + out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __os)"; out << sb; iter = 0; for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d) @@ -4063,7 +4063,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) writePatcher(out, package, classMembers, DataMemberList()); } - out << sp << nl << "public void" << nl << "ice_read(Ice.InputStream __is)"; + out << sp << nl << "public void" << nl << "__read(Ice.InputStream __is)"; out << sb; iter = 0; int patchIter = 0; @@ -4074,25 +4074,25 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } out << eb; - out << sp << nl << "static public void" << nl << "ice_write(Ice.OutputStream __os, " << name << " __v)"; + out << sp << nl << "static public void" << nl << "write(Ice.OutputStream __os, " << name << " __v)"; out << sb; out << nl << "if(__v == null)"; out << sb; - out << nl << "__nullMarshalValue.ice_write(__os);"; + out << nl << "__nullMarshalValue.__write(__os);"; out << eb; out << nl << "else"; out << sb; - out << nl << "__v.ice_write(__os);"; + out << nl << "__v.__write(__os);"; out << eb; out << eb; - out << sp << nl << "static public " << name << nl << "ice_read(Ice.InputStream __is, " << name << " __v)"; + out << sp << nl << "static public " << name << nl << "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.ice_read(__is);"; + out << nl << "__v.__read(__is);"; out << nl << "return __v;"; out << eb; @@ -4465,12 +4465,12 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) if(!p->isLocal()) { - out << sp << nl << "public void" << nl << "ice_write(Ice.OutputStream __os)"; + out << sp << nl << "public void" << nl << "__write(Ice.OutputStream __os)"; out << sb; out << nl << "__os.writeEnum(value(), " << p->maxValue() << ");"; out << eb; - out << sp << nl << "public static void" << nl << "ice_write(Ice.OutputStream __os, " << name << " __v)"; + out << sp << nl << "public static void" << nl << "write(Ice.OutputStream __os, " << name << " __v)"; out << sb; out << nl << "if(__v == null)"; out << sb; @@ -4483,7 +4483,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) out << eb; out << eb; - out << sp << nl << "public static " << name << nl << "ice_read(Ice.InputStream __is)"; + out << sp << nl << "public static " << name << nl << "read(Ice.InputStream __is)"; out << sb; out << nl << "int __v = __is.readEnum(" << p->maxValue() << ");"; out << nl << "return __validate(__v);"; @@ -4686,7 +4686,7 @@ Slice::Gen::HolderVisitor::writeHolder(const TypePtr& p) out << eb; out << sp << nl << "public void"; - out << nl << "objectReady(Ice.Object v)"; + out << nl << "valueReady(Ice.Object v)"; out << sb; out << nl << "if(v == null || v instanceof " << typeS << ")"; out << sb; @@ -4862,7 +4862,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) writeMarshalUnmarshalParams(out, package, pl, op, iter, false, true); if(op->returnsClasses(false)) { - out << nl << "__is.readPendingObjects();"; + out << nl << "__is.readPendingValues();"; } out << nl << "__result.endReadParams();"; } @@ -5100,12 +5100,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "return __ids[" << scopedPos << "];"; out << eb; - out << sp << nl << "public static void __write(Ice.OutputStream __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(Ice.InputStream __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)"; @@ -5639,7 +5639,7 @@ Slice::Gen::HelperVisitor::writeOperation(const ClassDefPtr& p, const string& pa writeMarshalUnmarshalParams(out, package, pl, 0, iter, true, optionalMapping); if(op->sendsClasses(false)) { - out << nl << "__os.writePendingObjects();"; + out << nl << "__os.writePendingValues();"; } out << nl << "__result.endWriteParams();"; } @@ -6621,7 +6621,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false); if(p->returnsClasses(false)) { - out << nl << "__os.writePendingObjects();"; + out << nl << "__os.writePendingValues();"; } out << nl << "this.__endWriteParams(true);"; out << eb; diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp index d5db59666b5..31648566a64 100644 --- a/cpp/src/slice2js/JsUtil.cpp +++ b/cpp/src/slice2js/JsUtil.cpp @@ -559,11 +559,11 @@ Slice::JsGenerator::writeMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << stream << ".writeObject(" << param << ");"; + out << nl << stream << ".writeValue(" << param << ");"; } else { - out << nl << stream << ".readObject(function(__o){ " << fixSuffix(param) << " = __o; }, " + out << nl << stream << ".readValue(function(__o){ " << fixSuffix(param) << " = __o; }, " << typeToString(type) << ");"; } return; @@ -598,11 +598,11 @@ Slice::JsGenerator::writeOptionalMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << stream << ".writeOptionalObject(" << tag << ", " << param << ");"; + out << nl << stream << ".writeOptionalValue(" << tag << ", " << param << ");"; } else { - out << nl << stream << ".readOptionalObject(" << tag << ", function(__o){ " << fixSuffix(param) + out << nl << stream << ".readOptionalValue(" << tag << ", function(__o){ " << fixSuffix(param) << " = __o; }, " << typeToString(type) << ");"; } return; |