[MOAB-dev] r3596 - in MOAB/trunk/examples: GeomSetHierarchy GetEntities SetsNTags

tautges at mcs.anl.gov tautges at mcs.anl.gov
Thu Mar 11 13:51:08 CST 2010


Author: tautges
Date: 2010-03-11 13:51:08 -0600 (Thu, 11 Mar 2010)
New Revision: 3596

Modified:
   MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp
   MOAB/trunk/examples/GetEntities/GetEntities.cpp
   MOAB/trunk/examples/SetsNTags/SetsNTags.cpp
Log:
Adding usage statements.



Modified: MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp
===================================================================
--- MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp	2010-03-11 19:48:49 UTC (rev 3595)
+++ MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp	2010-03-11 19:51:08 UTC (rev 3596)
@@ -3,7 +3,12 @@
 #include "moab/MBCN.hpp"
 #include <iostream>
 
-int main(int, char **argv) {
+int main(int argc, char **argv) {
+  if (1 == argc) {
+    std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
+    return 0;
+  }
+  
     // instantiate & load a file
   MBInterface *mb = new MBCore();
   MBErrorCode rval = mb->load_file(argv[1]);

Modified: MOAB/trunk/examples/GetEntities/GetEntities.cpp
===================================================================
--- MOAB/trunk/examples/GetEntities/GetEntities.cpp	2010-03-11 19:48:49 UTC (rev 3595)
+++ MOAB/trunk/examples/GetEntities/GetEntities.cpp	2010-03-11 19:51:08 UTC (rev 3596)
@@ -2,7 +2,12 @@
 #include "moab/MBRange.hpp"
 #include <iostream>
 
-int main(int, char **argv) {
+int main(int argc, char **argv) {
+  if (1 == argc) {
+    std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
+    return 0;
+  }
+
     // instantiate & load a mesh from a file
   MBCore *mb = new MBCore();
   MBErrorCode rval = mb->load_mesh(argv[1]);

Modified: MOAB/trunk/examples/SetsNTags/SetsNTags.cpp
===================================================================
--- MOAB/trunk/examples/SetsNTags/SetsNTags.cpp	2010-03-11 19:48:49 UTC (rev 3595)
+++ MOAB/trunk/examples/SetsNTags/SetsNTags.cpp	2010-03-11 19:51:08 UTC (rev 3596)
@@ -2,7 +2,12 @@
 #include "moab/MBRange.hpp"
 #include <iostream>
 
-int main(int, char **argv) {
+int main(int argc, char **argv) {
+  if (1 == argc) {
+    std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
+    return 0;
+  }
+
     // get the material set tag handle
   MBTag mtag;
   MBErrorCode rval;



More information about the moab-dev mailing list