mirror of
https://github.com/nasa/trick.git
synced 2025-02-06 19:09:20 +00:00
Merge pull request #736 from nasa/688
Include Trickified classes/enums in S_sie.resource
This commit is contained in:
commit
6eeb4cee80
@ -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) {
|
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
|
* 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();
|
outfile.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isHeaderExcluded(fileName)) {
|
if (!isHeaderExcluded(fileName, false)) {
|
||||||
printer->printClassMap(class_map_outfile, cv);
|
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) {
|
void PrintAttributes::printEnum(EnumValues* ev) {
|
||||||
@ -293,14 +263,9 @@ void PrintAttributes::printEnum(EnumValues* ev) {
|
|||||||
outfile.close() ;
|
outfile.close() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isHeaderExcluded(fileName)) {
|
if (!isHeaderExcluded(fileName), false) {
|
||||||
printer->printEnumMap(enum_map_outfile, ev);
|
printer->printEnumMap(enum_map_outfile, ev);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if (isFileIncluded(fileName)) {
|
|
||||||
printer->printEnumMap(enum_map_outfile, ev) ;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintAttributes::createMapFiles() {
|
void PrintAttributes::createMapFiles() {
|
||||||
|
@ -101,7 +101,6 @@ class PrintAttributes {
|
|||||||
|
|
||||||
bool openIOFile(const std::string& header_file_name) ;
|
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 isIOFileOutOfDate(std::string header_file_name, std::string io_file_name ) ;
|
||||||
bool hasBeenProcessed(EnumValues& enumValues);
|
bool hasBeenProcessed(EnumValues& enumValues);
|
||||||
bool hasBeenProcessed(ClassValues& classValues);
|
bool hasBeenProcessed(ClassValues& classValues);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user