Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Parser_Registry.h
blobbb7e02348b2ca34c39ce25e2a8598a277487c528
1 //=============================================================================
2 /**
3 * @file Parser_Registry.h
5 * @author Priyanka Gontla <pgontla@uci.edu>
6 * @author Carlos O'Ryan <coryan@uci.edu>
7 */
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)
18 # 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.
28 class TAO_ORB_Core;
29 class TAO_IOR_Parser;
31 /**
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
42 public:
43 /// Default constructor.
44 TAO_Parser_Registry ();
46 /// Dstructor.
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);
57 // = Iterator.
58 typedef TAO_IOR_Parser** Parser_Iterator;
59 Parser_Iterator begin () const;
60 Parser_Iterator end () const;
62 private:
63 // The parser registry should not be copied.
64 TAO_Parser_Registry (const TAO_Parser_Registry&);
65 void operator= (const TAO_Parser_Registry&);
67 private:
68 /// List of parsers
69 TAO_IOR_Parser **parsers_;
71 /// Number of parsers
72 size_t size_;
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 */