[MOAB-dev] r2608 - MOAB/trunk/tools/iMesh

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Fri Jan 30 12:43:24 CST 2009


Author: kraftche
Date: 2009-01-30 12:43:24 -0600 (Fri, 30 Jan 2009)
New Revision: 2608

Modified:
   MOAB/trunk/tools/iMesh/Makefile.am
   MOAB/trunk/tools/iMesh/iMeshP_protos.h
Log:
auto-generate iMeshP_protos.h

Modified: MOAB/trunk/tools/iMesh/Makefile.am
===================================================================
--- MOAB/trunk/tools/iMesh/Makefile.am	2009-01-30 18:39:09 UTC (rev 2607)
+++ MOAB/trunk/tools/iMesh/Makefile.am	2009-01-30 18:43:24 UTC (rev 2608)
@@ -1,4 +1,5 @@
 AUTOMAKE_OPTIONS = foreign
+BUILT_SOURCES = iMesh_protos.h iMeshP_protos.h
 
 if USE_BABEL
   babel_DIR = SIDL
@@ -76,8 +77,9 @@
 	echo "IMESH_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iMesh-Defs.inc
 	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iMesh-Defs.inc
 
+SEDEXPR = 's/^[[:space:]]*void[[:space:]][[:space:]]*$(FPFX)_\([a-z][_a-zA-Z0-9]*\)[[:space:]]*(.*$$/$(FPFX)_\1/p'
+
 FPFX=iMesh
-SEDEXPR = 's/^[[:space:]]*void[[:space:]][[:space:]]*$(FPFX)_\([a-z][_a-zA-Z0-9]*\)[[:space:]]*(.*$$/$(FPFX)_\1/p'
 iMesh_protos.h: iMesh.h
 	echo '#include "MBCN_FCDefs.h"' > $@
 	echo '#ifdef FC_FUNC_' >> $@
@@ -89,3 +91,16 @@
         done
 	echo >> $@
 	echo "#endif" >> $@
+
+FPFX=iMeshP
+iMeshP_protos.h: iMeshP.h
+	echo '#include "MBCN_FCDefs.h"' > $@
+	echo '#ifdef FC_FUNC_' >> $@
+	echo >> $@
+	for func in `$(SED) -n $(SEDEXPR) $<`; do \
+	  lower=`echo $$func | tr '[:upper:]' '[:lower:]'`; \
+          upper=`echo $$func | tr '[:lower:]' '[:upper:]'`; \
+	  echo "#define $$func FC_FUNC_( $$lower, $$upper )" >> $@; \
+        done
+	echo >> $@
+	echo "#endif" >> $@

Modified: MOAB/trunk/tools/iMesh/iMeshP_protos.h
===================================================================
--- MOAB/trunk/tools/iMesh/iMeshP_protos.h	2009-01-30 18:39:09 UTC (rev 2607)
+++ MOAB/trunk/tools/iMesh/iMeshP_protos.h	2009-01-30 18:43:24 UTC (rev 2608)
@@ -1,71 +1,72 @@
 #include "MBCN_FCDefs.h"
 #ifdef FC_FUNC_
