From 22427b93b11d163de310d628a73053c7e541b269 Mon Sep 17 00:00:00 2001 From: takasehideki Date: Fri, 11 Mar 2022 14:44:29 +0900 Subject: [PATCH] remove generation of header_includer Since it was just included in two stages, mros2.cpp will include templates.hpp which will be generated into platform's workspace directly from mros2.cpp --- mros2_header_generator/header_includer.tpl | 1 - mros2_header_generator/templates_generator.py | 11 +++-------- src/mros2.cpp | 5 ++--- 3 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 mros2_header_generator/header_includer.tpl diff --git a/mros2_header_generator/header_includer.tpl b/mros2_header_generator/header_includer.tpl deleted file mode 100644 index ed76062..0000000 --- a/mros2_header_generator/header_includer.tpl +++ /dev/null @@ -1 +0,0 @@ -#include "../workspace/{{app}}/templates.hpp" \ No newline at end of file diff --git a/mros2_header_generator/templates_generator.py b/mros2_header_generator/templates_generator.py index 90e9698..1eeae9f 100644 --- a/mros2_header_generator/templates_generator.py +++ b/mros2_header_generator/templates_generator.py @@ -43,12 +43,7 @@ def main(): datatext = template.render({ "includeFiles":includeFiles, "pubMsgTypes":pubMsgTypes, "subMsgTypes":subMsgTypes }) with open(os.path.join(app+"/templates.hpp"), "wb") as f: f.write(datatext.encode('utf-8')) - - env = Environment(loader=FileSystemLoader('../mros2/mros2_header_generator')) - template = env.get_template('header_includer.tpl') - datatext = template.render({ "app": app }) - with open(os.path.join("../header_includer/header_includer.hpp"), "wb") as f: - f.write(datatext.encode('utf-8')) - + + if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/src/mros2.cpp b/src/mros2.cpp index 45011c1..a2c8014 100644 --- a/src/mros2.cpp +++ b/src/mros2.cpp @@ -274,8 +274,7 @@ void setTrue(void* args) *static_cast(args) = true; } - /* - * specialize template functions + * specialize template functions described in platform's workspace */ -#include "../../header_includer/header_includer.hpp" \ No newline at end of file +#include "templates.hpp"