Formatting and headers

release/4.3a0
dellaert 2014-05-25 13:29:06 -04:00
parent 43e238c6ab
commit 1002696f83
3 changed files with 20 additions and 27 deletions

View File

@ -19,11 +19,11 @@
#pragma once
#include "FileWriter.h"
#include <string>
#include <vector>
#include "FileWriter.h"
namespace wrap {
/// Argument class

View File

@ -8,12 +8,11 @@
* @author Richard Roberts
*/
#include <vector>
#include <map>
#include "FileWriter.h"
#include "TypeAttributesTable.h"
#include <vector>
#pragma once
namespace wrap {
@ -21,16 +20,13 @@ namespace wrap {
struct ReturnValue {
typedef enum {
CLASS = 1,
EIGEN = 2,
BASIS = 3,
VOID = 4
CLASS = 1, EIGEN = 2, BASIS = 3, VOID = 4
} return_category;
ReturnValue(bool enable_verbosity = true)
: verbose(enable_verbosity), isPtr1(false), isPtr2(false),
isPair(false), category1(CLASS), category2(CLASS)
{}
ReturnValue(bool enable_verbosity = true) :
verbose(enable_verbosity), isPtr1(false), isPtr2(false), isPair(false), category1(
CLASS), category2(CLASS) {
}
bool verbose;
bool isPtr1, isPtr2, isPair;
@ -49,7 +45,8 @@ struct ReturnValue {
std::string matlab_returnType() const;
void wrap_result(const std::string& result, FileWriter& file, const TypeAttributesTable& typeAttributes) const;
void wrap_result(const std::string& result, FileWriter& file,
const TypeAttributesTable& typeAttributes) const;
void wrapTypeUnwrap(FileWriter& wrapperFile) const;

View File

@ -23,9 +23,6 @@
#include "ReturnValue.h"
#include "TypeAttributesTable.h"
#include <string>
#include <list>
namespace wrap {
/// StaticMethod class
@ -33,7 +30,8 @@ struct StaticMethod {
/// Constructor creates empty object
StaticMethod(bool verbosity = true) :
verbose(verbosity) {}
verbose(verbosity) {
}
// Then the instance variables are set directly by the Module constructor
bool verbose;
@ -45,22 +43,20 @@ struct StaticMethod {
// with those in rhs, but in subsequent calls it adds additional argument
// lists as function overloads.
void addOverload(bool verbose, const std::string& name,
const ArgumentList& args, const ReturnValue& retVal);
const ArgumentList& args, const ReturnValue& retVal);
// MATLAB code generation
// classPath is class directory, e.g., ../matlab/@Point2
void proxy_wrapper_fragments(FileWriter& proxyFile, FileWriter& wrapperFile,
const std::string& cppClassName, const std::string& matlabQualName, const std::string& matlabUniqueName,
const std::string& wrapperName, const TypeAttributesTable& typeAttributes,
std::vector<std::string>& functionNames) const;
const std::string& cppClassName, const std::string& matlabQualName,
const std::string& matlabUniqueName, const std::string& wrapperName,
const TypeAttributesTable& typeAttributes,
std::vector<std::string>& functionNames) const;
private:
std::string wrapper_fragment(FileWriter& file,
const std::string& cppClassName,
const std::string& matlabUniqueName,
int overload,
int id,
const TypeAttributesTable& typeAttributes) const; ///< cpp wrapper
const std::string& cppClassName, const std::string& matlabUniqueName,
int overload, int id, const TypeAttributesTable& typeAttributes) const; ///< cpp wrapper
};
} // \namespace wrap