-#define iMeshP_createPartitionAll	FC_FUNC_(imeshp_createpartitionall,	IMESHP_CREATEPARTITIONALL)
-#define iMeshP_destroyPartitionAll	FC_FUNC_(imeshp_destroypartitionall,	IMESHP_DESTROYPARTITIONALL)
-#define iMeshP_getPartitionComm		FC_FUNC_(imeshp_getpartitioncomm,	IMESHP_GETPARTITIONCOMM)
-#define iMeshP_syncPartitionAll		FC_FUNC_(imeshp_syncpartitionall,	IMESHP_SYNCPARTITIONALL) 
-#define iMeshP_getNumPartitions		FC_FUNC_(imeshp_getnumpartitions,	IMESHP_GETNUMPARTITIONS)
-#define iMeshP_getPartitions		FC_FUNC_(imeshp_getpartitions,		IMESHP_GETPARTITIONS) 
-#define iMeshP_getNumGlobalParts	FC_FUNC_(imeshp_getnumglobalparts,	IMESHP_GETNUMGLOBALPARTS) 
-#define iMeshP_getNumLocalParts		FC_FUNC_(imeshp_getnumlocalparts,	IMESHP_GETNUMLOCALPARTS) 
-#define iMeshP_getLocalParts		FC_FUNC_(imeshp_getlocalparts,		IMESHP_GETLOCALPARTS) 
-#define iMeshP_getRankOfPart		FC_FUNC_(imeshp_getrankofpart,		IMESHP_GETRANKOFPART) 
-#define iMeshP_getRankOfPartArr		FC_FUNC_(imeshp_getrankofpartarr,	IMESHP_GETRANKOFPARTARR) 
-#define iMeshP_getNumOfTypeAll		FC_FUNC_(imeshp_getnumoftypeall,	IMESHP_GETNUMOFTYPEALL)
-#define iMeshP_getNumOfTopoAll		FC_FUNC_(imeshp_getnumoftopoall,	IMESHP_GETNUMOFTOPOALL)
-#define iMeshP_createPart		FC_FUNC_(imeshp_createpart,		IMESHP_CREATEPART)
-#define iMeshP_destroyPart		FC_FUNC_(imeshp_destroypart,		IMESHP_DESTROYPART)
-#define iMeshP_getPartIdFromPartHandle	FC_FUNC_(imeshp_getpartidfromparthandle,	IMESHP_GETPARTIDFROMPARTHANDLE)
-#define iMeshP_getPartIdsFromPartHandlesArr FC_FUNC_(imeshp_getpartidsfromparthandlesarr,	IMESHP_GETPARTIDSFROMPARTHANDLESARR)
-#define iMeshP_getPartHandleFromPartId	FC_FUNC_(imeshp_getparthandlefrompartid,	IMESHP_GETPARTHANDLEFROMPARTID)
-#define iMeshP_getPartHandlesFromPartsIdsArr FC_FUNC_(imeshp_getparthandlesfrompartsidsarr,	IMESHP_GETPARTHANDLESFROMPARTSIDSARR)
-#define iMeshP_getNumPartNbors		FC_FUNC_(imeshp_getnumpartnbors,	IMESHP_GETNUMPARTNBORS) 
-#define iMeshP_getNumPartNborsArr	FC_FUNC_(imeshp_getnumpartnborsarr,	IMESHP_GETNUMPARTNBORSARR) 
-#define iMeshP_getPartNbors		FC_FUNC_(imeshp_getpartnbors,		IMESHP_GETPARTNBORS) 
-#define iMeshP_getPartNborsArr		FC_FUNC_(imeshp_getpartnborsarr,	IMESHP_GETPARTNBORSARR) 
-#define iMeshP_getNumPartBdryEnts	FC_FUNC_(imeshp_getnumpartbdryents,	IMESHP_GETNUMPARTBDRYENTS) 
-#define iMeshP_getPartBdryEnts		FC_FUNC_(imeshp_getpartbdryents,	IMESHP_GETPARTBDRYENTS) 
-#define iMeshP_initPartBdryEntIter	FC_FUNC_(imeshp_initpartbdryentiter,	IMESHP_INITPARTBDRYENTITER) 
-#define iMeshP_initPartBdryEntArrIter	FC_FUNC_(imeshp_initpartbdryentarriter,	IMESHP_INITPARTBDRYENTARRITER) 
-#define iMeshP_getNumOfType		FC_FUNC_(imeshp_getnumoftype,		IMESHP_GETNUMOFTYPE)
-#define iMeshP_getNumOfTopo		FC_FUNC_(imeshp_getnumoftopo,		IMESHP_GETNUMOFTOPO)
-#define iMeshP_getAllVtxCoords		FC_FUNC_(imeshp_getallvtxcoords,	IMESHP_GETALLVTXCOORDS)
-#define iMeshP_getVtxCoordIndex		FC_FUNC_(imeshp_getvtxcoordindex,	IMESHP_GETVTXCOORDINDEX)
-#define iMeshP_getEntities		FC_FUNC_(imeshp_getentities,		IMESHP_GETENTITIES)
-#define iMeshP_getAdjEntities		FC_FUNC_(imeshp_getadjentities,		IMESHP_GETADJENTITIES)
-#define iMeshP_initEntIter		FC_FUNC_(imeshp_initentiter,		IMESHP_INITENTITER)
-#define iMeshP_initEntArrIter		FC_FUNC_(imeshp_initentarriter,		IMESHP_INITENTARRITER)
-#define iMeshP_getEntOwnerPart		FC_FUNC_(imeshp_getentownerpart,	IMESHP_GETENTOWNERPART) 
-#define iMeshP_getEntOwnerPartArr	FC_FUNC_(imeshp_getentownerpartarr,	IMESHP_GETENTOWNERPARTARR) 
-#define iMeshP_isEntOwner		FC_FUNC_(imeshp_isentowner,		IMESHP_ISENTOWNER) 
-#define iMeshP_isEntOwnerArr		FC_FUNC_(imeshp_isentownerarr,		IMESHP_ISENTOWNERARR) 
-#define iMeshP_getEntStatus		FC_FUNC_(imeshp_getentstatus,		IMESHP_GETENTSTATUS) 
-#define iMeshP_getEntStatusArr		FC_FUNC_(imeshp_getentstatusarr,	IMESHP_GETENTSTATUSARR) 
-#define iMeshP_getNumCopies		FC_FUNC_(imeshp_getnumcopies,		IMESHP_GETNUMCOPIES) 
-#define iMeshP_getCopyParts		FC_FUNC_(imeshp_getcopyparts,		IMESHP_GETCOPYPARTS) 
-#define iMeshP_getCopies		FC_FUNC_(imeshp_getcopies,		IMESHP_GETCOPIES) 
-#define iMeshP_getCopyOnPart		FC_FUNC_(imeshp_getcopyonpart,		IMESHP_GETCOPYONPART) 
-#define iMeshP_getOwnerCopy		FC_FUNC_(imeshp_getownercopy,		IMESHP_GETOWNERCOPY) 
-#define iMeshP_Wait			FC_FUNC_(imeshp_wait,			IMESHP_WAIT)
-#define iMeshP_WaitAny			FC_FUNC_(imeshp_waitany,		IMESHP_WAITANY)
-#define iMeshP_WaitAll			FC_FUNC_(imeshp_waitall,		IMESHP_WAITALL)
-#define iMeshP_WaitEnt			FC_FUNC_(imeshp_waitent,		IMESHP_WAITENT)
-#define iMeshP_Test			FC_FUNC_(imeshp_test,			IMESHP_TEST)
-#define iMeshP_pollForRequests		FC_FUNC_(imeshp_pollforrequests,	IMESHP_POLLFORREQUESTS)
-#define iMeshP_exchEntArrToPartsAll	FC_FUNC_(imeshp_exchentarrtopartsall,	IMESHP_EXCHENTARRTOPARTSALL)
-#define iMeshP_migrateEntity		FC_FUNC_(imeshp_migrateentity,		IMESHP_MIGRATEENTITY)
-#define iMeshP_updateVtxCoords		FC_FUNC_(imeshp_updatevtxcoords,	IMESHP_UPDATEVTXCOORDS)
-#define iMeshP_replaceOnPartBdry	FC_FUNC_(imeshp_replaceonpartbdry,	IMESHP_REPLACEONPARTBDRY)
-#define iMeshP_addGhostOf		FC_FUNC_(imeshp_addghostof,		IMESHP_ADDGHOSTOF)
-#define iMeshP_rmvGhostOf		FC_FUNC_(imeshp_rmvghostof,		IMESHP_RMVGHOSTOF)
-#define iMeshP_syncMeshAll		FC_FUNC_(imeshp_syncmeshall,		IMESHP_SYNCMESHALL)
-#define iMeshP_pushTags			FC_FUNC_(imeshp_pushtags,		IMESHP_PUSHTAGS)
-#define iMeshP_pushTagsEnt		FC_FUNC_(imeshp_pushtagsent,		IMESHP_PUSHTAGSENT)
-#define iMeshP_iPushTags		FC_FUNC_(imeshp_ipushtags,		IMESHP_IPUSHTAGS)
-#define iMeshP_iPushTagsEnt		FC_FUNC_(imeshp_ipushtagsent,		IMESHP_IPUSHTAGSENT)
-#define iMeshP_createGhostEnts		FC_FUNC_(imeshp_createghostents,	IMESHP_CREATEGHOSTENTS)
-#define iMeshP_deleteGhostEnts		FC_FUNC_(imeshp_deleteghostents,	IMESHP_DELETEGHOSTENTS)
-#define iMeshP_ghostEntInfo		FC_FUNC_(imeshp_ghostentinfo,		IMESHP_GHOSTENTINFO)
-#define iMeshP_load			FC_FUNC_(imeshp_load,			IMESHP_LOAD)
-#define iMeshP_save			FC_FUNC_(imeshp_save,			IMESHP_SAVE)
+
+#define iMeshP_createPartitionAll FC_FUNC_( imeshp_createpartitionall, IMESHP_CREATEPARTITIONALL )
+#define iMeshP_destroyPartitionAll FC_FUNC_( imeshp_destroypartitionall, IMESHP_DESTROYPARTITIONALL )
+#define iMeshP_getPartitionComm FC_FUNC_( imeshp_getpartitioncomm, IMESHP_GETPARTITIONCOMM )
+#define iMeshP_syncPartitionAll FC_FUNC_( imeshp_syncpartitionall, IMESHP_SYNCPARTITIONALL )
+#define iMeshP_getNumPartitions FC_FUNC_( imeshp_getnumpartitions, IMESHP_GETNUMPARTITIONS )
+#define iMeshP_getPartitions FC_FUNC_( imeshp_getpartitions, IMESHP_GETPARTITIONS )
+#define iMeshP_getNumGlobalParts FC_FUNC_( imeshp_getnumglobalparts, IMESHP_GETNUMGLOBALPARTS )
+#define iMeshP_getNumLocalParts FC_FUNC_( imeshp_getnumlocalparts, IMESHP_GETNUMLOCALPARTS )
+#define iMeshP_getLocalParts FC_FUNC_( imeshp_getlocalparts, IMESHP_GETLOCALPARTS )
+#define iMeshP_getRankOfPart FC_FUNC_( imeshp_getrankofpart, IMESHP_GETRANKOFPART )
+#define iMeshP_getRankOfPartArr FC_FUNC_( imeshp_getrankofpartarr, IMESHP_GETRANKOFPARTARR )
+#define iMeshP_getNumOfTypeAll FC_FUNC_( imeshp_getnumoftypeall, IMESHP_GETNUMOFTYPEALL )
+#define iMeshP_getNumOfTopoAll FC_FUNC_( imeshp_getnumoftopoall, IMESHP_GETNUMOFTOPOALL )
+#define iMeshP_createPart FC_FUNC_( imeshp_createpart, IMESHP_CREATEPART )
+#define iMeshP_destroyPart FC_FUNC_( imeshp_destroypart, IMESHP_DESTROYPART )
+#define iMeshP_getPartIdFromPartHandle FC_FUNC_( imeshp_getpartidfromparthandle, IMESHP_GETPARTIDFROMPARTHANDLE )
+#define iMeshP_getPartIdsFromPartHandlesArr FC_FUNC_( imeshp_getpartidsfromparthandlesarr, IMESHP_GETPARTIDSFROMPARTHANDLESARR )
+#define iMeshP_getPartHandleFromPartId FC_FUNC_( imeshp_getparthandlefrompartid, IMESHP_GETPARTHANDLEFROMPARTID )
+#define iMeshP_getPartHandlesFromPartsIdsArr FC_FUNC_( imeshp_getparthandlesfrompartsidsarr, IMESHP_GETPARTHANDLESFROMPARTSIDSARR )
+#define iMeshP_getNumPartNbors FC_FUNC_( imeshp_getnumpartnbors, IMESHP_GETNUMPARTNBORS )
+#define iMeshP_getNumPartNborsArr FC_FUNC_( imeshp_getnumpartnborsarr, IMESHP_GETNUMPARTNBORSARR )
+#define iMeshP_getPartNbors FC_FUNC_( imeshp_getpartnbors, IMESHP_GETPARTNBORS )
+#define iMeshP_getPartNborsArr FC_FUNC_( imeshp_getpartnborsarr, IMESHP_GETPARTNBORSARR )
+#define iMeshP_getNumPartBdryEnts FC_FUNC_( imeshp_getnumpartbdryents, IMESHP_GETNUMPARTBDRYENTS )
+#define iMeshP_getPartBdryEnts FC_FUNC_( imeshp_getpartbdryents, IMESHP_GETPARTBDRYENTS )
+#define iMeshP_initPartBdryEntIter FC_FUNC_( imeshp_initpartbdryentiter, IMESHP_INITPARTBDRYENTITER )
+#define iMeshP_initPartBdryEntArrIter FC_FUNC_( imeshp_initpartbdryentarriter, IMESHP_INITPARTBDRYENTARRITER )
+#define iMeshP_getNumOfType FC_FUNC_( imeshp_getnumoftype, IMESHP_GETNUMOFTYPE )
+#define iMeshP_getNumOfTopo FC_FUNC_( imeshp_getnumoftopo, IMESHP_GETNUMOFTOPO )
+#define iMeshP_getAdjEntIndices FC_FUNC_( imeshp_getadjentindices, IMESHP_GETADJENTINDICES )
+#define iMeshP_getEntities FC_FUNC_( imeshp_getentities, IMESHP_GETENTITIES )
+#define iMeshP_getAdjEntities FC_FUNC_( imeshp_getadjentities, IMESHP_GETADJENTITIES )
+#define iMeshP_initEntIter FC_FUNC_( imeshp_initentiter, IMESHP_INITENTITER )
+#define iMeshP_initEntArrIter FC_FUNC_( imeshp_initentarriter, IMESHP_INITENTARRITER )
+#define iMeshP_getEntOwnerPart FC_FUNC_( imeshp_getentownerpart, IMESHP_GETENTOWNERPART )
+#define iMeshP_getEntOwnerPartArr FC_FUNC_( imeshp_getentownerpartarr, IMESHP_GETENTOWNERPARTARR )
+#define iMeshP_isEntOwner FC_FUNC_( imeshp_isentowner, IMESHP_ISENTOWNER )
+#define iMeshP_isEntOwnerArr FC_FUNC_( imeshp_isentownerarr, IMESHP_ISENTOWNERARR )
+#define iMeshP_getEntStatus FC_FUNC_( imeshp_getentstatus, IMESHP_GETENTSTATUS )
+#define iMeshP_getEntStatusArr FC_FUNC_( imeshp_getentstatusarr, IMESHP_GETENTSTATUSARR )
+#define iMeshP_getNumCopies FC_FUNC_( imeshp_getnumcopies, IMESHP_GETNUMCOPIES )
+#define iMeshP_getCopyParts FC_FUNC_( imeshp_getcopyparts, IMESHP_GETCOPYPARTS )
+#define iMeshP_getCopies FC_FUNC_( imeshp_getcopies, IMESHP_GETCOPIES )
+#define iMeshP_getCopyOnPart FC_FUNC_( imeshp_getcopyonpart, IMESHP_GETCOPYONPART )
+#define iMeshP_getOwnerCopy FC_FUNC_( imeshp_getownercopy, IMESHP_GETOWNERCOPY )
+#define iMeshP_waitForRequest FC_FUNC_( imeshp_waitforrequest, IMESHP_WAITFORREQUEST )
+#define iMeshP_waitForAnyRequest FC_FUNC_( imeshp_waitforanyrequest, IMESHP_WAITFORANYREQUEST )
+#define iMeshP_waitForAllRequests FC_FUNC_( imeshp_waitforallrequests, IMESHP_WAITFORALLREQUESTS )
+#define iMeshP_waitForRequestEnt FC_FUNC_( imeshp_waitforrequestent, IMESHP_WAITFORREQUESTENT )
+#define iMeshP_testRequest FC_FUNC_( imeshp_testrequest, IMESHP_TESTREQUEST )
+#define iMeshP_pollForRequests FC_FUNC_( imeshp_pollforrequests, IMESHP_POLLFORREQUESTS )
+#define iMeshP_exchEntArrToPartsAll FC_FUNC_( imeshp_exchentarrtopartsall, IMESHP_EXCHENTARRTOPARTSALL )
+#define iMeshP_migrateEntity FC_FUNC_( imeshp_migrateentity, IMESHP_MIGRATEENTITY )
+#define iMeshP_updateVtxCoords FC_FUNC_( imeshp_updatevtxcoords, IMESHP_UPDATEVTXCOORDS )
+#define iMeshP_replaceOnPartBdry FC_FUNC_( imeshp_replaceonpartbdry, IMESHP_REPLACEONPARTBDRY )
+#define iMeshP_addGhostOf FC_FUNC_( imeshp_addghostof, IMESHP_ADDGHOSTOF )
+#define iMeshP_rmvGhostOf FC_FUNC_( imeshp_rmvghostof, IMESHP_RMVGHOSTOF )
+#define iMeshP_syncMeshAll FC_FUNC_( imeshp_syncmeshall, IMESHP_SYNCMESHALL )
+#define iMeshP_pushTags FC_FUNC_( imeshp_pushtags, IMESHP_PUSHTAGS )
+#define iMeshP_pushTagsEnt FC_FUNC_( imeshp_pushtagsent, IMESHP_PUSHTAGSENT )
+#define iMeshP_iPushTags FC_FUNC_( imeshp_ipushtags, IMESHP_IPUSHTAGS )
+#define iMeshP_iPushTagsEnt FC_FUNC_( imeshp_ipushtagsent, IMESHP_IPUSHTAGSENT )
+#define iMeshP_createGhostEntsAll FC_FUNC_( imeshp_createghostentsall, IMESHP_CREATEGHOSTENTSALL )
+#define iMeshP_deleteGhostEntsAll FC_FUNC_( imeshp_deleteghostentsall, IMESHP_DELETEGHOSTENTSALL )
+#define iMeshP_ghostEntInfo FC_FUNC_( imeshp_ghostentinfo, IMESHP_GHOSTENTINFO )
+#define iMeshP_loadAll FC_FUNC_( imeshp_loadall, IMESHP_LOADALL )
+#define iMeshP_saveAll FC_FUNC_( imeshp_saveall, IMESHP_SAVEALL )
+
 #endif



More information about the moab-dev mailing list