1 #include "Naming_Context.h"
2 #include "Temperature_Monitor.h"
3 #include "Temperature_Monitor_Options.h"
6 int ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
8 Temperature_Monitor_Options
opt (argc
, argv
);
11 // Listing 2 code/ch21
12 Naming_Context naming_context
;
14 ACE_Name_Options
*name_options
= naming_context
.name_options();
17 // Listing 3 code/ch21
18 ACE_TCHAR
*naming_options_argv
[] = { argv
[0] };
19 name_options
->parse_args
20 (sizeof(naming_options_argv
) / sizeof(ACE_TCHAR
*),
22 name_options
->context (ACE_Naming_Context::PROC_LOCAL
);
23 naming_context
.open (name_options
->context ());
26 // Listing 4 code/ch21
27 Temperature_Monitor
temperature_monitor (opt
, naming_context
);
28 temperature_monitor
.monitor ();
31 // Listing 5 code/ch21
32 naming_context
.close ();