From 0993b3008f03fdd7c397f382eae105d20dedc8c5 Mon Sep 17 00:00:00 2001 From: Valery Date: Sat, 27 Apr 2024 16:58:26 +0300 Subject: [PATCH] add info to generated davis files --- davis_one/davis.cpp | 8 ++++++-- davis_one/davis.h | 6 +++++- davis_one_maker.py | 7 +++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/davis_one/davis.cpp b/davis_one/davis.cpp index 0164b47..622c2d3 100644 --- a/davis_one/davis.cpp +++ b/davis_one/davis.cpp @@ -1,9 +1,13 @@ + +//This file was generated by davis_one_maker.py script. +//Use davis_files.txt and special comments to change generated davis.h and davis.cpp + #include "davis.h" -#include #include -#include +#include #include +#include #include namespace { using std::string; diff --git a/davis_one/davis.h b/davis_one/davis.h index 1aa99fb..72382b4 100644 --- a/davis_one/davis.h +++ b/davis_one/davis.h @@ -1,9 +1,13 @@ + +//This file was generated by davis_one_maker.py script. +//Use davis_files.txt and special comments to change generated davis.h and davis.cpp + #ifndef DAVIS_H_ #define DAVIS_H_ -#include #include #include +#include #include namespace { diff --git a/davis_one_maker.py b/davis_one_maker.py index bc52e48..336837d 100644 --- a/davis_one_maker.py +++ b/davis_one_maker.py @@ -2,6 +2,11 @@ ################################################# ########### CONSTANTS ########### ################################################# +GENERATED_INFO_HEADER = """ +//This file was generated by davis_one_maker.py script. +//Use davis_files.txt and special comments to change generated davis.h and davis.cpp + +""" START_DAVIS_H = """#ifndef DAVIS_H_ #define DAVIS_H_ @@ -77,8 +82,10 @@ def grab_namespace_code(namespace_text_start, delete_file_if_exists(OUTPUT_CPP_FILE_NAME) file_h = open(OUTPUT_H_FILE_NAME, 'a') +file_h.write(GENERATED_INFO_HEADER) file_h.write(START_DAVIS_H) file_cpp = open(OUTPUT_CPP_FILE_NAME, 'a') +file_cpp.write(GENERATED_INFO_HEADER) file_cpp.write(START_DAVIS_CPP) is_grab_includes = False