blob: 374c0e4993f3033e5d101d6a44a095fbaf2fd133 (
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
53
54
55
56
57
|
// $Id$
#include "RDD_Handler.h"
#include "Basic_Deployment_Data.hpp"
#include "ciao/Deployment_DataC.h"
#include "Any_Handler.h"
#include "ciao/CIAO_common.h"
#include "Property_Handler.h"
namespace CIAO
{
namespace Config_Handlers
{
void
RDD_Handler::resource_deployment_descr (
const ResourceDeploymentDescription &src,
::Deployment::ResourceDeploymentDescription &dest)
{
CIAO_TRACE("RDD_Handler::resource_deployment_descr");
dest.requirementName =
src.requirementName ().c_str ();
dest.resourceName=
src.resourceName ().c_str ();
std::for_each (src.begin_property (),
src.end_property (),
Property_Functor (dest.property));
}
ResourceDeploymentDescription
RDD_Handler::resource_deployment_descr (
const ::Deployment::ResourceDeploymentDescription &src)
{
CIAO_TRACE("RDD_Handler::resource_deployment_descr - reverse");
XMLSchema::string< char > reqname ((src.requirementName));
XMLSchema::string< char > resname ((src.resourceName.in ()));
ResourceDeploymentDescription rdd (reqname,resname);
for (CORBA::ULong i = 0;
i != src.property.length ();
++i)
{
rdd.add_property (Property_Handler::get_property (src.property[i]));
}
return rdd;
}
}
}
|