Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / PriorityBand_Setup.cpp
blob95529604032188b4f06ee5a5f097890a058777d6
1 /**
2 * @file PriorityBand_Setup.cpp
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #include "PriorityBand_Setup.h"
8 #include "RTCORBA_Setup.h"
9 #include "RIR_Narrow.h"
10 #include "tao/Policy_ManagerC.h"
12 PriorityBand_Setup::PriorityBand_Setup (CORBA::ORB_ptr orb,
13 const RTCORBA_Setup &rtcorba_setup)
15 CORBA::PolicyManager_var policy_manager =
16 RIR_Narrow<CORBA::PolicyManager>::resolve (orb, "ORBPolicyManager");
18 RTCORBA::RTORB_var rtorb =
19 RIR_Narrow<RTCORBA::RTORB>::resolve (orb, "RTORB");
21 const RTCORBA::ThreadpoolLanes &lanes = rtcorba_setup.lanes ();
23 RTCORBA::PriorityBands priority_bands (3); priority_bands.length (3);
24 for (CORBA::ULong i = 0; i != lanes.length (); ++i)
26 priority_bands[i].low = lanes[i].lane_priority;
27 priority_bands[i].high = lanes[i].lane_priority;
30 CORBA::PolicyList policy_list (1); policy_list.length (1);
32 policy_list[0] =
33 rtorb->create_priority_banded_connection_policy (priority_bands);
34 policy_manager->set_policy_overrides (policy_list,
35 CORBA::ADD_OVERRIDE);
37 policy_list[0]->destroy ();
40 PriorityBand_Setup::~PriorityBand_Setup ()