1 //=============================================================================
3 * @file Parser_Registry.h
5 * @author Priyanka Gontla <pgontla@uci.edu>
6 * @author Carlos O'Ryan <coryan@uci.edu>
8 //=============================================================================
10 #ifndef TAO_PARSER_REGISTRY_H
11 #define TAO_PARSER_REGISTRY_H
13 #include /**/ "ace/pre.h"
15 #include /**/ "tao/TAO_Export.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include /**/ "tao/Versioned_Namespace.h"
23 #include "ace/os_include/os_stddef.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 // Forward declarations.
32 * @class TAO_Parser_Registry
34 * @brief Maintain the collection of known IOR format parsers
36 * The ORB dynamically loads a collection of IOR parsers (check
37 * the IOR_Parser class). The collection is kept in this class
38 * for easy lookup and use.
40 class TAO_Export TAO_Parser_Registry
43 /// Default constructor.
44 TAO_Parser_Registry ();
47 ~TAO_Parser_Registry ();
49 /// Initialize the parser registry with the list of known protocols.
50 /// Invoked by the ORB during startup.
51 int open (TAO_ORB_Core
*orb_core
);
53 /// Find the parser that can parse @a ior_string
54 /// The lookup is based on the prefix in the string
55 TAO_IOR_Parser
*match_parser (const char *ior_string
);
58 typedef TAO_IOR_Parser
** Parser_Iterator
;
59 Parser_Iterator
begin () const;
60 Parser_Iterator
end () const;
63 // The parser registry should not be copied.
64 TAO_Parser_Registry (const TAO_Parser_Registry
&);
65 void operator= (const TAO_Parser_Registry
&);
69 TAO_IOR_Parser
**parsers_
;
75 TAO_END_VERSIONED_NAMESPACE_DECL
77 #if defined(__ACE_INLINE__)
78 #include "tao/Parser_Registry.inl"
79 #endif /* __ACE_INLINE__ */
81 #include /**/ "ace/post.h"
83 #endif /* TAO_PARSER_REGISTRY_H */