Revision: 50631
http://brlcad.svn.sourceforge.net/brlcad/?rev=50631&view=rev
Author: n_reed
Date: 2012-05-22 18:52:23 +0000 (Tue, 22 May 2012)
Log Message:
-----------
apply rest of SCL git 290850a: change output suffix of aggregate select types
from 's' to '_agg'
Modified Paths:
--------------
brlcad/trunk/src/other/step/src/fedex_plus/classes.c
brlcad/trunk/src/other/step/src/fedex_plus/classes_misc.c
brlcad/trunk/src/other/step/src/fedex_plus/classes_wrapper.cc
brlcad/trunk/src/other/step/src/fedex_plus/multpass.c
brlcad/trunk/src/other/step/src/fedex_plus/selects.c
Modified: brlcad/trunk/src/other/step/src/fedex_plus/classes.c
===================================================================
--- brlcad/trunk/src/other/step/src/fedex_plus/classes.c 2012-05-22
17:58:52 UTC (rev 50630)
+++ brlcad/trunk/src/other/step/src/fedex_plus/classes.c 2012-05-22
18:52:23 UTC (rev 50631)
@@ -2637,22 +2637,22 @@
/* DAS brandnew above */
/* print things for aggregate class */
- sprintf( enumAggrNm, "%ss", n );
+ sprintf( enumAggrNm, "%s_agg", n );
- fprintf( inc, "\nclass %ss : public EnumAggregate {\n", n );
+ fprintf( inc, "\nclass %s_agg : public EnumAggregate {\n", n );
fprintf( inc, " protected:\n EnumTypeDescriptor *enum_type;\n\n" );
fprintf( inc, " public:\n" );
- fprintf( inc, " %ss( EnumTypeDescriptor * =%s);\n", n, tdnm );
- fprintf( inc, " virtual ~%ss();\n", n );
+ fprintf( inc, " %s_agg( EnumTypeDescriptor * =%s);\n", n, tdnm );
+ fprintf( inc, " virtual ~%s_agg();\n", n );
fprintf( inc, " virtual SingleLinkNode * NewNode()\n" );
- fprintf( inc, "\t{ return new EnumNode (new %s( \"\", enum_type )); }"
+ fprintf( inc, " { return new EnumNode (new %s( \"\", enum_type ));
}"
"\n", n );
fprintf( inc, "};\n" );
- fprintf( inc, "\ntypedef %ss * %ss_ptr;\n", n, n );
- fprintf( inc, "\ntypedef const %ss * const_%ss_ptr;\n", n, n );
+ fprintf( inc, "\ntypedef %s_agg * %s_agg_ptr;\n", n, n );
+ fprintf( inc, "\ntypedef const %s_agg * const_%s_agg_ptr;\n", n, n );
/* DAS brandnew below */
@@ -2711,9 +2711,9 @@
/* print the enum aggregate functions */
- fprintf( f, "\n%ss::%ss( EnumTypeDescriptor *et )\n", n, n );
+ fprintf( f, "\n%s_agg::%s_agg( EnumTypeDescriptor *et )\n", n, n );
fprintf( f, " : enum_type(et)\n{\n}\n\n" );
- fprintf( f, "%ss::~%ss()\n{\n}\n", n, n );
+ fprintf( f, "%s_agg::~%s_agg()\n{\n}\n", n, n );
printEnumAggrCrBody( f, type );
@@ -2932,20 +2932,20 @@
// classes file - after all the actual enum's. They must be
// printed last since they depend on the others.) */
strncpy( nm, TYPEget_ctype( t ), BUFSIZ );
- fprintf( classes, "class %ss;\n", nm );
+ fprintf( classes, "class %s_agg;\n", nm );
}
} else if( TYPEis_select( t ) ) {
if( !TYPEget_head( t ) ) {
/* Same comment as above. */
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ );
fprintf( classes, "class %s;\n", nm );
- fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
+ fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
fprintf( classes, "typedef const %s * const_%s_ptr;\n", nm, nm );
- fprintf( classes, "class %ss;\n", nm );
- fprintf( classes, "typedef %ss * %ss_ptr;\n", nm, nm );
- fprintf( classes, "typedef const %ss * const_%ss_ptr;\n", nm, nm );
- fprintf( classes, "typedef class %ss *
class_%ss_ptr;\n", nm, nm );
- fprintf( classes, "typedef const class %ss *
const_class_%ss_ptr;\n", nm, nm );
+ fprintf( classes, "class %s_agg;\n", nm );
+ fprintf( classes, "typedef %s_agg * %s_agg_ptr;\n", nm, nm );
+ fprintf( classes, "typedef const %s_agg * const_%s_agg_ptr;\n",
nm, nm );
+ fprintf( classes, "typedef class %s_agg *
class_%s_agg_ptr;\n", nm, nm );
+ fprintf( classes, "typedef const class %s_agg *
const_class_%s_agg_ptr;\n", nm, nm );
}
} else {
if( TYPEis_aggregate( t ) ) {
@@ -3150,8 +3150,8 @@
fprintf( files->inc, "typedef %s %s;\n", base, nm );
printEnumCreateHdr( files->inc, type );
printEnumCreateBody( files->lib, type );
- fprintf( files->inc, "typedef %ss * %ss_ptr;\n", nm, nm );
- fprintf( files->inc, "typedef const %ss * const_%ss_ptr;\n", nm, nm );
+ fprintf( files->inc, "typedef %s_agg * %s_agg_ptr;\n", nm,
nm );
+ fprintf( files->inc, "typedef const %s_agg * const_%s_agg_ptr;\n", nm,
nm );
printEnumAggrCrHdr( files->inc, type );
printEnumAggrCrBody( files->lib, type );
return;
@@ -3207,7 +3207,7 @@
{
const char * n = TYPEget_ctype( type );
/* const char *n = ClassName( TYPEget_name(type) ));*/
- fprintf( inc, " STEPaggregate * create_%ss ();\n", n );
+ fprintf( inc, " STEPaggregate * create_%s_agg ();\n", n );
}
static void printEnumAggrCrBody( FILE * lib, const Type type ) {
@@ -3216,8 +3216,8 @@
strncpy( tdnm, TYPEtd_name( type ), BUFSIZ );
- fprintf( lib, "\nSTEPaggregate * \ncreate_%ss ()\n{\n", n );
- fprintf( lib, " return new %ss( %s );\n}\n", n, tdnm );
+ fprintf( lib, "\nSTEPaggregate * \ncreate_%s_agg ()\n{\n", n );
+ fprintf( lib, " return new %s_agg( %s );\n}\n", n, tdnm );
}
void TYPEprint_init( const Type type, FILE * ifile, Schema schema ) {
Modified: brlcad/trunk/src/other/step/src/fedex_plus/classes_misc.c
===================================================================
--- brlcad/trunk/src/other/step/src/fedex_plus/classes_misc.c 2012-05-22
17:58:52 UTC (rev 50630)
+++ brlcad/trunk/src/other/step/src/fedex_plus/classes_misc.c 2012-05-22
18:52:23 UTC (rev 50631)
@@ -298,7 +298,7 @@
strcpy (retval, ClassName (TYPEget_name (bt)));
*/
strcpy( retval, TYPEget_ctype( bt ) );
- strcat( retval, "s" );
+ strcat( retval, "_agg" );
return ( retval );
}
Modified: brlcad/trunk/src/other/step/src/fedex_plus/classes_wrapper.cc
===================================================================
--- brlcad/trunk/src/other/step/src/fedex_plus/classes_wrapper.cc
2012-05-22 17:58:52 UTC (rev 50630)
+++ brlcad/trunk/src/other/step/src/fedex_plus/classes_wrapper.cc
2012-05-22 18:52:23 UTC (rev 50631)
@@ -339,23 +339,24 @@
/* fill in the values for the type descriptors */
/* and print the enumerations */
fprintf( files->inc, "\n//\t***** Describe the Other Types \t\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;\n"
- "typedef %s * %sH;\n"
- "typedef const %s * const_%sH;\n", nm, nm, nm );
- fprintf( files->inc, "typedef %s * %s_ptr;\n"
- "typedef const %s * const_%s_ptr;\n"
- "typedef %s_ptr %s_var;\n\n", nm, nm, nm, nm );
- fprintf( files->inc, "class %ss;\n"
- "typedef %ss * %ssH;\n"
- "typedef const %ss * const_%ssH;\n", nm, nm, nm );
- fprintf( files->inc, "typedef %ss * %ss_ptr;\n"
- "typedef const %ss * const_%ss_ptr;\n"
- "typedef %ss_ptr %ss_var;\n\n", nm, nm, nm, nm );
+ 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;\n"
+ "typedef %s * %sH;\n"
+ "typedef const %s * const_%sH;\n", nm, nm, nm );
+ fprintf( files->inc, "typedef %s * %s_ptr;\n"
+ "typedef const %s * const_%s_ptr;\n"
+ "typedef %s_ptr %s_var;\n\n", nm, nm, nm, nm );
+ fprintf( files->inc, "class %s_agg;\n"
+ "typedef %s_agg * %s_aggH;\n"
+ "typedef const %s_agg * const_%s_aggH;\n", nm, nm, nm );
+ fprintf( files->inc, "typedef %s_agg * %s_agg_ptr;\n"
+ "typedef const %s_agg * const_%s_agg_ptr;\n"
+ "typedef %s_agg_ptr %s_agg_var;\n\n", nm, nm, nm, nm );
+ }
}
SCOPEod;
Modified: brlcad/trunk/src/other/step/src/fedex_plus/multpass.c
===================================================================
--- brlcad/trunk/src/other/step/src/fedex_plus/multpass.c 2012-05-22
17:58:52 UTC (rev 50630)
+++ brlcad/trunk/src/other/step/src/fedex_plus/multpass.c 2012-05-22
18:52:23 UTC (rev 50631)
@@ -606,16 +606,16 @@
if( TYPEis_enumeration( t ) ) {
strncpy( nm, TYPEget_ctype( t ), BUFSIZ - 1 );
strncpy( basenm, TYPEget_ctype( i ), BUFSIZ - 1 );
- fprintf( classes, "typedef %ss\t%ss;\n", basenm, nm );
+ fprintf( classes, "typedef %s_agg\t%s_agg;\n", basenm, nm );
} else {
strncpy( nm, SelectName( TYPEget_name( t ) ), BUFSIZ - 1 );
strncpy( basenm, SelectName( TYPEget_name( i ) ), BUFSIZ - 1 );
fprintf( classes, "typedef %s %s;\n", basenm, nm );
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
fprintf( classes, "typedef const %s * const_%s_ptr;\n", nm, nm );
- fprintf( classes, "typedef %ss %ss;\n", basenm, nm );
- fprintf( classes, "typedef %ss * %ss_ptr;\n", nm, nm );
- fprintf( classes, "typedef const %ss * const_%ss_ptr;\n", nm, nm );
+ fprintf( classes, "typedef %s_agg %s_agg;\n", basenm, nm );
+ fprintf( classes, "typedef %s_agg * %s_agg_ptr;\n",
nm, nm );
+ fprintf( classes, "typedef const %s_agg * const_%s_agg_ptr;\n",
nm, nm );
}
}
SCOPEod
Modified: brlcad/trunk/src/other/step/src/fedex_plus/selects.c
===================================================================
--- brlcad/trunk/src/other/step/src/fedex_plus/selects.c 2012-05-22
17:58:52 UTC (rev 50630)
+++ brlcad/trunk/src/other/step/src/fedex_plus/selects.c 2012-05-22
18:52:23 UTC (rev 50631)
@@ -596,9 +596,10 @@
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 );
+ LISTdo( data_members, t, Type ) {
+ strncpy( dmname, SEL_ITEMget_dmname( t ), BUFSIZ );
+ fprintf( f, "\t %s _%s;\n", TYPEget_utype( t ), dmname );
+ }
LISTod;
/* fprintf( f, " \t} ;" );*/
@@ -769,21 +770,21 @@
fprintf( f, "typedef %s_ptr %s_var;\n\n", n, n );
/* print things for aggregate class */
- fprintf( f, "\nclass %ss : public SelectAggregate {\n", n );
+ fprintf( f, "\nclass %s_agg : public SelectAggregate {\n", n );
fprintf( f, " protected:\n" );
fprintf( f, " SelectTypeDescriptor *sel_type;\n\n" );
fprintf( f, " public:\n" );
- fprintf( f, " %ss( SelectTypeDescriptor * =%s );\n", n, tdnm );
- fprintf( f, " ~%ss();\n", n );
+ 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, "};\n" );
/* DAS creation function for select aggregate class */
- fprintf( f, "inline STEPaggregate * create_%ss () { return new %ss; }\n",
+ fprintf( f, "inline STEPaggregate * create_%s_agg () { return new %s_agg;
}\n",
n, n );
- fprintf( f, "typedef %ss_ptr %ss_var;\n", n, n );
+ fprintf( f, "typedef %s_agg_ptr %s_agg_var;\n", n, n );
fprintf( f, "\n///// END SELECT TYPE %s\n\n", TYPEget_name( type ) );
@@ -917,9 +918,9 @@
fprintf( f, "%s::~%s()\n{\n", n, n );
fprintf( f, "}\n\n" );
- fprintf( f, "%ss::%ss( SelectTypeDescriptor *s)\n"
+ fprintf( f, "%s_agg::%s_agg( SelectTypeDescriptor *s)\n"
" : SelectAggregate(), sel_type(s)\n{\n}\n\n", n, n );
- fprintf( f, "%ss::~%ss() { }\n\n", n, n );
+ fprintf( f, "%s_agg::~%s_agg() { }\n\n", n, n );
#undef schema_name
}
@@ -2010,8 +2011,8 @@
// give the user an easy way to create the renamed type properly. */
fprintf( inc, "inline SDAI_Select *\ncreate_%s ()", nm );
fprintf( inc, " { return new %s( %s ); }\n\n", nm, tdnm );
- fprintf( inc, "inline STEPaggregate *\ncreate_%ss ()", nm );
- fprintf( inc, " { return new %ss( %s ); }\n\n", nm, tdnm );
+ fprintf( inc, "inline STEPaggregate *\ncreate_%s_agg ()", nm );
+ fprintf( inc, " { return new %s_agg( %s ); }\n\n", nm, tdnm );
return;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits