First successful use of new ArgumentList::emit_prototype method

release/4.3a0
dellaert 2014-05-25 13:02:29 -04:00
parent 80b7d91264
commit 26cae48338
2 changed files with 10 additions and 18 deletions

View File

@ -16,18 +16,19 @@
* @author Richard Roberts
**/
#include "Class.h"
#include "utilities.h"
#include "Argument.h"
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <vector>
#include <iostream>
#include <fstream>
//#include <cstdint> // on Linux GCC: fails with error regarding needing C++0x std flags
//#include <cinttypes> // same failure as above
#include <stdint.h> // works on Linux GCC
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include "Class.h"
#include "utilities.h"
#include "Argument.h"
using namespace std;
using namespace wrap;
@ -406,17 +407,9 @@ void Class::comment_fragment(FileWriter& proxyFile) const {
BOOST_FOREACH(const Methods::value_type& name_m, methods) {
const Method& m = name_m.second;
BOOST_FOREACH(ArgumentList argList, m.argLists) {
string up_name = boost::to_upper_copy(m.name);
proxyFile.oss << "%" << m.name << "(";
unsigned int i = 0;
BOOST_FOREACH(const Argument& arg, argList) {
if (i != argList.size() - 1)
proxyFile.oss << arg.type << " " << arg.name << ", ";
else
proxyFile.oss << arg.type << " " << arg.name;
i++;
}
proxyFile.oss << ") : returns "
proxyFile.oss << "%";
argList.emit_prototype(proxyFile, m.name);
proxyFile.oss << " : returns "
<< m.returnVals[0].return_type(false, m.returnVals[0].pair) << endl;
}
}

View File

@ -27,7 +27,6 @@
#include "Method.h"
#include "StaticMethod.h"
#include "TypeAttributesTable.h"
#include <boost/algorithm/string.hpp>
namespace wrap {