First successful use of new ArgumentList::emit_prototype method
parent
80b7d91264
commit
26cae48338
|
@ -16,18 +16,19 @@
|
||||||
* @author Richard Roberts
|
* @author Richard Roberts
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
#include "Class.h"
|
||||||
|
#include "utilities.h"
|
||||||
|
#include "Argument.h"
|
||||||
|
|
||||||
|
#include <boost/foreach.hpp>
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
//#include <cstdint> // on Linux GCC: fails with error regarding needing C++0x std flags
|
//#include <cstdint> // on Linux GCC: fails with error regarding needing C++0x std flags
|
||||||
//#include <cinttypes> // same failure as above
|
//#include <cinttypes> // same failure as above
|
||||||
#include <stdint.h> // works on Linux GCC
|
#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 std;
|
||||||
using namespace wrap;
|
using namespace wrap;
|
||||||
|
@ -406,17 +407,9 @@ void Class::comment_fragment(FileWriter& proxyFile) const {
|
||||||
BOOST_FOREACH(const Methods::value_type& name_m, methods) {
|
BOOST_FOREACH(const Methods::value_type& name_m, methods) {
|
||||||
const Method& m = name_m.second;
|
const Method& m = name_m.second;
|
||||||
BOOST_FOREACH(ArgumentList argList, m.argLists) {
|
BOOST_FOREACH(ArgumentList argList, m.argLists) {
|
||||||
string up_name = boost::to_upper_copy(m.name);
|
proxyFile.oss << "%";
|
||||||
proxyFile.oss << "%" << m.name << "(";
|
argList.emit_prototype(proxyFile, m.name);
|
||||||
unsigned int i = 0;
|
proxyFile.oss << " : returns "
|
||||||
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 "
|
|
||||||
<< m.returnVals[0].return_type(false, m.returnVals[0].pair) << endl;
|
<< m.returnVals[0].return_type(false, m.returnVals[0].pair) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "Method.h"
|
#include "Method.h"
|
||||||
#include "StaticMethod.h"
|
#include "StaticMethod.h"
|
||||||
#include "TypeAttributesTable.h"
|
#include "TypeAttributesTable.h"
|
||||||
#include <boost/algorithm/string.hpp>
|
|
||||||
|
|
||||||
namespace wrap {
|
namespace wrap {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue