#include <Parser_Registry.h>
Collaboration diagram for TAO_Parser_Registry:

Public Types | |
| typedef TAO_IOR_Parser ** | Parser_Iterator |
Public Member Functions | |
| TAO_Parser_Registry (void) | |
| Default constructor. | |
| ~TAO_Parser_Registry (void) | |
| Dstructor. | |
| int | open (TAO_ORB_Core *orb_core) |
| TAO_IOR_Parser * | match_parser (const char *ior_string) |
| Parser_Iterator | begin (void) const |
| Parser_Iterator | end (void) const |
Private Member Functions | |
| TAO_Parser_Registry (const TAO_Parser_Registry &) | |
| void | operator= (const TAO_Parser_Registry &) |
Private Attributes | |
| TAO_IOR_Parser ** | parsers_ |
| List of parsers. | |
| size_t | size_ |
| Number of parsers. | |
The ORB dynamically loads a collection of IOR parsers (check the IOR_Parser class). The collection is kept in this class for easy lookup and use.
Definition at line 46 of file Parser_Registry.h.
|
|
Definition at line 65 of file Parser_Registry.h. Referenced by match_parser(). |
|
|
Default constructor.
Definition at line 19 of file Parser_Registry.cpp.
|
|
|
Dstructor.
Definition at line 25 of file Parser_Registry.cpp. References parsers_.
00026 {
00027 delete [] this->parsers_;
00028 }
|
|
|
|
|
|
Definition at line 8 of file Parser_Registry.inl. References parsers_. Referenced by match_parser().
00009 {
00010 return this->parsers_;
00011 }
|
|
|
Definition at line 14 of file Parser_Registry.inl. References parsers_. Referenced by match_parser().
|
|
|
Find the parser that can parse ior_string The lookup is based on the prefix in the string Definition at line 64 of file Parser_Registry.cpp. References begin(), end(), and Parser_Iterator. Referenced by CORBA::ORB::string_to_object().
00065 {
00066 for (Parser_Iterator i = this->begin (); i != this->end (); ++i)
00067 {
00068 if ((*i)->match_prefix (ior_string))
00069 {
00070 return *i;
00071 }
00072 }
00073
00074 return 0;
00075 }
|
|
|
Initialize the parser registry with the list of known protocols. Invoked by the ORB during startup. Definition at line 31 of file Parser_Registry.cpp. References ACE_NEW_RETURN, TAO_ORB_Core::configuration(), TAO_Resource_Factory::get_parser_names(), ACE_Dynamic_Service< TYPE >::instance(), parsers_, and TAO_ORB_Core::resource_factory(). Referenced by TAO_ORB_Core::init().
00032 {
00033 char **names;
00034 int number_of_names = 0;
00035
00036 orb_core->resource_factory ()->get_parser_names (names, number_of_names);
00037
00038 if (number_of_names == 0)
00039 {
00040 return -1;
00041 }
00042
00043 this->size_ = number_of_names;
00044 ACE_NEW_RETURN (this->parsers_,
00045 TAO_IOR_Parser*[this->size_],
00046 -1);
00047
00048 for (size_t i = 0; i != this->size_; ++i)
00049 {
00050 this->parsers_[i] =
00051 ACE_Dynamic_Service<TAO_IOR_Parser>::instance (orb_core->configuration (),
00052 names [i]);
00053
00054 if (this->parsers_[i] == 0)
00055 {
00056 return -1;
00057 }
00058 }
00059
00060 return 0;
00061 }
|
|
|
|
|
|
List of parsers.
Definition at line 78 of file Parser_Registry.h. Referenced by begin(), end(), open(), and ~TAO_Parser_Registry(). |
|
|
Number of parsers.
Definition at line 81 of file Parser_Registry.h. |
1.3.6