/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: Frank Dellaert, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------------------------------------------------------------------------- */ /** * @file Module.h * @brief describes module to be wrapped * @author Frank Dellaert * @author Richard Roberts **/ #pragma once #include #include #include #include "Class.h" #include "TemplateInstantiationTypedef.h" #include "ForwardDeclaration.h" namespace wrap { /** * A module just has a name and a list of classes */ struct Module { std::string name; ///< module name std::vector classes; ///< list of classes std::vector templateInstantiationTypedefs; ///< list of template instantiations bool verbose; ///< verbose flag // std::vector using_namespaces; ///< all default namespaces std::vector forward_declarations; std::vector includes; ///< Include statements /// constructor that parses interface file Module(const std::string& interfacePath, const std::string& moduleName, bool enable_verbose=true); /// MATLAB code generation: void matlab_code( const std::string& path, const std::string& headerPath) const; void finish_wrapper(FileWriter& file, const std::vector& functionNames) const; void generateIncludes(FileWriter& file) const; private: static std::vector ExpandTypedefInstantiations(const std::vector& classes, const std::vector instantiations); static std::vector GenerateValidTypes(const std::vector& classes, const std::vector forwardDeclarations); static void WriteCollectorsAndCleanupFcn(FileWriter& wrapperFile, const std::string& moduleName, const std::vector& classes); static void WriteRTTIRegistry(FileWriter& wrapperFile, const std::string& moduleName, const std::vector& classes); }; } // \namespace wrap