From 78f45ee8dada2cbf5d33833a813b4fca1b8720b4 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Fri, 22 Jun 2001 19:19:25 +0000 Subject: more slice2html --- cpp/src/slice2cpp/Gen.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c57edcd6bed..794cfc4c061 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -117,8 +117,8 @@ Slice::Gen::generate(const Parser_ptr& parser) C << "\n#include "; } - vector includes = parser -> includeFiles(); - for(vector::iterator q = includes.begin(); + list includes = parser -> includeFiles(); + for(list::iterator q = includes.begin(); q != includes.end(); ++q) { @@ -1021,13 +1021,13 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDef_ptr& p) string name = p -> name(); string scoped = p -> scoped(); - vector operations = p -> operations(); + list operations = p -> operations(); ClassDef_ptr base = p -> base(); if(!p -> local() && !operations.empty()) { - sort(operations.begin(), operations.end()); - vector::iterator op; + operations.sort(); + list::iterator op; H << sp; H << nl << "typedef ::__Ice::DispatchStatus (" << name @@ -1041,11 +1041,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDef_ptr& p) C << nl << scoped << "::__Op " << scoped.substr(2) << "::__ops[" << operations.size() << "] ="; C << sb; - for(op = operations.begin(); op != operations.end(); ++op) + op = operations.begin(); + while(op != operations.end()) { C << nl << '&' << scoped.substr(2) << "::___" << (*op) -> name(); - if(op + 1 != operations.end()) + if(++op != operations.end()) C << ','; } C << eb << ';'; @@ -1053,10 +1054,11 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDef_ptr& p) C << nl << "std::string " << scoped.substr(2) << "::__names[" << operations.size() << "] ="; C << sb; - for(op = operations.begin(); op != operations.end(); ++op) + op = operations.begin(); + while(op != operations.end()) { C << nl << '"' << (*op) -> name() << '"'; - if(op + 1 != operations.end()) + if(++op != operations.end()) C << ','; } C << eb << ';'; @@ -1102,8 +1104,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDef_ptr& p) H << nl << "virtual void __read(::__Ice::Stream*);"; H << eb << ';'; TypeNameList memberList; - vector dataMembers = p -> dataMembers(); - vector::const_iterator q; + list dataMembers = p -> dataMembers(); + list::const_iterator q; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) memberList.push_back(make_pair((*q) -> type(), (*q) -> name())); C << sp; -- cgit v1.2.3