blob: adadd45a0bd6480b6bd984f59a2dd82d34e479e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// $Id$
#include "PL_Handler.h"
#include "IDD_Handler.h"
#include "Basic_Deployment_Data.hpp"
#include "DAnCE/Deployment/Deployment_DataC.h"
#include "ciao/CIAO_common.h"
namespace CIAO
{
namespace Config_Handlers
{
void
PL_Handler::get_PlanLocality (const PlanLocality &desc,
Deployment::PlanLocality &toconfig)
{
CIAO_TRACE ("PL_Handler::get_PlanLocality");
switch (desc.constraint ().integral ())
{
case PlanLocalityKind::SameProcess_l:
toconfig.constraint = Deployment::PlanSameProcess;
break;
case PlanLocalityKind::DifferentProcess_l:
toconfig.constraint = Deployment::PlanDifferentProcess;
break;
case PlanLocalityKind::NoConstraint_l:
toconfig.constraint = Deployment::PlanNoConstraint;
break;
}
size_t pos = 0;
toconfig.constrainedInstanceRef.length (desc.count_constrainedInstance ());
for (PlanLocality::constrainedInstance_const_iterator i = desc.begin_constrainedInstance ();
i != desc.end_constrainedInstance ();
++i)
{
CORBA::ULong tmp = 0;
IDD_Handler::IDREF.find_ref ((*i)->idref ().id ().c_str (), tmp);
toconfig.constrainedInstanceRef[pos] = tmp;
++pos;
}
}
}
}
|