summaryrefslogtreecommitdiff
path: root/project2/ice/slice2Rows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/ice/slice2Rows.cpp')
-rw-r--r--project2/ice/slice2Rows.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/project2/ice/slice2Rows.cpp b/project2/ice/slice2Rows.cpp
index 8c67222..18757ab 100644
--- a/project2/ice/slice2Rows.cpp
+++ b/project2/ice/slice2Rows.cpp
@@ -44,6 +44,7 @@ Slice2Rows::visitOperation(const Slice::OperationPtr & o)
fprintf(code, "\t\t\t\tpublic:\n");
// Constructor
fprintf(code, "\t\t\t\t\t%s(ScriptNodePtr p) :\n", o->name().c_str());
+ fprintf(code, "\t\t\t\t\t\tSourceObject(p),\n");
fprintf(code, "\t\t\t\t\t\tIceRows< ::%s::%sPrx >(p)", module.c_str(), interface.c_str());
for (const auto & p : o->parameters()) {
fprintf(code, ",\n\t\t\t\t\t\t%s(p, \"%s\")", p->name().c_str(), p->name().c_str());
@@ -54,16 +55,16 @@ Slice2Rows::visitOperation(const Slice::OperationPtr & o)
fprintf(code, "\t\t\t\t\tvoid execute(const Glib::ustring &, const RowProcessorCallback & rp, ExecContext * ec) const\n");
fprintf(code, "\t\t\t\t\t{\n");
FunctionBegin(o);
- fprintf(code, "\t\t\t\t\t\tSlicer::SerializerPtr toRpc = new RowProcSerializer(ec, rp);\n");
+ fprintf(code, "\t\t\t\t\t\tSlicer::SerializerPtr toRpc = std::make_shared<RowProcSerializer>(ec, rp);\n");
fprintf(code, "\t\t\t\t\t\tauto result = ");
CallOperation(o);
fprintf(code, ";\n");
- fprintf(code, "\t\t\t\t\t\tSlicer::ModelPartPtr mp = Slicer::ModelPartFor(result);\n");
+ fprintf(code, "\t\t\t\t\t\tSlicer::ModelPartForRootPtr mp = Slicer::ModelPart::CreateRootFor(result);\n");
fprintf(code, "\t\t\t\t\t\ttoRpc->Serialize(mp);\n");
fprintf(code, "\t\t\t\t\t}\n\n");
ParameterVariables(o);
fprintf(code, "\t\t\t};\n");
- Declaration(o);
+ Declaration(o, "RowSetFactory");
}
}