1 #include "Naming_Context.h"
2 #include "Temperature_Monitor2.h"
3 #include "Temperature_Monitor_Options.h"
6 int ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
8 Temperature_Monitor_Options
opt (argc
, argv
);
9 Naming_Context process_context
;
11 ACE_Name_Options
*name_options
=
12 process_context
.name_options ();
13 name_options
->context (ACE_Naming_Context::PROC_LOCAL
);
14 ACE_TCHAR
*nargv
[] = { argv
[0] };
15 name_options
->parse_args (sizeof(nargv
) / sizeof(ACE_TCHAR
*) ,
17 process_context
.open (name_options
->context ());
20 Naming_Context shared_context
;
22 ACE_Name_Options
*name_options
=
23 shared_context
.name_options ();
24 name_options
->process_name (argv
[0]);
25 name_options
->context (ACE_Naming_Context::NODE_LOCAL
);
26 shared_context
.open (name_options
->context ());
29 Temperature_Monitor2
temperature_monitor (opt
,
32 temperature_monitor
.monitor ();
34 process_context
.close ();
35 shared_context
.close ();