remove unused function PrintModelContentsSchema()
This commit is contained in:
@@ -333,93 +333,6 @@ void SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void PrintModelContentsSchema( Scope scope, FILES * files, Schema schema,
|
||||
Express model ) {
|
||||
Linked_List list;
|
||||
char nm[BUFSIZ];
|
||||
DictionaryEntry de;
|
||||
|
||||
fprintf( files -> inc, "\n/* ************** TYPES */\n" );
|
||||
fprintf( files -> lib, "\n/* ************** TYPES */\n" );
|
||||
fprintf( files -> init, "\n/* ************** TYPES */\n" );
|
||||
|
||||
/* do \'new\'s for types descriptors */
|
||||
SCOPEdo_types( scope, t, de )
|
||||
TYPEprint_new( t, files->create, schema );
|
||||
SCOPEod;
|
||||
|
||||
/* do \'new\'s for entity descriptors */
|
||||
list = SCOPEget_entities_superclass_order( scope );
|
||||
fprintf( files->init, "\n // ***** Describe the Entities */\n" );
|
||||
fprintf( files->inc, "\n// ***** Describe the Entities \n" );
|
||||
LISTdo( list, e, Entity );
|
||||
ENTITYput_superclass( e ); /* find supertype to use for single */
|
||||
ENTITYprint_new( e, files, schema, 0 ); /* inheritance */
|
||||
LISTod;
|
||||
|
||||
/* fill in the values for the type descriptors */
|
||||
/* and print the enumerations */
|
||||
fprintf( files->inc, "\n// ***** Describe the Other Types \n" );
|
||||
SCOPEdo_types( scope, t, de )
|
||||
TYPEprint_descriptions( t, files, schema );
|
||||
if( TYPEis_select( t ) ) {
|
||||
/* do the select aggregates here */
|
||||
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ );
|
||||
fprintf( files->inc, "class %s;\ntypedef %s * %sH;\n", nm, nm, nm );
|
||||
fprintf( files->inc,
|
||||
"typedef %s * %s_ptr;\ntypedef %s_ptr %s_var;\n\n",
|
||||
nm, nm, nm, nm );
|
||||
fprintf( files->inc, "class %s_agg;\ntypedef %s_agg * %s_aggH;\n", nm, nm, nm );
|
||||
fprintf( files->inc,
|
||||
"typedef %s_agg * %s_agg_ptr;\ntypedef %s_agg_ptr %s_agg_var;\n\n",
|
||||
nm, nm, nm, nm );
|
||||
}
|
||||
SCOPEod;
|
||||
|
||||
/* build the typedefs */
|
||||
SCOPEdo_types( scope, t, de )
|
||||
if( !( TYPEis_select( t ) ) ) {
|
||||
TYPEprint_typedefs( t, files ->inc );
|
||||
|
||||
//print in namespace. Some logic copied from TypeDescriptorName()
|
||||
fprintf( files->names, " extern %s * %s%s;\n", GetTypeDescriptorName( t ), TYPEprefix( t ), TYPEget_name( t ) );
|
||||
}
|
||||
SCOPEod;
|
||||
|
||||
/* do the select definitions next, since they depend on the others */
|
||||
fprintf( files->inc, "\n// ***** Build the SELECT Types \n" );
|
||||
fprintf( files->init, "\n// ***** Add the TypeDescriptor's to the"
|
||||
" SELECT Types \n" );
|
||||
SCOPEdo_types( scope, t, de )
|
||||
if( TYPEis_select( t ) ) {
|
||||
TYPEselect_print( t, files, schema );
|
||||
}
|
||||
SCOPEod;
|
||||
|
||||
fprintf( files -> inc, "\n/* ************** ENTITIES */\n" );
|
||||
fprintf( files -> lib, "\n/* ************** ENTITIES */\n" );
|
||||
|
||||
fprintf( files->inc, "\n// ***** Print Entity Classes \n" );
|
||||
LISTdo( list, e, Entity );
|
||||
ENTITYPrint( e, files, schema );
|
||||
LISTod;
|
||||
LISTfree( list );
|
||||
|
||||
#if following_should_be_done_in_caller
|
||||
list = SCOPEget_schemata( scope );
|
||||
fprintf( files -> inc, "\n/* ************** SCOPE */\n" );
|
||||
fprintf( files -> lib, "\n/* ************** SCOPE */\n" );
|
||||
|
||||
LISTdo( list, s, Schema )
|
||||
sprintf( nm, "%s::schema", SCHEMAget_name( s ) );
|
||||
fprintf( files->inc, "// include definitions for %s \n", nm );
|
||||
fprintf( files->inc, "#include <%s.h> \n", nm );
|
||||
LISTod;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/** ****************************************************************
|
||||
** Procedure: SCHEMAprint
|
||||
** Parameters: const Schema schema - schema to print
|
||||
|
||||
Reference in New Issue
Block a user