00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file IOR_Parser.h 00006 * 00007 * $Id: IOR_Parser.h 77992 2007-04-12 10:53:16Z johnnyw $ 00008 * 00009 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00010 */ 00011 //============================================================================= 00012 00013 00014 #ifndef TAO_IOR_PARSER_H 00015 #define TAO_IOR_PARSER_H 00016 00017 #include /**/ "ace/pre.h" 00018 #include "ace/Service_Object.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "tao/orbconf.h" 00025 #include "tao/TAO_Export.h" 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 namespace CORBA 00030 { 00031 class Object; 00032 typedef Object *Object_ptr; 00033 00034 class ORB; 00035 typedef ORB *ORB_ptr; 00036 } 00037 00038 /** 00039 * @class TAO_IOR_Parser 00040 * 00041 * @brief Defines the interface for the pluggable IOR parser components 00042 * 00043 * The ORB is able to dynamically load the list of IOR formats it 00044 * understands. That allow us to integrate formats such as 00045 * corbaname:, http: or ftp: only when required. 00046 * This class provides a uniform interface for all the IOR parsers 00047 */ 00048 class TAO_Export TAO_IOR_Parser : public ACE_Service_Object 00049 { 00050 public: 00051 /// The destructor 00052 virtual ~TAO_IOR_Parser (void); 00053 00054 /// Return true if @a ior_string starts with a prefix known to this IOR 00055 /// parser 00056 virtual bool match_prefix (const char *ior_string) const = 0; 00057 00058 /** 00059 * Parse the @a ior argument and return an object reference. 00060 * The call may raise the standard system exceptions (NO_MEMORY, 00061 * INV_OBJREF, etc.) 00062 */ 00063 virtual CORBA::Object_ptr parse_string (const char *ior, CORBA::ORB_ptr orb) 00064 = 0; 00065 }; 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL 00068 00069 #include /**/ "ace/post.h" 00070 #endif /* TAO_IOR_PARSER_H */