From 8658f33f6473b443b0906351c5faa43c4c6eebd1 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Wed, 20 Feb 2019 13:21:14 -0600 Subject: [PATCH] Include Trickified classes/enums in S_sie.resource Fixes #688 --- .../Interface_Code_Gen/PrintAttributes.cpp | 39 +------------------ .../Interface_Code_Gen/PrintAttributes.hh | 1 - 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp index 8583c5be..6d6725cd 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp @@ -112,27 +112,6 @@ static void _mkdir(const char *dir) { } } -// this is a subset of tests on the header file to determine if this file is not excluded for any reason. -bool PrintAttributes::isFileIncluded(std::string header_file_name) { - // several tests require the real path of the header file. - char * realPath = almostRealPath(header_file_name.c_str()) ; - - if ( realPath != NULL ) { - // Only include user directories (not system dirs like /usr/include) - if ( hsd.isPathInUserDir(realPath) ) { - // Don't process files in excluded directories - if ( (hsd.isPathInExclude(realPath) == false) and (hsd.isPathInICGExclude(realPath) == false) ) { - // Only include files that do not have ICG: (No) - // hasICGNo uses original header name, not the real path - if ( ! cs.hasICGNo(header_file_name) ) { - return true ; - } - } - } - } - return false ; -} - bool PrintAttributes::openIOFile(const std::string& header_file_name) { /** * There are a lot of conditions to be met in order to open an IO file. We store the headers @@ -258,18 +237,9 @@ void PrintAttributes::printClass( ClassValues * cv ) { outfile.close(); } - if (!isHeaderExcluded(fileName)) { + if (!isHeaderExcluded(fileName, false)) { printer->printClassMap(class_map_outfile, cv); } -/* - char* realPath = almostRealPath(fileName.c_str()); - if (realPath) { - if (isFileIncluded(fileName) or hsd.isPathInExtLib(realPath)) { - printer->printClassMap(class_map_outfile, cv); - } - free(realPath); - } -*/ } void PrintAttributes::printEnum(EnumValues* ev) { @@ -293,14 +263,9 @@ void PrintAttributes::printEnum(EnumValues* ev) { outfile.close() ; } - if (!isHeaderExcluded(fileName)) { + if (!isHeaderExcluded(fileName), false) { printer->printEnumMap(enum_map_outfile, ev); } -/* - if (isFileIncluded(fileName)) { - printer->printEnumMap(enum_map_outfile, ev) ; - } -*/ } void PrintAttributes::createMapFiles() { diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh index 5a381419..dc7c09cf 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh @@ -101,7 +101,6 @@ class PrintAttributes { bool openIOFile(const std::string& header_file_name) ; - bool isFileIncluded(std::string header_file_name) ; bool isIOFileOutOfDate(std::string header_file_name, std::string io_file_name ) ; bool hasBeenProcessed(EnumValues& enumValues); bool hasBeenProcessed(ClassValues& classValues);