From 1002696f83176c510a7eaef3a04312a29fc61c3a Mon Sep 17 00:00:00 2001 From: dellaert Date: Sun, 25 May 2014 13:29:06 -0400 Subject: [PATCH] Formatting and headers --- wrap/Argument.h | 4 ++-- wrap/ReturnValue.h | 21 +++++++++------------ wrap/StaticMethod.h | 22 +++++++++------------- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/wrap/Argument.h b/wrap/Argument.h index da15cda36..2a989713b 100644 --- a/wrap/Argument.h +++ b/wrap/Argument.h @@ -19,11 +19,11 @@ #pragma once +#include "FileWriter.h" + #include #include -#include "FileWriter.h" - namespace wrap { /// Argument class diff --git a/wrap/ReturnValue.h b/wrap/ReturnValue.h index 7a677532f..ea78923f6 100644 --- a/wrap/ReturnValue.h +++ b/wrap/ReturnValue.h @@ -8,12 +8,11 @@ * @author Richard Roberts */ -#include -#include - #include "FileWriter.h" #include "TypeAttributesTable.h" +#include + #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; diff --git a/wrap/StaticMethod.h b/wrap/StaticMethod.h index 576232346..e1855f4c2 100644 --- a/wrap/StaticMethod.h +++ b/wrap/StaticMethod.h @@ -23,9 +23,6 @@ #include "ReturnValue.h" #include "TypeAttributesTable.h" -#include -#include - 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& functionNames) const; + const std::string& cppClassName, const std::string& matlabQualName, + const std::string& matlabUniqueName, const std::string& wrapperName, + const TypeAttributesTable& typeAttributes, + std::vector& 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