Skip to content

Commit a7579f0

Browse files
committed
remove helper function header - code moved to headers for individual types/entities
1 parent 317b40b commit a7579f0

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

cmake/schema_scanner/schemaScanner.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ string makeShortName( const char * longName ) {
115115
if( strlen( longName ) < filename.size() ) {
116116
filename = longName;
117117
}
118-
filename.insert( 0, "Sdai_" );
118+
filename.insert( 0, "sdai_" );
119119
return filename;
120120
}
121121

@@ -164,7 +164,6 @@ void writeLists( const char * schemaName, stringstream & eh, stringstream & ei,
164164

165165
cmLists << "set( " << shortName << "_misc_hdrs" << endl;
166166
cmLists << " Sdaiclasses.h schema.h" << endl;
167-
cmLists << " Sdai" << schema_upper << "Helpers.h" << endl;
168167
cmLists << " Sdai" << schema_upper << "Names.h" << endl;
169168
cmLists << " Sdai" << schema_upper << ".h" << endl;
170169
cmLists << " )" << endl << endl;

src/exp2cxx/classes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ typedef struct file_holder {
6767
* Nec. if ent1 of schemaA has attribute ent2 from schemaB.
6868
*/
6969
FILE * names; /**< MAP Nov 2011 - header with namespace for entity and attr descriptors */
70-
FILE * helpers; /**< MAP Mar 2012 - header with inline helper functions. Currently only used for
71-
helper functions to find runtime aggregate bounds */
7270
} File_holder, FILES;
7371

7472
/** these fields are used so that ENTITY types are processed in order

src/exp2cxx/classes_wrapper.cc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol,
448448
#endif
449449
fprintf( initfile, "#include <Registry.h>\n#include <string>\n" );
450450
fprintf( initfile, "#include <sc_memmgr.h>\n" );
451-
fprintf( files->init, "\n#include \"%sHelpers.h\"\n", schnm );
452451

453452
fprintf( initfile, "\nvoid %sInit (Registry& reg) {\n", schnm );
454453

@@ -497,15 +496,6 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol,
497496
initfile = files->init = fopen( fnm, "a" );
498497
}
499498

500-
// 5. header containing inline helper functions (for runtime aggregate bounds, possibly other uses)
501-
sprintf( fnm, "%sHelpers.h", schnm );
502-
if( !( files->helpers = FILEcreate( fnm ) ) ) {
503-
return;
504-
}
505-
fprintf( files->helpers, "\n// In the exp2cxx source code, this file is referred to as files->helpers.\n// This line printed at %s:%d (one of two possible locations).\n\n", __FILE__, __LINE__ );
506-
fprintf( files->helpers, "//this file contains inline helper functions (for runtime aggregate bounds, possibly other uses)\n\n" );
507-
508-
509499
/********** record in files relating to entire input ***********/
510500

511501
/* add to schema's include and initialization file */
@@ -533,7 +523,6 @@ void SCHEMAprint( Schema schema, FILES * files, void * complexCol,
533523
} else {
534524
fclose( initfile );
535525
}
536-
FILEclose( files->helpers );
537526
}
538527

539528
/** ****************************************************************
@@ -650,18 +639,8 @@ EXPRESSPrint( Express express, ComplexCollect & col, FILES * files ) {
650639
fprintf( files->init, "\n// in the exp2cxx source code, this file is generally referred to as files->init or initfile\n" );
651640

652641
fprintf( initfile, "#include \"%s.h\"\n\n", schnm );
653-
fprintf( files->init, "\n#include \"%sHelpers.h\"\n", schnm );
654642
fprintf( initfile, "void \n%sInit (Registry& reg)\n{\n", schnm );
655643

656-
// 5. header containing inline helper functions (for runtime aggregate bounds, possibly other uses)
657-
sprintf( fnm, "%sHelpers.h", schnm );
658-
if( !( files->helpers = FILEcreate( fnm ) ) ) {
659-
return;
660-
}
661-
fprintf( files->helpers, "\n// In the exp2cxx source code, this file is referred to as files->helpers.\n// This line printed at %s:%d (one of two possible locations).\n\n", __FILE__, __LINE__ );
662-
fprintf( files->helpers, "//this file contains inline helper functions (for runtime aggregate bounds, possibly other uses)\n\n" );
663-
664-
665644
/********** record in files relating to entire input ***********/
666645

667646
/* add to schema's include and initialization file */

0 commit comments

Comments
 (0)