selects.c: don't print tabs into schema files, also some minor cleanup
This commit is contained in:
+139
-161
@@ -1,4 +1,5 @@
|
||||
/*******************************************************************
|
||||
/** *****************************************************************
|
||||
** \file selects.c
|
||||
** FedEx parser output module for generating C++ class definitions
|
||||
** December 5, 1989
|
||||
** release 2 17-Feb-1992
|
||||
@@ -43,7 +44,7 @@ void ATTRprint_access_methods_put_head( const char * entnm, Variable a, FILE * f
|
||||
((t)->u.type->body->type == number_) )
|
||||
#define PRINT_BUG_REPORT \
|
||||
fprintf( f, " std::cerr << __FILE__ << \":\" << __LINE__ << \": ERROR" \
|
||||
" in schema library: \\n\" \n\t<< _POC_ << \"\\n\\n\";\n");
|
||||
" in schema library: \\n\" \n << _POC_ << \"\\n\\n\";\n");
|
||||
|
||||
#define PRINT_SELECTBUG_WARNING(f) \
|
||||
fprintf( (f), "\n severity( SEVERITY_WARNING );\n" ); \
|
||||
@@ -187,7 +188,7 @@ SELgetnew_dmlist( const Type type ) {
|
||||
|
||||
LISTdo( complete, t, Type )
|
||||
|
||||
/* if t\'s underlying type is not already in newlist, */
|
||||
/* if t's underlying type is not already in newlist, */
|
||||
if( ! utype_member( newlist, t, 0 ) ) {
|
||||
LISTadd_last( newlist, ( Generic ) t );
|
||||
}
|
||||
@@ -261,7 +262,7 @@ duplicate_in_express_list( const Linked_List list, const Type check ) {
|
||||
|
||||
LISTdo( list, t, Type )
|
||||
if( t == check ) {
|
||||
; /* don\'t compare check to itself */
|
||||
; /* don't compare check to itself */
|
||||
} else {
|
||||
return TRUE; /* other things in the list conflict */
|
||||
}
|
||||
@@ -306,7 +307,7 @@ duplicate_utype_member( const Linked_List list, const Type check ) {
|
||||
if( t == check ) {
|
||||
;
|
||||
}
|
||||
/* don\'t compare check to itself */
|
||||
/* don't compare check to itself */
|
||||
else { /* continue looking */
|
||||
strncpy( b, TYPEget_utype( t ), BUFSIZ );
|
||||
if( ( !strcmp( b, TYPEget_utype( check ) ) )
|
||||
@@ -317,7 +318,7 @@ duplicate_utype_member( const Linked_List list, const Type check ) {
|
||||
}
|
||||
if( ! strcmp( b, "SDAI_Integer" ) &&
|
||||
( ! strcmp( TYPEget_utype( check ), "SDAI_Real" ) ) )
|
||||
/* integer\'s and real\'s are not unique */
|
||||
/* integer's and real's are not unique */
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -586,64 +587,54 @@ TYPEselect_inc_print_vars( const Type type, FILE * f, Linked_List dups ) {
|
||||
strncpy( tdnm, TYPEtd_name( type ), BUFSIZ );
|
||||
size = strlen( classnm ) + 2; /* for formatting output */
|
||||
|
||||
fprintf( f, "\n////////// SELECT TYPE %s\n",
|
||||
SelectName( TYPEget_name( type ) ) );
|
||||
/* fprintf( f, "class %s;\n"*/
|
||||
/* "typedef %s * %sH;\n\n",*/
|
||||
/* classnm, classnm, classnm);*/
|
||||
fprintf( f, "\n////////// SELECT TYPE %s\n", SelectName( TYPEget_name( type ) ) );
|
||||
fprintf( f, "class %s : public " BASE_SELECT " {\n", classnm );
|
||||
fprintf( f, " protected:\n" );
|
||||
/* fprintf( f, " \tunion { \n" ); */
|
||||
fprintf( f, "/* \tunion { */\n" );
|
||||
fprintf( f, "\t// types in SELECT \n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
fprintf( f, "\t// %s\t-- %s\n",
|
||||
SEL_ITEMget_enumtype( t ), FundamentalType( t, 0 ) );
|
||||
LISTod;
|
||||
fprintf( f, " // types in SELECT \n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type ) {
|
||||
fprintf( f, " // %s -- %s\n", SEL_ITEMget_enumtype( t ), FundamentalType( t, 0 ) );
|
||||
} LISTod;
|
||||
|
||||
LISTdo( data_members, t, Type )
|
||||
strncpy( dmname, SEL_ITEMget_dmname( t ), BUFSIZ );
|
||||
fprintf( f, "\t %s _%s;\n", TYPEget_utype( t ), dmname );
|
||||
LISTod;
|
||||
LISTdo( data_members, t, Type ) {
|
||||
strncpy( dmname, SEL_ITEMget_dmname( t ), BUFSIZ );
|
||||
fprintf( f, " %s%s _%s;\n", TYPEget_utype( t ), TYPEis_aggregate( t ) ? "_ptr" : "", dmname );
|
||||
} LISTod;
|
||||
|
||||
/* fprintf( f, " \t} ;" );*/
|
||||
fprintf( f, "/* \t} ; */" );
|
||||
fprintf( f, " /* unnamed union of select items */\n" );
|
||||
|
||||
fprintf( f, "\n public:\n" );
|
||||
fprintf( f,
|
||||
"\tvirtual const TypeDescriptor * AssignEntity (SDAI_Application_instance * se);\n"
|
||||
"\tvirtual SDAI_Select * NewSelect ();\n"
|
||||
" virtual const TypeDescriptor * AssignEntity (SDAI_Application_instance * se);\n"
|
||||
" virtual SDAI_Select * NewSelect ();\n"
|
||||
);
|
||||
|
||||
fprintf( f, "\n\tvirtual BASE_TYPE ValueType() const;\n" );
|
||||
fprintf( f, "\n virtual BASE_TYPE ValueType() const;\n" );
|
||||
|
||||
fprintf( f, "\n\n// STEP Part 21\n" );
|
||||
fprintf( f, "\tvirtual void STEPwrite_content (ostream& out =std::cout,\n"
|
||||
"\t\t\t\t\tconst char *currSch =0) const;\n" );
|
||||
fprintf( f, "\tvirtual void STEPwrite_verbose (ostream& out =std::cout,\n"
|
||||
"\t\t\t\t\tconst char *currSch =0) const;\n" );
|
||||
fprintf( f, "\tvirtual Severity STEPread_content (istream& in =cin,\n"
|
||||
"\t\tInstMgr * instances =0, const char *utype =0,\n"
|
||||
"\t\tint addFileId =0, const char *currSch =0);\n" );
|
||||
fprintf( f, " virtual void STEPwrite_content (ostream& out =std::cout,\n"
|
||||
" const char *currSch =0) const;\n" );
|
||||
fprintf( f, " virtual void STEPwrite_verbose (ostream& out =std::cout,\n"
|
||||
" const char *currSch =0) const;\n" );
|
||||
fprintf( f, " virtual Severity STEPread_content (istream& in =cin,\n"
|
||||
" InstMgr * instances =0, const char *utype =0,\n"
|
||||
" int addFileId =0, const char *currSch =0);\n" );
|
||||
|
||||
/* read StrToVal_content */
|
||||
fprintf( f, "\tvirtual Severity StrToVal_content "
|
||||
"(const char *,\n\t\tInstMgr * instances =0);\n" );
|
||||
fprintf( f, " virtual Severity StrToVal_content "
|
||||
"(const char *,\n InstMgr * instances =0);\n" );
|
||||
|
||||
/* constructor(s) */
|
||||
fprintf( f, "\n// STEP Part 22: SDAI\n" );
|
||||
fprintf( f, "\n// constructors\n" );
|
||||
fprintf( f, "\t%s( const SelectTypeDescriptor * =%s );\n",
|
||||
fprintf( f, " %s( const SelectTypeDescriptor * =%s );\n",
|
||||
classnm, tdnm );
|
||||
|
||||
fprintf( f, "\t// part 1\n" );
|
||||
fprintf( f, " // part 1\n" );
|
||||
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
if( ( TYPEis_entity( t ) )
|
||||
|| ( !utype_member( dups, t, 1 ) ) ) {
|
||||
/** if an entity or not in the dup list **/
|
||||
fprintf( f, "\t%s( const %s&,\n\t",
|
||||
fprintf( f, " %s( const %s&,\n ",
|
||||
SelectName( TYPEget_name( type ) ), AccessType( t ) );
|
||||
for( j = 0; j < size; j++ ) {
|
||||
fprintf( f, " " );
|
||||
@@ -653,7 +644,7 @@ TYPEselect_inc_print_vars( const Type type, FILE * f, Linked_List dups ) {
|
||||
LISTod;
|
||||
LISTdo( dups, t, Type )
|
||||
if( ! TYPEis_entity( t ) ) { /* entities were done already */
|
||||
fprintf( f, "\t%s( const %s&,\n\t",
|
||||
fprintf( f, " %s( const %s&,\n ",
|
||||
SelectName( TYPEget_name( type ) ),
|
||||
isAggregateType( t ) ? AccessType( t ) : TYPEget_utype( t ) );
|
||||
for( j = 0; j < size; j++ ) {
|
||||
@@ -664,7 +655,7 @@ TYPEselect_inc_print_vars( const Type type, FILE * f, Linked_List dups ) {
|
||||
LISTod;
|
||||
|
||||
/* destructor */
|
||||
fprintf( f, "\tvirtual ~%s();\n", classnm );
|
||||
fprintf( f, " virtual ~%s();\n", classnm );
|
||||
LISTfree( data_members );
|
||||
}
|
||||
|
||||
@@ -685,24 +676,24 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
|
||||
strncpy( tdnm, TYPEtd_name( type ), BUFSIZ );
|
||||
TYPEselect_inc_print_vars( type, f, dups );
|
||||
|
||||
fprintf( f, "\n\t// part 2\n" );
|
||||
fprintf( f, "\n // part 2\n" );
|
||||
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
if( ( TYPEis_entity( t ) )
|
||||
|| ( !utype_member( dups, t, 1 ) ) ) {
|
||||
/** if an entity or not in the dup list **/
|
||||
fprintf( f, "\toperator %s();\n", AccessType( t ) );
|
||||
fprintf( f, " operator %s();\n", AccessType( t ) );
|
||||
}
|
||||
LISTod;
|
||||
LISTdo( dups, t, Type )
|
||||
/* do the dups once only */
|
||||
if( ! TYPEis_entity( t ) ) /* entities were done already */
|
||||
fprintf( f, "\toperator %s ();\n",
|
||||
fprintf( f, " operator %s ();\n",
|
||||
( TYPEis_aggregate( t ) || TYPEis_select( t ) ) ?
|
||||
AccessType( t ) : TYPEget_utype( t ) );
|
||||
LISTod;
|
||||
|
||||
fprintf( f, "\n\t// part 3\n" );
|
||||
fprintf( f, "\n // part 3\n" );
|
||||
attrs = SEL_TYPEgetnew_attribute_list( type );
|
||||
/* get the list of unique attributes from the entity items */
|
||||
LISTdo( attrs, a, Variable )
|
||||
@@ -712,56 +703,53 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
|
||||
LISTod;
|
||||
LISTfree( attrs );
|
||||
|
||||
fprintf( f, "\n\t// part 4\n" );
|
||||
fprintf( f, "\n // part 4\n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
if( ( TYPEis_entity( t ) )
|
||||
|| ( !utype_member( dups, t, 1 ) ) ) {
|
||||
/** if an entity or not in the dup list **/
|
||||
fprintf( f, "\t%s& operator =( const %s& );\n",
|
||||
fprintf( f, " %s& operator =( const %s& );\n",
|
||||
SelectName( TYPEget_name( type ) ), AccessType( t ) );
|
||||
}
|
||||
LISTod;
|
||||
LISTdo( dups, t, Type )
|
||||
if( ! TYPEis_entity( t ) ) { /* entities were done already */
|
||||
fprintf( f, "\t%s& operator =( const %s& );\n",
|
||||
fprintf( f, " %s& operator =( const %s& );\n",
|
||||
SelectName( TYPEget_name( type ) ),
|
||||
isAggregateType( t ) ? AccessType( t ) : TYPEget_utype( t ) );
|
||||
}
|
||||
LISTod;
|
||||
|
||||
fprintf( f, "\t// not in SDAI\n"
|
||||
"\t%s& ShallowCopy ( const %s& );\n",
|
||||
fprintf( f, " // not in SDAI\n"
|
||||
" %s& ShallowCopy ( const %s& );\n",
|
||||
n, n );
|
||||
|
||||
fprintf( f, "\n#ifdef COMPILER_DEFINES_OPERATOR_EQ\n#else\n" );
|
||||
fprintf( f, "\t%s& operator =( %s * const & );\n", n, n );
|
||||
fprintf( f, "\tSDAI_Select& operator =( const SDAI_Select& );\n" );
|
||||
/* fprintf( f, "\t%s& operator =( const %s& );\n", n, n );*/
|
||||
fprintf( f, " %s& operator =( %s * const & );\n", n, n );
|
||||
fprintf( f, " SDAI_Select& operator =( const SDAI_Select& );\n" );
|
||||
fprintf( f, "#endif\n" );
|
||||
|
||||
fprintf( f, "\n\t// part 5\n" );
|
||||
fprintf( f, "\n // part 5\n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
fprintf( f, "\tLogical Is%s() const;\n",
|
||||
fprintf( f, " Logical Is%s() const;\n",
|
||||
FirstToUpper( TYPEget_name( t ) ) );
|
||||
LISTod;
|
||||
|
||||
fprintf( f, "\n\t// part 6 ... UnderlyingTypeName () implemented in"
|
||||
fprintf( f, "\n // part 6 ... UnderlyingTypeName () implemented in"
|
||||
" SDAI_Select class ...\n" );
|
||||
/* fprintf( f, "\tSDAI_String UnderlyingTypeName() const;\n" );*/
|
||||
/* fprintf( f, "\tconst EntityDescriptor * CurrentUnderlyingType();\n" );*/
|
||||
|
||||
if( dup_result ) {
|
||||
/** if there are duplicate underlying types **/
|
||||
fprintf( f, "\n\t// part 7\n" );
|
||||
fprintf( f, "\tconst TypeDescriptor *"
|
||||
fprintf( f, "\n // part 7\n" );
|
||||
fprintf( f, " const TypeDescriptor *"
|
||||
"SetUnderlyingType ( const TypeDescriptor * td );\n" );
|
||||
} else {
|
||||
fprintf( f, "\n\t// part 7 ... NONE\tonly for complex selects...\n" );
|
||||
fprintf( f, "\n // part 7 ... NONE only for complex selects...\n" );
|
||||
}
|
||||
|
||||
#ifdef PART8
|
||||
fprintf( f, "\n\t// part 8\n" );
|
||||
fprintf( f, "\t%s* operator->();\n", n );
|
||||
fprintf( f, "\n // part 8\n" );
|
||||
fprintf( f, " %s* operator->();\n", n );
|
||||
#endif
|
||||
|
||||
fprintf( f, "};\n" );
|
||||
@@ -780,7 +768,7 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
|
||||
fprintf( f, " %s_agg( SelectTypeDescriptor * =%s );\n", n, tdnm );
|
||||
fprintf( f, " ~%s_agg();\n", n );
|
||||
fprintf( f, " virtual SingleLinkNode * NewNode()\n" );
|
||||
fprintf( f, "\t { return new SelectNode (new %s( sel_type )); }\n", n );
|
||||
fprintf( f, " { return new SelectNode (new %s( sel_type )); }\n", n );
|
||||
fprintf( f, "};\n" );
|
||||
|
||||
/* DAS creation function for select aggregate class */
|
||||
@@ -813,25 +801,25 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema,
|
||||
/* constructor(s) */
|
||||
/* null constructor */
|
||||
fprintf( f, "\n// STEP Part 22: SDAI\n" );
|
||||
fprintf( f, "\n\t// part 0\n" );
|
||||
fprintf( f, "\n // part 0\n" );
|
||||
fprintf( f, "%s::%s( const SelectTypeDescriptor *typedescript )\n", n, n );
|
||||
fprintf( f, " : " BASE_SELECT " (typedescript)" );
|
||||
/* Initialize the select members with their correct typedescriptors: */
|
||||
initSelItems( type, f );
|
||||
fprintf( f, "\n{\n" );
|
||||
fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" );
|
||||
fprintf( f, "\t*logStream << \"DAVE ERR entering %s constructor.\" << std::endl;\n", n );
|
||||
fprintf( f, " *logStream << \"DAVE ERR entering %s constructor.\" << std::endl;\n", n );
|
||||
fprintf( f, " }\n#endif\n" );
|
||||
/* fprintf( f, "#ifdef WE_WANT_TO_HAVE_THIS_CONSTRUCTOR\n" );*/
|
||||
fprintf( f, " nullify();\n" );
|
||||
/* fprintf( f, "#endif\n" );*/
|
||||
fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" );
|
||||
fprintf( f, "//\t*logStream << \"DAVE ERR exiting %s constructor.\" << std::endl;\n", n );
|
||||
fprintf( f, "// *logStream << \"DAVE ERR exiting %s constructor.\" << std::endl;\n", n );
|
||||
fprintf( f, " }\n#endif\n" );
|
||||
fprintf( f, "}\n" );
|
||||
|
||||
/* constructors with underlying types */
|
||||
fprintf( f, "\n\t// part 1\n" );
|
||||
fprintf( f, "\n // part 1\n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
if( ( TYPEis_entity( t ) )
|
||||
|| ( !utype_member( dups, t, 1 ) ) ) {
|
||||
@@ -855,7 +843,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema,
|
||||
fprintf( f, "\n{\n" );
|
||||
fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" );
|
||||
fprintf( f,
|
||||
"\t*logStream << \"DAVE ERR entering %s constructor.\""
|
||||
" *logStream << \"DAVE ERR entering %s constructor.\""
|
||||
" << std::endl;\n", n );
|
||||
fprintf( f, " }\n#endif\n" );
|
||||
|
||||
@@ -866,7 +854,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema,
|
||||
}
|
||||
fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" );
|
||||
fprintf( f,
|
||||
"//\t*logStream << \"DAVE ERR exiting %s constructor.\""
|
||||
"// *logStream << \"DAVE ERR exiting %s constructor.\""
|
||||
" << std::endl;\n", n );
|
||||
fprintf( f, " }\n#endif\n" );
|
||||
|
||||
@@ -890,7 +878,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema,
|
||||
fprintf( f, "\n{\n" );
|
||||
fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" );
|
||||
fprintf( f,
|
||||
"\t*logStream << \"DAVE ERR entering %s constructor.\""
|
||||
" *logStream << \"DAVE ERR entering %s constructor.\""
|
||||
" << std::endl;\n", n );
|
||||
fprintf( f, " }\n#endif\n" );
|
||||
fprintf( f, " _%s.ShallowCopy (*o);\n", SEL_ITEMget_dmname( t ) );
|
||||
@@ -911,7 +899,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema,
|
||||
TYPEtd_name( t ) );
|
||||
fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" );
|
||||
fprintf( f,
|
||||
"//\t*logStream << \"DAVE ERR exiting %s constructor.\""
|
||||
"// *logStream << \"DAVE ERR exiting %s constructor.\""
|
||||
" << std::endl;\n", n );
|
||||
fprintf( f, " }\n#endif\n" );
|
||||
fprintf( f, "}\n\n" );
|
||||
@@ -960,7 +948,7 @@ ENTITYget_expanded_entities( Entity e, Linked_List l ) {
|
||||
supers = ENTITYget_supertypes( e );
|
||||
LISTdo( supers, s, Entity )
|
||||
/* ignore the more than one supertype
|
||||
since multiple inheritance isn\'t implemented */
|
||||
since multiple inheritance isn't implemented */
|
||||
if( super_cnt == 0 ) {
|
||||
ENTITYget_expanded_entities( s, l );
|
||||
}
|
||||
@@ -968,7 +956,7 @@ ENTITYget_expanded_entities( Entity e, Linked_List l ) {
|
||||
LISTod;
|
||||
} else {
|
||||
/* ignore the more than one supertype
|
||||
since multiple inheritance isn\'t implemented */
|
||||
since multiple inheritance isn't implemented */
|
||||
super = ENTITYget_superclass( e );
|
||||
ENTITYget_expanded_entities( super, l );
|
||||
}
|
||||
@@ -1030,7 +1018,7 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
|
||||
Entity ent;
|
||||
Variable uattr; /* attribute in underlying type */
|
||||
|
||||
fprintf( f, "\n\t// part 3\n" );
|
||||
fprintf( f, "\n // part 3\n" );
|
||||
|
||||
LISTdo( attrs, a, Variable )
|
||||
/* go through all the unique attributes */
|
||||
@@ -1072,14 +1060,14 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
|
||||
if( ! VARis_derived( uattr ) ) {
|
||||
|
||||
if( !strcmp( utype, TYPEget_ctype( VARget_type( uattr ) ) ) ) {
|
||||
/* check to make sure the underlying attribute\'s type is
|
||||
/* check to make sure the underlying attribute's type is
|
||||
the same as the current attribute.
|
||||
*/
|
||||
|
||||
strncpy( uent, TYPEget_ctype( t ), BUFSIZ );
|
||||
|
||||
/* if the underlying type is that item\'s type
|
||||
call the underlying_item\'s member function */
|
||||
/* if the underlying type is that item's type
|
||||
call the underlying_item's member function */
|
||||
// if it is the same attribute
|
||||
if( VARis_overrider( ENT_TYPEget_entity( t ), uattr ) ) {
|
||||
// update attribute_func_name because is has been overrid
|
||||
@@ -1088,18 +1076,18 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
|
||||
generate_attribute_func_name( a, funcnm );
|
||||
}
|
||||
fprintf( f,
|
||||
" if( CurrentUnderlyingType () == %s ) \n\t// %s\n",
|
||||
" if( CurrentUnderlyingType () == %s ) \n // %s\n",
|
||||
TYPEtd_name( t ), StrToUpper( TYPEget_name( t ) ) );
|
||||
fprintf( f, "\treturn ((%s) _%s) ->%s();\n",
|
||||
fprintf( f, " return ((%s) _%s) ->%s();\n",
|
||||
uent, SEL_ITEMget_dmname( t ), funcnm );
|
||||
|
||||
} else {
|
||||
/* types are not the same issue a warning */
|
||||
fprintf( stderr,
|
||||
"WARNING: in SELECT TYPE %s: \n\tambiguous "
|
||||
"WARNING: in SELECT TYPE %s: \n ambiguous "
|
||||
"attribute \"%s\" from underlying type \"%s\".\n\n",
|
||||
TYPEget_name( type ), attrnm, TYPEget_name( t ) );
|
||||
fprintf( f, " // %s\n\t// attribute access function"
|
||||
fprintf( f, " // %s\n // attribute access function"
|
||||
" has a different return type\n",
|
||||
StrToUpper( TYPEget_name( t ) ) );
|
||||
}
|
||||
@@ -1111,7 +1099,7 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
|
||||
LISTod;
|
||||
PRINT_BUG_REPORT
|
||||
|
||||
/* If the return type is an enumeration class then you can\'t
|
||||
/* If the return type is an enumeration class then you can't
|
||||
return NULL. Instead I made the return type the
|
||||
enumeration value. This causes a WARNING about going from
|
||||
int (NULL) to the enumeration type. To get rid of the
|
||||
@@ -1170,12 +1158,12 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
|
||||
if( ! VARis_derived( uattr ) ) {
|
||||
|
||||
if( !strcmp( utype, TYPEget_ctype( VARget_type( uattr ) ) ) ) {
|
||||
/* check to make sure the underlying attribute\'s type is
|
||||
/* check to make sure the underlying attribute's type is
|
||||
the same as the current attribute.
|
||||
*/
|
||||
|
||||
/* if the underlying type is that item\'s type
|
||||
call the underlying_item\'s member function */
|
||||
/* if the underlying type is that item's type
|
||||
call the underlying_item's member function */
|
||||
// if it is the same attribute
|
||||
if( VARis_overrider( ENT_TYPEget_entity( t ), uattr ) ) {
|
||||
// update attribute_func_name because is has been overrid
|
||||
@@ -1186,9 +1174,9 @@ TYPEselect_lib_print_part_three( const Type type, FILE * f, Schema schema,
|
||||
|
||||
strncpy( uent, TYPEget_ctype( t ), BUFSIZ );
|
||||
fprintf( f,
|
||||
" if( CurrentUnderlyingType () == %s ) \n\t// %s\n",
|
||||
" if( CurrentUnderlyingType () == %s ) \n // %s\n",
|
||||
TYPEtd_name( t ), StrToUpper( TYPEget_name( t ) ) );
|
||||
fprintf( f, "\t{ ((%s) _%s) ->%s( x );\n\t return;\n\t}\n",
|
||||
fprintf( f, " { ((%s) _%s) ->%s( x );\n return;\n }\n",
|
||||
uent, SEL_ITEMget_dmname( t ), funcnm );
|
||||
} else /* warning printed above */
|
||||
fprintf( f, " // for %s attribute access function"
|
||||
@@ -1218,7 +1206,7 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
char x[BUFSIZ];
|
||||
int firsttime = 1;
|
||||
|
||||
fprintf( f, "\n\t// part 4\n" );
|
||||
fprintf( f, "\n // part 4\n" );
|
||||
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
if( ( TYPEis_entity( t ) )
|
||||
@@ -1275,7 +1263,7 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
SEL_ITEMget_dmname( t ),
|
||||
StrToLower( TYPEget_utype( t ) ) );
|
||||
else
|
||||
fprintf( f, "\t_%s = &(o -> _%s);\n",
|
||||
fprintf( f, " _%s = &(o -> _%s);\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
} else {
|
||||
@@ -1287,7 +1275,7 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
/* I changed this although I'm not sure how the if and else differ */
|
||||
/* StrToLower(TYPEget_utype(t)) ); */
|
||||
else
|
||||
fprintf( f, "\t_%s = o -> _%s;\n",
|
||||
fprintf( f, " _%s = o -> _%s;\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
}
|
||||
@@ -1295,7 +1283,6 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
fprintf( f, " underlying_type = o -> CurrentUnderlyingType ();\n" );
|
||||
fprintf( f, " return *this;\n}\n\n" );
|
||||
|
||||
/* fprintf( f, "%s& %s::operator =( const %s& o )\n{\n", n,n,n );*/
|
||||
fprintf( f, "SDAI_Select& %s::operator =( const SDAI_Select& o )\n{\n", n );
|
||||
|
||||
firsttime = 1;
|
||||
@@ -1312,30 +1299,24 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
if( TYPEis_select( t ) ) {
|
||||
if( utype_member( dups, t, 1 ) )
|
||||
/** if in the dup list **/
|
||||
/* fprintf( f, " _%s = o._%s;\n", */
|
||||
fprintf( f, "\t_%s = ((%s&) o)._%s;\n",
|
||||
fprintf( f, " _%s = ((%s&) o)._%s;\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
n,
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
/* StrToLower(TYPEget_utype(t)) ); */
|
||||
else
|
||||
/* fprintf( f, "\t_%s = o._%s;\n", */
|
||||
fprintf( f, "\t_%s = &(((%s&) o)._%s);\n",
|
||||
fprintf( f, " _%s = &(((%s&) o)._%s);\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
n,
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
} else {
|
||||
if( utype_member( dups, t, 1 ) )
|
||||
/** if in the dup list **/
|
||||
/* fprintf( f, " _%s = o._%s;\n", */
|
||||
fprintf( f, "\t_%s = ((%s&) o)._%s;\n",
|
||||
fprintf( f, " _%s = ((%s&) o)._%s;\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
n,
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
/* StrToLower(TYPEget_utype(t)) ); */
|
||||
else
|
||||
/* fprintf( f, "\t_%s = o._%s;\n", */
|
||||
fprintf( f, "\t_%s = ((%s&) o)._%s;\n",
|
||||
fprintf( f, " _%s = ((%s&) o)._%s;\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
n,
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
@@ -1359,7 +1340,7 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
SEL_ITEMget_dmname( t ),
|
||||
StrToLower( TYPEget_utype( t ) ) );
|
||||
else
|
||||
fprintf( f, "\t_%s = o._%s;\n",
|
||||
fprintf( f, " _%s = o._%s;\n",
|
||||
SEL_ITEMget_dmname( t ),
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
LISTod;
|
||||
@@ -1378,7 +1359,7 @@ TYPEselect_init_print( const Type type, FILE * f, Schema schema ) {
|
||||
#define schema_name SCHEMAget_name(schema)
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
|
||||
fprintf( f, "\t%s -> Elements ().AddNode",
|
||||
fprintf( f, " %s -> Elements ().AddNode",
|
||||
TYPEtd_name( type ) );
|
||||
fprintf( f, " (%s);\n",
|
||||
TYPEtd_name( t ) );
|
||||
@@ -1408,18 +1389,18 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
|
||||
switch( TYPEget_body( t )->type ) {
|
||||
|
||||
/* if it\'s a number, just print it */
|
||||
/* if it's a number, just print it */
|
||||
case integer_:
|
||||
fprintf( f, "\tout << _%s;\n else ", dm );
|
||||
fprintf( f, " out << _%s;\n else ", dm );
|
||||
break;
|
||||
|
||||
case number_:
|
||||
case real_:
|
||||
fprintf( f, "\tWriteReal(_%s,out);\n else ", dm );
|
||||
fprintf( f, " WriteReal(_%s,out);\n else ", dm );
|
||||
break;
|
||||
|
||||
case entity_:
|
||||
fprintf( f, "\t_%s -> STEPwrite_reference (out);\n else ", dm );
|
||||
fprintf( f, " _%s -> STEPwrite_reference (out);\n else ", dm );
|
||||
break;
|
||||
|
||||
case string_:
|
||||
@@ -1439,7 +1420,7 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
break;
|
||||
|
||||
case select_:
|
||||
fprintf( f, "\t_%s.STEPwrite (out, currSch);\n else ", dm );
|
||||
fprintf( f, " _%s.STEPwrite (out, currSch);\n else ", dm );
|
||||
/* Select type needs currSch passed too. A Select writes the name of its
|
||||
// current choice when it writes itself out (e.g. "DATA(33.5)"). Since
|
||||
// the current choice name may depend on our current schema (it may be a
|
||||
@@ -1447,8 +1428,8 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
break;
|
||||
|
||||
default:
|
||||
/* otherwise it\'s a pointer */
|
||||
fprintf( f, "\t_%s -> STEPwrite (out);\n else ", dm );
|
||||
/* otherwise it's a pointer */
|
||||
fprintf( f, " _%s -> STEPwrite (out);\n else ", dm );
|
||||
break;
|
||||
}
|
||||
LISTod;
|
||||
@@ -1559,7 +1540,7 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
|
||||
/* Read part 21 */
|
||||
fprintf( f, "\nSeverity\n%s::STEPread_content "
|
||||
"(istream& in, InstMgr * instances,\n\t\t\tconst char *utype, "
|
||||
"(istream& in, InstMgr * instances,\n const char *utype, "
|
||||
"int addFileId, const char *currSch)\n{\n", n );
|
||||
|
||||
/* go through the items */
|
||||
@@ -1571,37 +1552,37 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
dm = SEL_ITEMget_dmname( t );
|
||||
|
||||
switch( TYPEget_body( t )->type ) {
|
||||
/* if it\'s a number, just read it */
|
||||
/* if it's a number, just read it */
|
||||
case real_:
|
||||
case number_:
|
||||
/* since REAL and NUMBER are handled the same they both need
|
||||
to be included in the case stmt */
|
||||
fprintf( f, " {\n\tReadReal (_%s, in, &_error, \"),\");\n"
|
||||
"\treturn severity ();\n }\n",
|
||||
fprintf( f, " {\n ReadReal (_%s, in, &_error, \"),\");\n"
|
||||
" return severity ();\n }\n",
|
||||
dm );
|
||||
break;
|
||||
|
||||
case integer_:
|
||||
fprintf( f, " {\n\tReadInteger (_%s, in, &_error, \"),\");\n"
|
||||
"\treturn severity ();\n }\n",
|
||||
fprintf( f, " {\n ReadInteger (_%s, in, &_error, \"),\");\n"
|
||||
" return severity ();\n }\n",
|
||||
dm );
|
||||
break;
|
||||
|
||||
case entity_:
|
||||
/* if it\'s an entity, use Assign - done in Select class */
|
||||
/* if it's an entity, use Assign - done in Select class */
|
||||
fprintf( f,
|
||||
" {\n\t// set Underlying Type in Select class\n"
|
||||
"\t_%s = ReadEntityRef "
|
||||
" {\n // set Underlying Type in Select class\n"
|
||||
" _%s = ReadEntityRef "
|
||||
"(in, &_error, \",)\", instances, addFileId);\n", dm );
|
||||
fprintf( f, "\tif (_%s && (_%s != S_ENTITY_NULL)\n "
|
||||
"\t && (CurrentUnderlyingType () -> CanBe (_%s -> eDesc )) )\n"
|
||||
"\t return severity ();\n",
|
||||
fprintf( f, " if (_%s && (_%s != S_ENTITY_NULL)\n "
|
||||
" && (CurrentUnderlyingType () -> CanBe (_%s -> eDesc )) )\n"
|
||||
" return severity ();\n",
|
||||
dm, dm, dm );
|
||||
fprintf( f, "\telse {\n "
|
||||
"\t Error (\"Reference to instance that is not indicated type\\n\");\n"
|
||||
"\t _%s = 0;\n"
|
||||
"\t nullify ();\n"
|
||||
"\t return severity (SEVERITY_USERMSG);\n\t}\n }\n",
|
||||
fprintf( f, " else {\n "
|
||||
" Error (\"Reference to instance that is not indicated type\\n\");\n"
|
||||
" _%s = 0;\n"
|
||||
" nullify ();\n"
|
||||
" return severity (SEVERITY_USERMSG);\n }\n }\n",
|
||||
dm
|
||||
);
|
||||
break;
|
||||
@@ -1612,14 +1593,14 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
case boolean_:
|
||||
case binary_:
|
||||
fprintf( f,
|
||||
" {\n\t_%s.STEPread (in, &_error);\n"
|
||||
"\treturn severity ();\n }\n",
|
||||
" {\n _%s.STEPread (in, &_error);\n"
|
||||
" return severity ();\n }\n",
|
||||
dm );
|
||||
break;
|
||||
case select_:
|
||||
fprintf( f,
|
||||
" {\n\t_%s.STEPread (in, &_error, instances, utype, "
|
||||
"addFileId, currSch);\n\treturn severity ();\n }\n",
|
||||
" {\n _%s.STEPread (in, &_error, instances, utype, "
|
||||
"addFileId, currSch);\n return severity ();\n }\n",
|
||||
dm );
|
||||
break;
|
||||
case aggregate_:
|
||||
@@ -1637,8 +1618,8 @@ TYPEselect_lib_part21( const Type type, FILE * f, Schema schema ) {
|
||||
|
||||
default:
|
||||
fprintf( f,
|
||||
" {\n\t_%s -> STEPread (in, &_error, instances, addFileId);\n"
|
||||
"\treturn severity ();\n }\n",
|
||||
" {\n _%s -> STEPread (in, &_error, instances, addFileId);\n"
|
||||
" return severity ();\n }\n",
|
||||
dm );
|
||||
break;
|
||||
}
|
||||
@@ -1683,13 +1664,13 @@ TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
|
||||
case integer_:
|
||||
case number_:
|
||||
case select_:
|
||||
/* if it\'s a number, use STEPread_content - done in Select class */
|
||||
/* if it\'s a select, use STEPread_content - done in Select class */
|
||||
/* if it's a number, use STEPread_content - done in Select class */
|
||||
/* if it's a select, use STEPread_content - done in Select class */
|
||||
/* fprintf (f, "\t// done in Select class\n\treturn SEVERITY_NULL;\n");*/
|
||||
break;
|
||||
|
||||
case entity_:
|
||||
/* if it\'s an entity, use AssignEntity - done in Select class */
|
||||
/* if it's an entity, use AssignEntity - done in Select class */
|
||||
/* fprintf (f, "\t// done in Select class\n\treturn SEVERITY_NULL;\n");*/
|
||||
|
||||
break;
|
||||
@@ -1698,10 +1679,10 @@ TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
|
||||
case boolean_:
|
||||
case enumeration_:
|
||||
if( !enum_cnt ) {
|
||||
/* if there\'s more than one enumeration they are done in Select class */
|
||||
/* if there's more than one enumeration they are done in Select class */
|
||||
fprintf( f, " case %s : \n", FundamentalType( t, 0 ) );
|
||||
fprintf( f,
|
||||
"\treturn _%s.StrToVal (str, &_error);\n",
|
||||
" return _%s.StrToVal (str, &_error);\n",
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
} else {
|
||||
fprintf( f, " // case %s : done in Select class\n", FundamentalType( t, 0 ) );
|
||||
@@ -1712,7 +1693,7 @@ TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
|
||||
case string_:
|
||||
fprintf( f, " case %s : \n", FundamentalType( t, 0 ) );
|
||||
fprintf( f,
|
||||
"\treturn _%s.StrToVal (str);\n",
|
||||
" return _%s.StrToVal (str);\n",
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
break;
|
||||
|
||||
@@ -1722,11 +1703,9 @@ TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
|
||||
case set_:
|
||||
case list_:
|
||||
fprintf( f, " case %s : \n", FundamentalType( t, 0 ) );
|
||||
fprintf( f,
|
||||
"\treturn _%s.StrToVal (str, &_error, "
|
||||
"%s -> AggrElemTypeDescriptor ());\n",
|
||||
/* "instances, addFileId); "*/
|
||||
SEL_ITEMget_dmname( t ),
|
||||
fprintf( f, " return _%s%sStrToVal (str, &_error, %s -> AggrElemTypeDescriptor ());\n", SEL_ITEMget_dmname( t ),
|
||||
( ( ( t->u.type->body->base )
|
||||
&& (t->u.type->body->base->u.type->body->type == select_ ) ) ? "->" : "." ),
|
||||
TYPEtd_name( t ) );
|
||||
break;
|
||||
|
||||
@@ -1734,7 +1713,7 @@ TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
|
||||
/* otherwise use StrToVal on the contents to check the format */
|
||||
fprintf( f, " case %s : \n", FundamentalType( t, 0 ) );
|
||||
fprintf( f,
|
||||
"\treturn _%s -> StrToVal (str, instances);\n",
|
||||
" return _%s -> StrToVal (str, instances);\n",
|
||||
SEL_ITEMget_dmname( t ) );
|
||||
}
|
||||
LISTod;
|
||||
@@ -1744,7 +1723,7 @@ TYPEselect_lib_StrToVal( const Type type, FILE * f, Schema schema ) {
|
||||
fprintf( f, "#ifdef __SUNCPLUSPLUS__\n"
|
||||
"std::cerr << str << \" \" << instances << std::endl;\n"
|
||||
"#endif\n" );
|
||||
fprintf( f, "\treturn SEVERITY_WARNING;\n }\n" );
|
||||
fprintf( f, " return SEVERITY_WARNING;\n }\n" );
|
||||
|
||||
LISTfree( data_members );
|
||||
fprintf( f,
|
||||
@@ -1778,9 +1757,9 @@ SELlib_print_protected( const Type type, FILE * f, const Schema schema ) {
|
||||
" // %s\n" /* item name */
|
||||
" if (se -> IsA (%s))\n" /* td */
|
||||
" { \n"
|
||||
"\t_%s = (%s_ptr) se;\n" /* underlying data member */
|
||||
" _%s = (%s_ptr) se;\n" /* underlying data member */
|
||||
/* underlying data member type */
|
||||
"\treturn SetUnderlyingType (%s);\n" /* td */
|
||||
" return SetUnderlyingType (%s);\n" /* td */
|
||||
" }\n",
|
||||
StrToUpper( TYPEget_name( t ) ),
|
||||
TYPEtd_name( t ),
|
||||
@@ -1794,8 +1773,8 @@ SELlib_print_protected( const Type type, FILE * f, const Schema schema ) {
|
||||
" // %s\n" /* item name */
|
||||
" if (%s -> CanBe (se -> eDesc))\n"
|
||||
" { \n"
|
||||
"\t_%s.AssignEntity (se);\n" /* underlying data member */
|
||||
"\treturn SetUnderlyingType (%s);\n" /* td */
|
||||
" _%s.AssignEntity (se);\n" /* underlying data member */
|
||||
" return SetUnderlyingType (%s);\n" /* td */
|
||||
" }\n",
|
||||
StrToUpper( TYPEget_name( t ) ),
|
||||
TYPEtd_name( t ),
|
||||
@@ -1841,7 +1820,7 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
TYPEselect_lib_virtual( type, f, schema );
|
||||
TYPEselect_lib_print_part_one( type, f, schema, dups, n );
|
||||
|
||||
fprintf( f, "\n\t// part 2\n" );
|
||||
fprintf( f, "\n // part 2\n" );
|
||||
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
if( TYPEis_entity( t ) ) {
|
||||
@@ -1886,7 +1865,7 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
if( ( strcmp( m, TYPEget_utype( x ) ) == 0 )
|
||||
|| ( compareOrigTypes( t, x ) ) ) {
|
||||
/* If this is one of the dups. compareOrigTypes checks
|
||||
if x\'s type is a rename of t\'s (see comments there).
|
||||
if x's type is a rename of t's (see comments there).
|
||||
*/
|
||||
fprintf( f, " if( CurrentUnderlyingType () == %s )\n",
|
||||
TYPEtd_name( x ) );
|
||||
@@ -1904,14 +1883,13 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
fprintf( f, " return (%s)0;\n}\n\n",
|
||||
TYPEis_aggregate( t ) ?
|
||||
AccessType( t ) : TYPEget_utype( t ) );
|
||||
/* fprintf( f, " return NULL;\n}\n\n" ); */
|
||||
}
|
||||
LISTod;
|
||||
|
||||
TYPEselect_lib_print_part_three( type, f, schema, n );
|
||||
TYPEselect_lib_print_part_four( type, f, schema, dups, n );
|
||||
|
||||
fprintf( f, "\n\t// part 5\n" );
|
||||
fprintf( f, "\n // part 5\n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
z = FirstToUpper( TYPEget_name( t ) );
|
||||
fprintf( f, "Logical %s::Is%s() const\n{\n", n, z );
|
||||
@@ -1923,7 +1901,7 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
LISTod;
|
||||
|
||||
#ifdef UNDERLYINGTYPE
|
||||
fprintf( f, "\n\t// part 6\n" );
|
||||
fprintf( f, "\n // part 6\n" );
|
||||
fprintf( f, "SDAI_String %s::UnderlyingTypeName() const\n{\n", n );
|
||||
fprintf( f, " if( exists() )\n" );
|
||||
fprintf( f, " {\n" );
|
||||
@@ -1952,7 +1930,7 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
|
||||
#endif
|
||||
if( dup_result ) {
|
||||
fprintf( f, "\n\t// part 7\n" );
|
||||
fprintf( f, "\n // part 7\n" );
|
||||
fprintf( f,
|
||||
"const TypeDescriptor * \n"
|
||||
"%s::SetUnderlyingType (const TypeDescriptor * td)\n{\n"
|
||||
@@ -1961,7 +1939,7 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
}
|
||||
|
||||
#ifdef PART8
|
||||
fprintf( f, "\n\t// part 8\n" );
|
||||
fprintf( f, "\n // part 8\n" );
|
||||
fprintf( f, "%s* %s::operator->()\n", n, n );
|
||||
fprintf( f, "{\n return this;\n}\n" );
|
||||
#endif
|
||||
@@ -2003,8 +1981,8 @@ TYPEselect_print( Type t, FILES * files, Schema schema ) {
|
||||
}
|
||||
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ );
|
||||
strncpy( tdnm, TYPEtd_name( t ), BUFSIZ );
|
||||
fprintf( inc, "typedef %s * \t%sH;\n", nm, nm );
|
||||
fprintf( inc, "typedef %s_ptr *\t%s_var;\n", nm, nm );
|
||||
fprintf( inc, "typedef %s * %sH;\n", nm, nm );
|
||||
fprintf( inc, "typedef %s_ptr * %s_var;\n", nm, nm );
|
||||
/* Below are specialized create functions for the renamed sel type (both
|
||||
// single and aggregate). The functions call the original sel's con-
|
||||
// structor, passing the new sel's typedescriptor to create a hybrid
|
||||
|
||||
Reference in New Issue
Block a user