blob: 03a9c7165e1795213b601ca6ae4559eb55e0b763 (
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
|
// $Id$
#include "RDD_Handler.h"
#include "Basic_Deployment_Data.hpp"
#include "dance/Deployment/Deployment_DataC.h"
#include "Any_Handler.h"
#include "dance/Logger/Log_Macros.h"
#include "Property_Handler.h"
namespace DAnCE
{
namespace Config_Handlers
{
void
RDD_Handler::resource_deployment_descr (
const ResourceDeploymentDescription &src,
::Deployment::ResourceDeploymentDescription &dest)
{
DANCE_TRACE("RDD_Handler::resource_deployment_descr");
dest.requirementName = ACE_TEXT_ALWAYS_CHAR (src.requirementName ().c_str ());
dest.resourceName= ACE_TEXT_ALWAYS_CHAR (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)
{
DANCE_TRACE("RDD_Handler::resource_deployment_descr - reverse");
XMLSchema::string< ACE_TCHAR > reqname (ACE_TEXT_CHAR_TO_TCHAR (src.requirementName));
XMLSchema::string< ACE_TCHAR > resname (ACE_TEXT_CHAR_TO_TCHAR (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;
}
}
}
|