Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / OBV / Simple / Client_i.cpp
blobd453791f56144c9390da39c55b322b67603660dd
1 #include "Client_i.h"
2 #include "OBV_impl.h"
4 #include "ace/Get_Opt.h"
5 #include "ace/OS_NS_sys_time.h"
7 int
8 Checkpoint_Client_i::run (const char *name,
9 int argc,
10 ACE_TCHAR *argv[])
12 // Initialize the client (read ior...).
13 if (checkpoint.init (name,argc, argv) == -1)
14 return -1;
16 // Set random seed
17 ACE_Time_Value now (ACE_OS::gettimeofday ());
18 ACE_OS::srand ((unsigned int) now.sec ());
20 try
22 ACE_DEBUG ((LM_DEBUG, "Send some random events:\n"));
24 CORBA::Long value = 64;
25 Event_var t_e (static_cast<Event*> (new Event_impl (value)));
26 t_e->do_print ();
27 checkpoint->put_event (t_e);
29 value = 34;
30 t_e = new Event_impl (value);
31 t_e->do_print ();
32 checkpoint->put_event (t_e);
34 checkpoint->shutdown ();
36 catch (const CORBA::Exception& ex)
38 ex._tao_print_exception ("\n Exception in RMI");
39 return -1;
42 return 0;
45 // Constructor.
46 Checkpoint_Client_i::Checkpoint_Client_i ()
48 //no-op
51 //Destructor.
52 Checkpoint_Client_i::~Checkpoint_Client_i ()
54 //no-op