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
);
10 Naming_Context process_context
;
12 ACE_Name_Options
*name_options
=
13 process_context
.name_options ();
14 name_options
->context (ACE_Naming_Context::PROC_LOCAL
);
15 ACE_TCHAR
*nargv
[] = { argv
[0] };
16 name_options
->parse_args (sizeof(nargv
) / sizeof(ACE_TCHAR
*),
18 process_context
.open (name_options
->context ());
21 Naming_Context shared_context
;
23 ACE_Name_Options
*name_options
=
24 shared_context
.name_options ();
25 name_options
->process_name (argv
[0]);
26 name_options
->context (ACE_Naming_Context::NET_LOCAL
);
27 shared_context
.open (name_options
->context ());
30 Temperature_Monitor2
temperature_monitor (opt
,
33 temperature_monitor
.monitor ();
34 process_context
.close ();
35 shared_context
.close ();