1 #include "Time_Date_Client_i.h"
2 #include "ace/Get_Opt.h"
3 #include "ace/Read_Buffer.h"
5 // This is the interface program that accesses the remote object
8 Time_Date_Client_i::Time_Date_Client_i ()
13 Time_Date_Client_i::~Time_Date_Client_i ()
18 Time_Date_Client_i::parse_args (int,
25 Time_Date_Client_i::run (const char *name
,
29 // Initialize the client.
30 if (client_
.init (name
, argc
, argv
) == -1)
33 if (this->parse_args (argc
, argv
) == -1)
40 // Get the time & date in binary format.
41 client_
->bin_date (l
);
44 ACE_TEXT ("(%P|%t) Binary time_date = %d\n"),
47 // Get the time & date in string format.
48 CORBA::String_var str_var
;
49 client_
->str_date (str_var
.out());
52 ACE_TEXT ("(%P|%t) String time_date = %C\n"),
55 if (client_
.do_shutdown () == 1)
58 catch (const CORBA::UserException
& range_ex
)
60 range_ex
._tao_print_exception ("\tFrom get and set time_date");
63 catch (const CORBA::SystemException
& memex
)
65 memex
._tao_print_exception ("Cannot make time_date");