blob: 1e47ce1c4df6dc6f566bb8355759be228f1821d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// $Id$
#include <iostream>
#include "CIAOEvents.hpp"
#include "CIAOEvents_Handler.h"
#include "DAnCE/Deployment/Deployment_EventsC.h"
#include "ace/Get_Opt.h"
#include "tao/ORB.h"
static const ACE_TCHAR *input_file = ACE_TEXT ("test.ced");
static int
parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("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 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
if (parse_args (argc, argv) != 0)
return 1;
CIAOEvents_Handler event_handler (ACE_TEXT_ALWAYS_CHAR (input_file));
// Convert XSC to idl datatype
std::cout << "Instance document import succeeded. Dumping contents to file\n";
std::cout << "Test completed!";
return 0;
}
|