summaryrefslogtreecommitdiff
path: root/TAO/CIAO/tools/Config_Handlers/ComponentPropertyDescription_Handler.cpp
blob: 6c56f10a44e97634ddcd1947723126826781f8d2 (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
//$Id$

#include "ComponentPropertyDescription_Handler.h"
#include "DataType_Handler.h"
#include "ciao/Deployment_DataC.h"

namespace CIAO
{
  namespace Config_Handlers
  {
    void
    ComponentPropertyDescription_Handler::component_property_description (
        const ComponentPropertyDescription& desc,
        ::Deployment::ComponentPropertyDescription& toconfig)
    {
      toconfig.name = CORBA::string_dup (desc.name ().c_str ());

      // Delegate the DataType to the
      // DataType_Handler.

      // @@ There is a lurking bug here.
//#if 0
      CORBA::TypeCode_ptr tcptr = toconfig.type.in ();
      DataType_Handler::data_type (tcptr,desc.type ());
//#endif /*if 0*/
    }

    ComponentPropertyDescription 
    ComponentPropertyDescription_Handler::component_property_description (
      const ::Deployment::ComponentPropertyDescription &src)
    {
      XMLSchema::string< char > name ((src.name));
      DataType dt (DataType_Handler::data_type (src.type));
      ComponentPropertyDescription cpd (name,dt);
      return cpd;
    }

  }
}