summaryrefslogtreecommitdiff
path: root/TAO/CIAO/DAnCE/Config_Handlers/Domain_Handler.h
blob: 327bfe54bba64f63005f168253dab32468616029 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
//==================================================================
/**
 *  @file  Domain_Handler.h
 *
 *  $Id$
 *
 *  @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu>
 */
//=====================================================================
#ifndef DOMAIN_HANDLER_H
#define DOMAIN_HANDLER_H
#include /**/ "ace/pre.h"

#include "ciao/DeploymentC.h"
#include "Config_Handler_export.h"
#include "Basic_Handler.h"
#include "XercesString.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ace/Auto_Ptr.h"
#include "ace/Log_Msg.h"
#include "ace/OS_main.h"
#include "tao/Exception.h"
#include "XercesString.h"
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/XMLURL.hpp>
#include <xercesc/util/XMLUri.hpp>

using Config_Handler::XStr;
using xercesc::XMLUni;
using xercesc::XMLUri;
using xercesc::XMLURL;
using xercesc::XMLString;
using xercesc::XMLException;
using xercesc::DOMException;
using xercesc::DOMBuilder;
using xercesc::DOMImplementationRegistry;
using xercesc::DOMImplementationLS;
using xercesc::DOMImplementation;
using xercesc::DOMInputSource;
using xercesc::DOMText;
using xercesc::DOMNamedNodeMap;
using xercesc::DOMLocator;
using xercesc::DOMError;
using xercesc::DOMNodeFilter;
using xercesc::DOMNamedNodeMap;

BEGIN_DEPLOYMENT_NAMESPACE

/**
 * @class Domain_Handler
 *
 * @brief Handler class for <Domain> type
 *
 * This class is within the Target Data Model subpackage of the
 * Deployment & Configuration package.
 *
 * This class defines handler methods to parse the aforementioned type
 * in the description files. The corresponding CORBA IDL type for this
 * element is returned.
 */

class Config_Handler_Export Domain_Handler: public Basic_Handler
{
public:

  /// constructor
  Domain_Handler (DOMDocument* doc, unsigned long filter_)
    : Basic_Handler (doc, filter_) { }

  /// constructor
  Domain_Handler (DOMNodeIterator* iter, bool release = false)
    : Basic_Handler (iter, release) { }

  /// constructor
  Domain_Handler (DOMDocument* doc, DOMNodeIterator* iter, bool release = false)
    : Basic_Handler (doc, iter, release) { }

  /// Process the Domain type
  void process_domain (Deployment::Domain& domain);

  /// process the node attribute
  void process_node (DOMNodeIterator* iter,
                     Deployment::Node& domain_node);

  /// process the node attribute
  void process_bridge (DOMNodeIterator* iter,
                       Deployment::Bridge& domain_bridge);

  /// process the node attribute
  void process_interconnect (DOMNodeIterator* iter,
                             Deployment::Interconnect& domain_ic);

  /// process the resource attribute
  void process_resource (DOMNodeIterator* iter,
                         Deployment::Resource& domain_resource);

  /// process the node attribute
  void process_sr (DOMNodeIterator* iter,
                   Deployment::SharedResource& domain_sr);

  /// update node refs
  void update_node_refs (Deployment::Domain& domain);

  /// update ic refs
  void update_ic_refs (Deployment::Domain& domain);

  /// update bridge refs
  void update_bridge_refs (Deployment::Domain& domain);

  /// update sr refs
  void update_sr_refs (Deployment::Domain& domain);

  /// process IDREFs
  void process_refs (DOMNamedNodeMap* named_node_map);

};

END_DEPLOYMENT_NAMESPACE

#include /**/ "ace/post.h"

#endif /* DOMAIN_HANDLER_H */