diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-05-04 16:05:10 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-05-04 16:05:10 -0400 |
commit | e4ba758a6db605722be50f48a22a5a4eae2e0b83 (patch) | |
tree | a4196f73b5a2b9a03b738827691a562e6819e753 /cpp/src/slice2java | |
parent | Cleanup ICEObject protocol/interface (diff) | |
download | ice-e4ba758a6db605722be50f48a22a5a4eae2e0b83.tar.bz2 ice-e4ba758a6db605722be50f48a22a5a4eae2e0b83.tar.xz ice-e4ba758a6db605722be50f48a22a5a4eae2e0b83.zip |
Removed operation attributes (used only by Freeze)
Diffstat (limited to 'cpp/src/slice2java')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 8a0f8da95a2..9c01a29816d 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -1475,53 +1475,6 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) out << nl << "throw new " << "com.zeroc.Ice.OperationNotExistException(current.id, current.facet, current.operation);"; out << eb; - - // - // Check if we need to generate ice_operationAttributes() - // - - map<string, int> attributesMap; - for(OperationList::iterator r = allOps.begin(); r != allOps.end(); ++r) - { - int attributes = (*r)->attributes(); - if(attributes != 0) - { - attributesMap.insert(map<string, int>::value_type((*r)->name(), attributes)); - } - } - - if(!attributesMap.empty()) - { - out << sp << nl << "final static int[] _iceOperationAttributes ="; - out << sb; - for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();) - { - int attributes = 0; - string opName = *q; - map<string, int>::iterator it = attributesMap.find(opName); - if(it != attributesMap.end()) - { - attributes = it->second; - } - out << nl << attributes; - if(++q != allOpNames.end()) - { - out << ','; - } - out << " // " << opName; - } - out << eb << ';'; - - out << sp << nl << "@Override" << nl << "default int ice_operationAttributes(String operation)"; - out << sb; - out << nl << "int pos = java.util.Arrays.binarySearch(_iceOps, operation);"; - out << nl << "if(pos < 0)"; - out << sb; - out << nl << "return -1;"; - out << eb; - out << sp << nl << "return _iceOperationAttributes[pos];"; - out << eb; - } } } |