blob: 9aa57aa10e64b13752e2240d970e3e348c904718 (
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
|
// $Id$
#include "CPD_Handler.h"
namespace CIAO
{
namespace Config_Handlers
{
CPD_Handler::CPD_Handler (void)
{
}
CPD_Handler::~CPD_Handler (void)
{
}
///This method maps the values from the
///XSC object <ComponentPortDescription> to
///the CORBA IDL type <Deployment::ComponentPortDescription>.
void
CPD_Handler::get_ComponentPortDescription (
Deployment::ComponentPortDescription& toconfig,
ComponentPortDescription& desc)
{
//We make sure that a value exists for supportedType
//before increasing the size of the sequence.
if (!desc.supportedType ().empty ())
{
toconfig.supportedType.length (1);
toconfig.supportedType[0] =
CORBA::string_dup (desc.supportedType ().c_str ());
}
toconfig.name = CORBA::string_dup (desc.name ().c_str ());
toconfig.specificType =
CORBA::string_dup (desc.specificType ().c_str ());
//The DnC spec maps these CORBA IDL booleans to
//strings. Therefore, we set them to true if a
//value was provided (and they aren't an empty string)
//and false otherwise.
toconfig.provider = !desc.provider ().empty ();
toconfig.exclusiveProvider = !desc.exclusiveProvider ().empty ();
toconfig.exclusiveUser = !desc.exclusiveUser ().empty ();
toconfig.optional = !desc.optional ().empty ();
}
}
}
|