blob: ae8b94908cd96229cfcbd66a7de001e5a673372a (
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
|
#include "STD_PCD_Handler.h"
#include "STD_CPD_Handler.h"
#include "Basic_Deployment_Data.hpp"
#include "ciao/Packaging_DataC.h"
#include "Deployment.hpp"
namespace DAnCE
{
namespace Config_Handlers
{
bool
STD_PCD_Handler::package_config (
const PackageConfiguration &desc,
::Deployment::PackageConfiguration &toconfig)
{
toconfig.label =
desc.label ().c_str ();
toconfig.UUID =
desc.UUID ().c_str ();
if (!XML_Helper::XML_HELPER.is_initialized ())
return false;
// parse the .cpd (ComponentPackageDescription) file
// that <basePackage> links to
xercesc::DOMDocument* dom =
XML_Helper::XML_HELPER.create_dom ((desc.basePackage()).href ().c_str ());
if (!dom)
return false;
ComponentPackageDescription cpc =
componentPackageDescription (dom);
Deployment::ComponentPackageDescription idl_cpc;
STD_CPD_Handler cpd_handler;
cpd_handler.component_package_descr (cpc,
idl_cpc);
toconfig.basePackage.length (1);
toconfig.basePackage [0] = idl_cpc;
return true;
}
}
}
|