diff options
author | Jose <jose@zeroc.com> | 2014-10-22 13:21:20 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-10-22 13:21:20 +0200 |
commit | e0baf57e883b320df04db5500ba91b0379634426 (patch) | |
tree | 3e1fa14b2fa2ebb91589dbb60df4cb39f042c665 /cpp | |
parent | Fixed (ICE-5717) - Port IceDiscovery demo/test to scripting languages rb/php/py (diff) | |
download | ice-e0baf57e883b320df04db5500ba91b0379634426.tar.bz2 ice-e0baf57e883b320df04db5500ba91b0379634426.tar.xz ice-e0baf57e883b320df04db5500ba91b0379634426.zip |
Fixed (ICE-5550) - Remove cpp:range:array?
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 12 | ||||
-rw-r--r-- | cpp/test/Ice/custom/AllTests.cpp | 93 | ||||
-rw-r--r-- | cpp/test/Ice/custom/Test.ice | 3 | ||||
-rw-r--r-- | cpp/test/Ice/custom/TestAMD.ice | 2 | ||||
-rw-r--r-- | cpp/test/Ice/custom/TestAMDI.cpp | 9 | ||||
-rw-r--r-- | cpp/test/Ice/custom/TestAMDI.h | 4 | ||||
-rw-r--r-- | cpp/test/Ice/optional/Test.ice | 16 | ||||
-rw-r--r-- | cpp/test/Ice/optional/TestAMD.ice | 16 |
8 files changed, 22 insertions, 133 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 3f1104a156c..4ed37cd7ee4 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -73,7 +73,7 @@ sequenceTypeToString(const SequencePtr& seq, const StringList& metaData, int typ string seqType = findMetaData(metaData, typeCtx); if(!seqType.empty()) { - if(seqType == "%array" || seqType == "%range:array") + if(seqType == "%array") { BuiltinPtr builtin = BuiltinPtr::dynamicCast(seq->type()); if(typeCtx & TypeContextAMIPrivateEnd) @@ -179,7 +179,7 @@ writeParamAllocateCode(Output& out, const TypePtr& type, bool optional, const st } string s; - if(seqType == "%array" || seqType == "%range:array") + if(seqType == "%array") { s = typeToString(seq, metaData, TypeContextAMIPrivateEnd); } @@ -216,7 +216,7 @@ writeParamEndCode(Output& out, const TypePtr& type, bool optional, const string& seqType = findMetaData(seq->getMetaData(), TypeContextInParam); } - if(seqType == "%array" || seqType == "%range:array") + if(seqType == "%array") { BuiltinPtr builtin = BuiltinPtr::dynamicCast(seq->type()); if(builtin && @@ -906,7 +906,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, bool optional if(seq && !(typeCtx & TypeContextAMIPrivateEnd)) { string seqType = findMetaData(metaData, typeCtx); - if(seqType == "%array" || seqType == "%range:array") + if(seqType == "%array") { BuiltinPtr builtin = BuiltinPtr::dynamicCast(seq->type()); if(builtin && builtin->kind() == Builtin::KindByte) @@ -971,7 +971,7 @@ Slice::getEndArg(const TypePtr& type, const StringList& metaData, const string& seqType = findMetaData(seq->getMetaData(), TypeContextInParam); } - if(seqType == "%array" || seqType == "%range:array") + if(seqType == "%array") { BuiltinPtr builtin = BuiltinPtr::dynamicCast(seq->type()); if(builtin && @@ -1035,7 +1035,7 @@ Slice::findMetaData(const StringList& metaData, int typeCtx) // // The priority of the metadata is as follows: // 1: protobuf - // 2: array, range, range:array, view-type for "view" parameters + // 2: array, range, view-type for "view" parameters // 3: class if(pos != string::npos) diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp index 0dd933cd77a..bf5ac26918d 100644 --- a/cpp/test/Ice/custom/AllTests.cpp +++ b/cpp/test/Ice/custom/AllTests.cpp @@ -198,16 +198,6 @@ public: called(); } - void opBoolRangeType(const pair<const bool*, const bool*>& ret, - const pair<const bool*, const bool*>& out, - const InParamPtr& cookie) - { - const pair<const bool*, const bool*>& in = getIn<pair<const bool*, const bool*> >(cookie); - test(arrayRangeEquals<bool>(out, in)); - test(arrayRangeEquals<bool>(ret, in)); - called(); - } - void opByteRangeType(const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& ret, const pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& out, const InParamPtr& cookie) @@ -756,26 +746,6 @@ allTests(const Ice::CommunicatorPtr& communicator) } { - Test::BoolSeq in(5); - in[0] = false; - in[1] = true; - in[2] = true; - in[3] = false; - in[4] = true; - bool inArray[5]; - for(int i = 0; i < 5; ++i) - { - inArray[i] = in[i]; - } - pair<const bool*, const bool*> inPair(inArray, inArray + 5); - - Test::BoolSeq out; - Test::BoolSeq ret = t->opBoolRangeType(inPair, out); - test(out == in); - test(ret == in); - } - - { Test::ByteList in; in.push_back('1'); in.push_back('2'); @@ -1384,27 +1354,6 @@ allTests(const Ice::CommunicatorPtr& communicator) } { - Test::BoolSeq in(5); - in[0] = false; - in[1] = true; - in[2] = true; - in[3] = false; - in[4] = true; - bool inArray[5]; - for(int i = 0; i < 5; ++i) - { - inArray[i] = in[i]; - } - pair<const bool*, const bool*> inPair(inArray, inArray + 5); - - Test::BoolSeq out; - Ice::AsyncResultPtr r = t->begin_opBoolRangeType(inPair); - Test::BoolSeq ret = t->end_opBoolRangeType(out, r); - test(out == in); - test(ret == in); - } - - { Test::ByteList in; in.push_back('1'); in.push_back('2'); @@ -1953,27 +1902,6 @@ allTests(const Ice::CommunicatorPtr& communicator) } { - Test::BoolSeq in(5); - in[0] = false; - in[1] = true; - in[2] = true; - in[3] = false; - in[4] = true; - bool inArray[5]; - for(int i = 0; i < 5; ++i) - { - inArray[i] = in[i]; - } - pair<const bool*, const bool*> inPair(inArray, inArray + 5); - - CallbackPtr cb = new Callback(); - Test::Callback_TestIntf_opBoolRangeTypePtr callback = - Test::newCallback_TestIntf_opBoolRangeType(cb, &Callback::opBoolRangeType, &Callback::noEx); - t->begin_opBoolRangeType(inPair, callback, newInParam(inPair)); - cb->check(); - } - - { Test::ByteList in; in.push_back('1'); in.push_back('2'); @@ -2551,27 +2479,6 @@ allTests(const Ice::CommunicatorPtr& communicator) } { - Test::BoolSeq in(5); - in[0] = false; - in[1] = true; - in[2] = true; - in[3] = false; - in[4] = true; - bool inArray[5]; - for(int i = 0; i < 5; ++i) - { - inArray[i] = in[i]; - } - pair<const bool*, const bool*> inPair(inArray, inArray + 5); - - CallbackPtr cb = new Callback(); - Test::Callback_TestIntf_opBoolRangeTypePtr callback = - Test::newCallback_TestIntf_opBoolRangeType(cb, &Callback::opBoolRangeType, &Callback::noEx); - t->begin_opBoolRangeType(inPair, callback, newInParam(inPair)); - cb->check(); - } - - { Test::ByteList in; in.push_back('1'); in.push_back('2'); diff --git a/cpp/test/Ice/custom/Test.ice b/cpp/test/Ice/custom/Test.ice index 4a3a79a5e67..06798447bab 100644 --- a/cpp/test/Ice/custom/Test.ice +++ b/cpp/test/Ice/custom/Test.ice @@ -153,9 +153,6 @@ class TestIntf ["cpp:range"] ByteList opByteRange(["cpp:range"] ByteList inSeq, out ["cpp:range"] ByteList outSeq); ["cpp:range"] VariableList opVariableRange(["cpp:range"] VariableList inSeq, out ["cpp:range"] VariableList outSeq); - - ["cpp:range:array"] BoolSeq opBoolRangeType(["cpp:range:array"] BoolSeq inSeq, - out ["cpp:range:array"] BoolSeq outSeq); ["cpp:range:::Test::ByteList"] ByteList opByteRangeType(["cpp:range:::Test::ByteList"] ByteList inSeq, out ["cpp:range:::Test::ByteList"] ByteList outSeq); diff --git a/cpp/test/Ice/custom/TestAMD.ice b/cpp/test/Ice/custom/TestAMD.ice index 044b897deca..8533a52ca17 100644 --- a/cpp/test/Ice/custom/TestAMD.ice +++ b/cpp/test/Ice/custom/TestAMD.ice @@ -151,8 +151,6 @@ struct BufferStruct ["cpp:range"] ByteList opByteRange(["cpp:range"] ByteList inSeq, out ["cpp:range"] ByteList outSeq); VariableList opVariableRange(["cpp:range"] VariableList inSeq, out VariableList outSeq); - - BoolSeq opBoolRangeType(["cpp:range:array"] BoolSeq inSeq, out BoolSeq outSeq); ByteList opByteRangeType(["cpp:range:::Test::ByteList"] ByteList inSeq, out ByteList outSeq); diff --git a/cpp/test/Ice/custom/TestAMDI.cpp b/cpp/test/Ice/custom/TestAMDI.cpp index f9c6289d728..035f200eb5c 100644 --- a/cpp/test/Ice/custom/TestAMDI.cpp +++ b/cpp/test/Ice/custom/TestAMDI.cpp @@ -78,15 +78,6 @@ TestIntfI::opVariableRange_async(const Test::AMD_TestIntf_opVariableRangePtr& op } void -TestIntfI::opBoolRangeType_async(const Test::AMD_TestIntf_opBoolRangeTypePtr& opBoolRangeTypeCB, - const std::pair<const bool*, const bool*>& inSeq, - const Ice::Current&) -{ - Test::BoolSeq outSeq(inSeq.first, inSeq.second); - opBoolRangeTypeCB->ice_response(outSeq, outSeq); -} - -void TestIntfI::opByteRangeType_async(const Test::AMD_TestIntf_opByteRangeTypePtr& opByteRangeTypeCB, const std::pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& inSeq, const Ice::Current&) diff --git a/cpp/test/Ice/custom/TestAMDI.h b/cpp/test/Ice/custom/TestAMDI.h index 01594e6764a..6a8d09ed69b 100644 --- a/cpp/test/Ice/custom/TestAMDI.h +++ b/cpp/test/Ice/custom/TestAMDI.h @@ -47,10 +47,6 @@ public: Test::VariableList::const_iterator>&, const Ice::Current&); - virtual void opBoolRangeType_async(const Test::AMD_TestIntf_opBoolRangeTypePtr&, - const std::pair<const bool*, const bool*>&, - const Ice::Current&); - virtual void opByteRangeType_async(const Test::AMD_TestIntf_opByteRangeTypePtr&, const std::pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>&, const Ice::Current&); diff --git a/cpp/test/Ice/optional/Test.ice b/cpp/test/Ice/optional/Test.ice index aef1743cd0a..50867fe341e 100644 --- a/cpp/test/Ice/optional/Test.ice +++ b/cpp/test/Ice/optional/Test.ice @@ -239,17 +239,17 @@ class Initial ["cpp:array"] optional(1) ShortSeq opShortSeq(["cpp:array"] optional(2) ShortSeq p1, out ["cpp:array"] optional(3) ShortSeq p3); - ["cpp:range:array"] optional(1) IntSeq opIntSeq(["cpp:range:array"] optional(2) IntSeq p1, - out ["cpp:range:array"] optional(3) IntSeq p3); + ["cpp:array"] optional(1) IntSeq opIntSeq(["cpp:array"] optional(2) IntSeq p1, + out ["cpp:array"] optional(3) IntSeq p3); - ["cpp:range:array"] optional(1) LongSeq opLongSeq(["cpp:range:array"] optional(2) LongSeq p1, - out ["cpp:range:array"] optional(3) LongSeq p3); + ["cpp::array"] optional(1) LongSeq opLongSeq(["cpp:array"] optional(2) LongSeq p1, + out ["cpp:array"] optional(3) LongSeq p3); - ["cpp:range:array"] optional(1) FloatSeq opFloatSeq(["cpp:range:array"] optional(2) FloatSeq p1, - out ["cpp:range:array"] optional(3) FloatSeq p3); + ["cpp::array"] optional(1) FloatSeq opFloatSeq(["cpp:array"] optional(2) FloatSeq p1, + out ["cpp:array"] optional(3) FloatSeq p3); - ["cpp:range:array"] optional(1) DoubleSeq opDoubleSeq(["cpp:range:array"] optional(2) DoubleSeq p1, - out ["cpp:range:array"] optional(3) DoubleSeq p3); + ["cpp::array"] optional(1) DoubleSeq opDoubleSeq(["cpp:array"] optional(2) DoubleSeq p1, + out ["cpp:array"] optional(3) DoubleSeq p3); ["cpp:range"] optional(1) StringSeq opStringSeq(["cpp:range"] optional(2) StringSeq p1, out ["cpp:range"] optional(3) StringSeq p3); diff --git a/cpp/test/Ice/optional/TestAMD.ice b/cpp/test/Ice/optional/TestAMD.ice index 17a46a9dd40..70c2164f5dc 100644 --- a/cpp/test/Ice/optional/TestAMD.ice +++ b/cpp/test/Ice/optional/TestAMD.ice @@ -240,17 +240,17 @@ class Initial ["cpp:array"] optional(1) ShortSeq opShortSeq(["cpp:array"] optional(2) ShortSeq p1, out ["cpp:array"] optional(3) ShortSeq p3); - ["cpp:range:array"] optional(1) IntSeq opIntSeq(["cpp:range:array"] optional(2) IntSeq p1, - out ["cpp:range:array"] optional(3) IntSeq p3); + ["cpp:array"] optional(1) IntSeq opIntSeq(["cpp:array"] optional(2) IntSeq p1, + out ["cpp:array"] optional(3) IntSeq p3); - ["cpp:range:array"] optional(1) LongSeq opLongSeq(["cpp:range:array"] optional(2) LongSeq p1, - out ["cpp:range:array"] optional(3) LongSeq p3); + ["cpp:array"] optional(1) LongSeq opLongSeq(["cpp:array"] optional(2) LongSeq p1, + out ["cpp:array"] optional(3) LongSeq p3); - ["cpp:range:array"] optional(1) FloatSeq opFloatSeq(["cpp:range:array"] optional(2) FloatSeq p1, - out ["cpp:range:array"] optional(3) FloatSeq p3); + ["cpp:array"] optional(1) FloatSeq opFloatSeq(["cpp:array"] optional(2) FloatSeq p1, + out ["cpp:array"] optional(3) FloatSeq p3); - ["cpp:range:array"] optional(1) DoubleSeq opDoubleSeq(["cpp:range:array"] optional(2) DoubleSeq p1, - out ["cpp:range:array"] optional(3) DoubleSeq p3); + ["cpp:array"] optional(1) DoubleSeq opDoubleSeq(["cpp:array"] optional(2) DoubleSeq p1, + out ["cpp:array"] optional(3) DoubleSeq p3); ["cpp:range"] optional(1) StringSeq opStringSeq(["cpp:range"] optional(2) StringSeq p1, out ["cpp:range"] optional(3) StringSeq p3); |