summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/invoke/PrinterI.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-11-08 21:06:42 +0000
committerMark Spruiell <mes@zeroc.com>2004-11-08 21:06:42 +0000
commitda4d323aa2c1f5ea2fa83834b0c8b3dff9486c7e (patch)
tree0f1b24929a86999bdef44bee7b0e804522adfe3d /cpp/demo/Ice/invoke/PrinterI.cpp
parentalways generate stream functions for class, exception (diff)
downloadice-da4d323aa2c1f5ea2fa83834b0c8b3dff9486c7e.tar.bz2
ice-da4d323aa2c1f5ea2fa83834b0c8b3dff9486c7e.tar.xz
ice-da4d323aa2c1f5ea2fa83834b0c8b3dff9486c7e.zip
stream changes
Diffstat (limited to 'cpp/demo/Ice/invoke/PrinterI.cpp')
-rw-r--r--cpp/demo/Ice/invoke/PrinterI.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpp/demo/Ice/invoke/PrinterI.cpp b/cpp/demo/Ice/invoke/PrinterI.cpp
index 13092ceeb71..77331eaa472 100644
--- a/cpp/demo/Ice/invoke/PrinterI.cpp
+++ b/cpp/demo/Ice/invoke/PrinterI.cpp
@@ -44,14 +44,12 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
if(current.operation == "printString")
{
string message = in->readString();
- in->finished();
cout << "Printing string `" << message << "'" << endl;
return true;
}
else if(current.operation == "printStringSequence")
{
Demo::StringSeq seq = in->readStringSeq();
- in->finished();
cout << "Printing string sequence {";
for(Demo::StringSeq::iterator p = seq.begin(); p != seq.end(); ++p)
{
@@ -68,7 +66,6 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
{
Demo::StringDict dict;
Demo::ice_readStringDict(in, dict);
- in->finished();
cout << "Printing dictionary {";
for(Demo::StringDict::iterator p = dict.begin(); p != dict.end(); ++p)
{
@@ -85,7 +82,6 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
{
Demo::Color c;
Demo::ice_readColor(in, c);
- in->finished();
cout << "Printing enum " << c << endl;
return true;
}
@@ -93,7 +89,6 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
{
Demo::Structure s;
Demo::ice_readStructure(in, s);
- in->finished();
cout << "Printing struct: name=" << s.name << ", value=" << s.value << endl;
return true;
}
@@ -101,7 +96,6 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
{
Demo::StructureSeq seq;
Demo::ice_readStructureSeq(in, seq);
- in->finished();
cout << "Printing struct sequence: {";
for(Demo::StructureSeq::iterator p = seq.begin(); p != seq.end(); ++p)
{
@@ -118,7 +112,7 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
{
Demo::CPtr c;
Demo::ice_readC(in, c);
- in->finished();
+ in->readPendingObjects();
cout << "Printing class: s.name=" << c->s.name << ", s.value=" << c->s.value << endl;
return true;
}
@@ -130,6 +124,7 @@ PrinterI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outPa
Ice::OutputStreamPtr out = Ice::createOutputStream(communicator);
Demo::ice_writeC(out, c);
out->writeString("hello");
+ out->writePendingObjects();
out->finished(outParams);
return true;
}