summaryrefslogtreecommitdiff
path: root/modules/CIAO/tools/Config_Handlers/CIAO_Events/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/tools/Config_Handlers/CIAO_Events/test.cpp')
-rw-r--r--modules/CIAO/tools/Config_Handlers/CIAO_Events/test.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/CIAO/tools/Config_Handlers/CIAO_Events/test.cpp b/modules/CIAO/tools/Config_Handlers/CIAO_Events/test.cpp
new file mode 100644
index 00000000000..63c024a0a89
--- /dev/null
+++ b/modules/CIAO/tools/Config_Handlers/CIAO_Events/test.cpp
@@ -0,0 +1,58 @@
+// $Id$
+
+#include <iostream>
+
+#include "CIAOEvents.hpp"
+#include "CIAOEvents_Handler.h"
+#include "ciao/Deployment_EventsC.h"
+
+#include "ace/Get_Opt.h"
+#include "tao/ORB.h"
+
+static const char *input_file = "test.ced";
+
+
+static int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "i:");
+
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'i':
+ input_file = get_opts.opt_arg ();
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-i <input file> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command-line
+ return 0;
+}
+
+using namespace CIAO::Config_Handlers;
+
+int main (int argc, char *argv[])
+{
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CIAOEvents_Handler event_handler (input_file);
+ // Convert XSC to idl datatype
+
+ std::cout << "Instance document import succeeded. Dumping contents to file\n";
+
+ std::cout << "Test completed!";
+
+ return 0;
+
+}