diff options
author | Jose <jose@zeroc.com> | 2009-12-14 17:48:13 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-12-14 17:48:13 +0100 |
commit | 91862e81100330f3209b4272b29ca46a7bca0679 (patch) | |
tree | ca4014bd8789bc9db491e480d4791f7bdacbeebe /cpp/demo/Ice/invoke/PrinterI.cpp | |
parent | edits to README.DEMOS (diff) | |
download | ice-91862e81100330f3209b4272b29ca46a7bca0679.tar.bz2 ice-91862e81100330f3209b4272b29ca46a7bca0679.tar.xz ice-91862e81100330f3209b4272b29ca46a7bca0679.zip |
4471 - read(std::vector<bool>) and Stream deprecate old methods.
Diffstat (limited to 'cpp/demo/Ice/invoke/PrinterI.cpp')
-rw-r--r-- | cpp/demo/Ice/invoke/PrinterI.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/demo/Ice/invoke/PrinterI.cpp b/cpp/demo/Ice/invoke/PrinterI.cpp index c6ca9c4aef8..7054751124e 100644 --- a/cpp/demo/Ice/invoke/PrinterI.cpp +++ b/cpp/demo/Ice/invoke/PrinterI.cpp @@ -43,13 +43,15 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa if(current.operation == "printString") { - string message = in->readString(); + string message; + in->read(message); cout << "Printing string `" << message << "'" << endl; return true; } else if(current.operation == "printStringSequence") { - Demo::StringSeq seq = in->readStringSeq(); + Demo::StringSeq seq; + in->read(seq); cout << "Printing string sequence {"; for(Demo::StringSeq::iterator p = seq.begin(); p != seq.end(); ++p) { @@ -123,7 +125,7 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa c->s.value = Demo::green; Ice::OutputStreamPtr out = Ice::createOutputStream(communicator); out->write(c); - out->writeString("hello"); + out->write("hello"); out->writePendingObjects(); out->finished(outParams); return true; @@ -134,7 +136,7 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa Demo::PrintFailure ex; ex.reason = "paper tray empty"; Ice::OutputStreamPtr out = Ice::createOutputStream(communicator); - out->writeException(ex); + out->write(ex); out->finished(outParams); return false; } |