Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / TAO / orbsvcs / ImplRepo_Service / Locator_XMLHandler.h
blob28c1b1828e622f1dbe0d15633b7057bc0a1ebea1
1 // -*- C++ -*-
2 //=============================================================================
3 /**
4 * @file Locator_XMLHandler.h
6 * @author Justin Michel <michel_j@ociweb.com>
7 */
8 //=============================================================================
10 #ifndef Locator_XMLHandler_H
11 #define Locator_XMLHandler_H
13 #include "ACEXML/common/DefaultHandler.h"
14 #include "tao/ORB.h"
15 #include "Server_Info.h"
16 #include "Activator_Info.h"
18 #include <vector>
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 class XML_Backing_Store;
25 /**
26 * Callback SAX XML Handler for parsing Locator XML.
28 class Locator_XMLHandler : public ACEXML_DefaultHandler
30 public:
31 typedef std::pair<ACE_CString, ACE_CString> NameValue;
32 typedef std::vector<NameValue> NameValues;
33 // XML ELEMENT names
34 static const ACE_TCHAR* ROOT_TAG;
35 static const ACE_TCHAR* SERVER_INFO_TAG;
36 static const ACE_TCHAR* ENVIRONMENT_TAG;
37 static const ACE_TCHAR* ACTIVATOR_INFO_TAG;
39 static const ACE_TCHAR* SERVER_TAG;
40 static const ACE_TCHAR* POANAME_TAG;
41 static const ACE_TCHAR* JACORB_TAG;
42 static const ACE_TCHAR* ACTNAME_TAG;
43 static const ACE_TCHAR* CMDLINE_TAG;
44 static const ACE_TCHAR* DIR_TAG;
45 static const ACE_TCHAR* MODE_TAG;
46 static const ACE_TCHAR* LIMIT_TAG;
47 static const ACE_TCHAR* PARTIOR_TAG;
48 static const ACE_TCHAR* IOR_TAG;
49 static const ACE_TCHAR* STARTED_TAG;
50 static const ACE_TCHAR* PEER_TAG;
51 static const ACE_TCHAR* PID_TAG;
52 static const ACE_TCHAR* KEYNAME_TAG;
53 static const ACE_TCHAR* ALTKEY_TAG;
55 struct EnvVar {
56 ACE_TString name;
57 ACE_TString value;
58 bool operator==(const EnvVar&) const; // To allow Vector explicit instantiation
59 bool operator!=(const EnvVar&) const; // To allow Vector explicit instantiation
62 typedef std::vector<EnvVar> EnvList;
63 typedef std::vector<ACE_CString> PeerList;
65 /// constructor
66 /// @param repo the repo to update based on XML
67 Locator_XMLHandler (XML_Backing_Store& repo);
69 /// provide implementation for handling a new XML element
70 virtual void startElement (const ACEXML_Char* namespaceURI,
71 const ACEXML_Char* localName,
72 const ACEXML_Char* qName,
73 ACEXML_Attributes* atts);
75 /// provide implementation for handling terminating an XML element
76 virtual void endElement (const ACEXML_Char* namespaceURI,
77 const ACEXML_Char* localName,
78 const ACEXML_Char* qName);
80 private:
81 /// the repository
82 XML_Backing_Store& repo_;
83 Server_Info *si_;
84 bool server_started_;
85 NameValues extra_params_;
86 EnvList env_vars_;
87 PeerList peer_list_;
90 #endif /* Locator_XMLHandler_H */