Skip to content

Commit b162ff2

Browse files
committed
changes in exp2cxx broke exp2python; this fixes it
1 parent 6372b27 commit b162ff2

File tree

4 files changed

+6
-98
lines changed

4 files changed

+6
-98
lines changed

src/exp2python/src/classes_python.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,22 +1860,6 @@ ENTITYPrint( Entity entity, FILES * files, Schema schema ) {
18601860
DEBUG( "DONE ENTITYPrint\n" ) ;
18611861
}
18621862

1863-
void
1864-
MODELPrintConstructorBody( Entity entity, FILES * files, Schema schema
1865-
/*, int index*/ ) {
1866-
}
1867-
1868-
void
1869-
MODELPrint( Entity entity, FILES * files, Schema schema, int index ) {
1870-
}
1871-
1872-
void
1873-
ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap ) {
1874-
}
1875-
1876-
void
1877-
MODELprint_new( Entity entity, FILES * files, Schema schema ) {
1878-
}
18791863

18801864
/******************************************************************
18811865
** TYPE GENERATION **/

src/exp2python/src/classes_wrapper_python.cc

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ print_file_trailer( Express express, FILES * files ) {
140140
******************************************************************/
141141

142142
void
143-
SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
143+
SCOPEPrint( Scope scope, FILES * files, Schema schema,
144144
ComplexCollect * col, int cnt ) {
145145
Linked_List list = SCOPEget_entities_superclass_order( scope );
146146
Linked_List function_list = SCOPEget_functions( scope );
@@ -251,7 +251,6 @@ PrintModelContentsSchema( Scope scope, FILES * files, Schema schema,
251251
fprintf( files->inc, "\n//\t***** Describe the Entities \t\n" );
252252
LISTdo( list, e, Entity );
253253
ENTITYput_superclass( e ); /* find supertype to use for single */
254-
ENTITYprint_new( e, files, schema, 0 ); /* inheritance */
255254
LISTod;
256255

257256
// Print Entity Classes
@@ -316,7 +315,7 @@ PrintModelContentsSchema( Scope scope, FILES * files, Schema schema,
316315
******************************************************************/
317316

318317
void
319-
SCHEMAprint( Schema schema, FILES * files, Express model, void * complexCol,
318+
SCHEMAprint( Schema schema, FILES * files, void * complexCol,
320319
int suffix ) {
321320
char schnm[MAX_LEN], sufnm[MAX_LEN], fnm[MAX_LEN], *np;
322321
/* sufnm = schema name + suffix */
@@ -366,7 +365,7 @@ SCHEMAprint( Schema schema, FILES * files, Express model, void * complexCol,
366365
/********** do the schemas ***********/
367366

368367
/* really, create calls for entity constructors */
369-
SCOPEPrint( schema, files, schema, model, ( ComplexCollect * )complexCol,
368+
SCOPEPrint( schema, files, schema, ( ComplexCollect * )complexCol,
370369
suffix );
371370

372371
/********** close the files ***********/
@@ -452,51 +451,17 @@ EXPRESSPrint( Express express, ComplexCollect & col, FILES * files ) {
452451
/* return if failure */
453452
/* 1. header file */
454453
sprintf( fnm, "%s.h", schnm = ClassName( EXPRESSget_basename( express ) ) );
455-
//if( !( incfile = ( files -> inc ) = FILEcreate( fnm ) ) ) {
456-
// return;
457-
//}
458-
//fprintf( incfile, "/* %cId$ */\n", '$' );
459-
460-
//fprintf( incfile, "#ifdef __O3DB__\n" );
461-
//fprintf( incfile, "#include <OpenOODB.h>\n" );
462-
//fprintf( incfile, "#endif\n\n" );
463-
//fprintf( incfile, "#include <sdai.h> \n" );
464-
/* fprintf (incfile, "#include <schema.h> \n");*/
465-
/* fprintf (incfile, "extern void %sInit (Registry & r);\n", schnm);*/
466-
467-
//np = fnm + strlen( fnm ) - 1; /* point to end of constant part of string */
468454

469455
/* 2. class source file */
470456
//sprintf( np, "cc" );
471457
if( !( libfile = ( files -> lib ) = FILEcreate( fnm ) ) ) {
472458
return;
473459
}
474-
//fprintf( libfile, "/* %cId$ */\n", '$' );
475-
//fprintf( libfile, "#include <%s.h> n", schnm );
476-
477-
/* 3. source code to initialize entity registry */
478-
/* prints header of file for input function */
479-
480-
//sprintf( np, "init.cc" );
481-
//if( !( initfile = ( files -> init ) = FILEcreate( fnm ) ) ) {
482-
// return;
483-
//}
484-
//fprintf( initfile, "/* $Id%d */\n", '$' );
485-
//fprintf( initfile, "#include <%s.h>\n\n", schnm );
486-
//fprintf( initfile, "void \n%sInit (Registry& reg)\n{\n", schnm );
487-
488-
/********** record in files relating to entire input ***********/
489-
490-
/* add to schema's include and initialization file */
491-
//fprintf( schemafile, "#include <%s.h>\n\n", schnm );
492-
//fprintf( schemafile, "extern void %sInit (Registry & r);\n", schnm );
493-
//fprintf( schemainit, "\t extern void %sInit (Registry & r);\n", schnm );
494-
//fprintf( schemainit, "\t %sInit (reg);\n", schnm );
495460

496461
/********** do all schemas ***********/
497462
DICTdo_init( express->symbol_table, &de );
498463
while( 0 != ( schema = ( Scope )DICTdo( &de ) ) ) {
499-
SCOPEPrint( schema, files, schema, express, &col, 0 );
464+
SCOPEPrint( schema, files, schema, &col, 0 );
500465
}
501466

502467

src/exp2python/src/multpass_python.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ void print_schemas_separate( Express express, void * complexCol, FILES * files )
104104
// will create files with the suffixes "_1", "_2", etc.
105105
// If not, no file suffix will be added. */
106106
suffix = ++*( int * )schema->clientData;
107-
SCHEMAprint( schema, files, express, complexCol,
107+
SCHEMAprint( schema, files, complexCol,
108108
suffix );
109109
} else {
110-
SCHEMAprint( schema, files, express, complexCol, 0 );
110+
SCHEMAprint( schema, files, complexCol, 0 );
111111
}
112112
}
113113
complete = complete && ( schema->search_id == PROCESSED );

src/exp2python/src/selects_python.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -637,47 +637,6 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
637637
char * classnm ) {
638638
}
639639

640-
/*******************
641-
TYPEselect_lib_print_part_four prints part 4 of the SDAI document of a select
642-
class.
643-
*******************/
644-
void
645-
TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
646-
Linked_List dups, char * n ) {
647-
}
648-
649-
650-
/*******************
651-
TYPEselect_init_print prints the types that belong to the select type
652-
*******************/
653-
654-
void
655-
TYPEselect_init_print( const Type type, FILE * f, Schema schema ) {
656-
#define schema_name SCHEMAget_name(schema)
657-
LISTdo( SEL_TYPEget_items( type ), t, Type )
658-
659-
fprintf( f, "\t%s -> Elements ().AddNode",
660-
TYPEtd_name( type ) );
661-
fprintf( f, " (%s);\n",
662-
TYPEtd_name( t ) );
663-
LISTod;
664-
#undef schema_name
665-
}
666-
667-
void
668-
TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
669-
}
670-
671-
672-
void
673-
TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
674-
}
675-
676-
void
677-
TYPEselect_lib_virtual( const Type type, FILE * f, Schema schema ) {
678-
TYPEselect_lib_part21( type, f, schema );
679-
TYPEselect_lib_StrToVal( type, f, schema );
680-
}
681640

682641
void
683642
SELlib_print_protected( const Type type, FILE * f, const Schema schema ) {

0 commit comments

Comments
 (0)