summaryrefslogtreecommitdiff
path: root/TAO/CIAO/DAnCE/Config_Handlers/Cap_Handler.cpp
blob: d357bc03ec8997ad7ceaae885a5021bff45d0157 (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
//==================================================================
/**
 *  @file  Cap_Handler.cpp
 *
 *  $Id$
 *
 *  @author Emre Turkay <turkaye@dre.vanderbilt.edu>
 */
//==================================================================

#include "Cap_Handler.h"
#include "SP_Handler.h"
#include "tao/Exception.h"
#include "Utils.h"
#include <iostream>
#include "string.h"
#include "Utils.h"
#include "Process_Element.h"

BEGIN_DEPLOYMENT_NAMESPACE

void
CAP_Handler::process_Capability (Deployment::Capability &cap)
{
  //Check if the Schema IDs for both the elements match
  for (DOMNode* node = this->iter_->nextNode();
       node != 0;
       node = this->iter_->nextNode())
    {
      XStr node_name (node->getNodeName ());

      if (node_name == XStr
               (ACE_TEXT ("Deployment:Capability")))
        {
        }
      else if
        (CIAO::Config_Handler::Utils::process_string 
              (this->iter_, node_name, "name", cap.name));
      else if
        (CIAO::Config_Handler::Utils::process_string_seq 
              (this->iter_, node_name, "resourceType", 
                             cap.resourceType));
      else if
        (process_sequence_common<Deployment::SatisfierProperty>
           (this->doc_, this->iter_, node,
            node_name, "property", cap.property,
            &SP_Handler::process_SatisfierProperty,
            this->id_map_));
      else
        {
          this->iter_->previousNode ();
          break;
        }
    }
}

END_DEPLOYMENT_NAMESPACE