Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / ImplRepo / airplane_i.cpp
blob5a258383764aec99ef9a9908cb3e1d6fc1ee02cb
1 #include "airplane_i.h"
3 #include "tao/debug.h"
4 #include "ace/OS_NS_time.h"
6 // Constructor
7 Airplane_i::Airplane_i ()
9 // Seed the random number generator
10 ACE_OS::srand (static_cast<u_int> (ACE_OS::time (0L)));
14 // Destructor
16 Airplane_i::~Airplane_i (void)
18 // Nothing
22 // Returns a random plane and page number
24 char *
25 Airplane_i::get_plane (void)
27 if (TAO_debug_level)
28 ACE_DEBUG ((LM_DEBUG, "Airplane_i::get_plane\n"));
30 switch (ACE_OS::rand () % 24)
32 case 0:
33 return CORBA::string_dup ("Seagull, page 2");
34 case 1:
35 return CORBA::string_dup ("Albatross, page 7");
36 case 2:
37 return CORBA::string_dup ("Owl, page 13");
38 case 3:
39 return CORBA::string_dup ("Falcon, page 19");
40 case 4:
41 return CORBA::string_dup ("Sparrow, page 24");
42 case 5:
43 return CORBA::string_dup ("Condor, page 31");
44 case 6:
45 return CORBA::string_dup ("Basic wing-flapper, page 36");
46 case 7:
47 return CORBA::string_dup ("Butterfly, page 42");
48 case 8:
49 return CORBA::string_dup ("Moth, page 49");
50 case 9:
51 return CORBA::string_dup ("Bat, page 54");
52 case 10:
53 return CORBA::string_dup ("Wind rider, page 62");
54 case 11:
55 return CORBA::string_dup ("Bobber, page 67");
56 case 12:
57 return CORBA::string_dup ("Thunderbird, page 72");
58 case 13:
59 return CORBA::string_dup ("Oddbird, page 77");
60 case 14:
61 return CORBA::string_dup ("Another oddbird, page 81");
62 case 15:
63 return CORBA::string_dup ("Asymmetric plane, page 86");
64 case 16:
65 return CORBA::string_dup ("Flying spectacles, page 90");
66 case 17:
67 return CORBA::string_dup ("UFO, page 100");
68 case 18:
69 return CORBA::string_dup ("Space fighter #1, page 105");
70 case 19:
71 return CORBA::string_dup ("Space fighter #2, page 110");
72 case 20:
73 return CORBA::string_dup ("Pinwheel, page 120");
74 case 21:
75 return CORBA::string_dup ("Flying saucer, page 128");
76 case 22:
77 return CORBA::string_dup ("Flying teacup, page 134");
78 case 23:
79 return CORBA::string_dup ("Tumbler, page 138");
82 return 0;