3 //=============================================================================
5 * @file CORBALOC_Parser.h
7 * @author Carlos O'Ryan (coryan@cs.wustl.edu)
8 * @author Priyanka Gontla (pgontla@uci.edu)
10 //=============================================================================
13 #ifndef TAO_CORBALOC_PARSER_H
14 #define TAO_CORBALOC_PARSER_H
15 #include /**/ "ace/pre.h"
17 #include "tao/IOR_Parser.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if (TAO_HAS_CORBALOC_PARSER == 1)
25 #include "ace/Service_Config.h"
26 #include "ace/Containers_T.h"
27 #include "tao/Profile.h"
28 #include "ace/SString.h"
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
35 * @class TAO_CORBALOC_Parser
37 * @brief Implements the <corbaloc:> IOR format
39 * This class implements the <corbaloc:> IOR format.
40 * It is dynamically loaded by the ORB and used to parse the
41 * string to separate the individual <obj_addr> from the list of object
42 * addresses <obj_addr_list>.
44 class TAO_CORBALOC_Parser
: public TAO_IOR_Parser
48 TAO_CORBALOC_Parser () = default;
51 ~TAO_CORBALOC_Parser () override
= default;
53 /// = The IOR_Parser methods, please read the documentation in
55 bool match_prefix (const char *ior_string
) const override
;
57 /// Parse the ior-string that is passed.
58 CORBA::Object_ptr
parse_string (const char *ior
,
59 CORBA::ORB_ptr orb
) override
;
63 * Make a stub from the MProfile that is created in
64 * parse_string_mprofile_helper. Using this stub, create an object
65 * reference which is sent to the application.
67 CORBA::Object_ptr
make_stub_from_mprofile (CORBA::ORB_ptr orb
,
68 TAO_MProfile
&mprofile
);
70 /// Gets the pointer to the key_string when the protocol used is RIR
71 CORBA::Object_ptr
parse_string_rir_helper (const char *corbaloc_name
,
74 void make_canonical (const char *ior
,
76 ACE_CString
&canonical_endpoint
);
78 struct parsed_endpoint
{
79 parsed_endpoint () = default;
81 TAO_Profile
*profile_
{};
83 ACE_CString prot_addr_
;
87 ACE_STATIC_SVC_DECLARE_EXPORT (TAO
, TAO_CORBALOC_Parser
)
88 ACE_FACTORY_DECLARE (TAO
, TAO_CORBALOC_Parser
)
90 TAO_END_VERSIONED_NAMESPACE_DECL
92 #if defined (__ACE_INLINE__)
93 # include "tao/CORBALOC_Parser.inl"
94 #endif /* __ACE_INLINE__ */
96 #endif /* TAO_HAS_CORBALOC_PARSER == 1 */
98 #include /**/ "ace/post.h"
99 #endif /* TAO_CORBALOC_PARSER_H */