[cig-commits] r8926 - cs/benchmark/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Dec 19 12:04:01 PST 2007
Author: luis
Date: 2007-12-19 12:04:01 -0800 (Wed, 19 Dec 2007)
New Revision: 8926
Added:
cs/benchmark/cigma/trunk/src/ExtractCmd.cpp
cs/benchmark/cigma/trunk/src/ExtractCmd.h
Log:
Callback command for `cigma extract [args]'
Added: cs/benchmark/cigma/trunk/src/ExtractCmd.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/ExtractCmd.cpp 2007-12-19 20:03:49 UTC (rev 8925)
+++ cs/benchmark/cigma/trunk/src/ExtractCmd.cpp 2007-12-19 20:04:01 UTC (rev 8926)
@@ -0,0 +1,46 @@
+#include <iostream>
+#include <cassert>
+#include "ExtractCmd.h"
+
+// ---------------------------------------------------------------------------
+
+cigma::ExtractCmd::ExtractCmd()
+{
+ name = "extract";
+}
+
+cigma::ExtractCmd::~ExtractCmd()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+void cigma::ExtractCmd::setupOptions(AnyOption *opt)
+{
+ std::cout << "Calling cigma::ExtractCmd::setupOptions()" << std::endl;
+
+ assert(opt != 0);
+
+ /* setup usage */
+ opt->addUsage("Usage:");
+ opt->addUsage("");
+ opt->addUsage(" cigma extract [args ...]");
+
+ /* setup flags and options */
+ opt->setFlag("help", 'h');
+ opt->setOption("order", 'o');
+ opt->setOption("meshfile");
+ opt->setOption("meshpath");
+}
+
+void cigma::ExtractCmd::configure(AnyOption *opt)
+{
+ std::cout << "Calling cigma::ExtractCmd::configure()" << std::endl;
+ return;
+}
+
+int cigma::ExtractCmd::run()
+{
+ std::cout << "Calling cigma::ExtractCmd::run()" << std::endl;
+ return 0;
+}
Added: cs/benchmark/cigma/trunk/src/ExtractCmd.h
===================================================================
--- cs/benchmark/cigma/trunk/src/ExtractCmd.h 2007-12-19 20:03:49 UTC (rev 8925)
+++ cs/benchmark/cigma/trunk/src/ExtractCmd.h 2007-12-19 20:04:01 UTC (rev 8926)
@@ -0,0 +1,35 @@
+#ifndef __EXTRACT_CMD_H__
+#define __EXTRACT_CMD_H__
+
+#include "Command.h"
+#include "QuadratureRule.h"
+#include "MeshPart.h"
+
+
+namespace cigma
+{
+ class ExtractCmd;
+}
+
+
+/**
+ * @brief Callback object for `cigma extract [args ...]'
+ *
+ */
+class cigma::ExtractCmd : public Command
+{
+public:
+ ExtractCmd();
+ ~ExtractCmd();
+
+public:
+ void setupOptions(AnyOption *opt);
+ void configure(AnyOption *opt);
+ int run();
+
+public:
+ MeshPart *meshPart;
+ QuadratureRule *quadrature;
+};
+
+#endif
More information about the cig-commits
mailing list