MCAST_Parser.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   MCAST_Parser.h
00006  *
00007  *  MCAST_Parser.h,v 1.10 2006/04/19 09:02:55 jwillemsen Exp
00008  *
00009  *  @author Priyanka Gontla (gontla_p@ociweb.com)
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_MCAST_PARSER_H
00015 #define TAO_MCAST_PARSER_H
00016 
00017 #include /**/ "ace/pre.h"
00018 #include "ace/Service_Config.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/CORBA_String.h"
00025 #include "tao/IOR_Parser.h"
00026 
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class TAO_MCAST_Parser
00031  *
00032  * @brief Implements the @c mcast: IOR format
00033  *
00034  * This class implements the @c mcast: IOR format.
00035  * It is dynamically loaded by the ORB and used to parse the
00036  * string to separate the individual <obj_addr> from the list of object
00037  * addresses <obj_addr_list>.
00038  */
00039 class TAO_Export TAO_MCAST_Parser : public TAO_IOR_Parser
00040 {
00041 public:
00042   /// Constructor
00043   TAO_MCAST_Parser (void);
00044 
00045   /// The destructor
00046   virtual ~TAO_MCAST_Parser (void);
00047 
00048   /// = The IOR_Parser methods, please read the documentation in
00049   ///   IOR_Parser.h
00050   virtual int match_prefix (const char *ior_string) const;
00051 
00052   /// Parse the ior-string that is passed.
00053   virtual CORBA::Object_ptr parse_string (const char *ior,
00054                                           CORBA::ORB_ptr orb
00055                                           ACE_ENV_ARG_DECL_NOT_USED)
00056     ACE_THROW_SPEC ((CORBA::SystemException));
00057 
00058 private:
00059 
00060   CORBA::Object_ptr multicast_to_service (const char *service_name,
00061                                           CORBA::UShort port,
00062                                           const char *mcast_address,
00063                                           const char *mcast_ttl,
00064                                           const char *mcast_nic,
00065                                           CORBA::ORB_ptr orb,
00066                                           ACE_Time_Value *timeout
00067                                           ACE_ENV_ARG_DECL_NOT_USED);
00068 
00069   int multicast_query (char *&buf,
00070                        const char *service_name,
00071                        u_short port,
00072                        const char *mcast_address,
00073                        const char *mcast_ttl,
00074                        const char *mcast_nic,
00075                        ACE_Time_Value *timeout,
00076                        CORBA::ORB_ptr orb);
00077 
00078   /* Simple method to assign values to the global members:
00079      mcast_address_, mcast_port_, mcast_nic_, mcast_ttl_ */
00080   void assign_to_variables (const char * &mcast_name_ptr);
00081 
00082   // Global private variables
00083   CORBA::String_var mcast_address_;
00084   CORBA::String_var mcast_port_;
00085   CORBA::String_var mcast_nic_;
00086   CORBA::String_var mcast_ttl_;
00087   CORBA::String_var service_name_;
00088 };
00089 
00090 TAO_END_VERSIONED_NAMESPACE_DECL
00091 
00092 #if defined (__ACE_INLINE__)
00093 # include "tao/MCAST_Parser.i"
00094 #endif /* __ACE_INLINE__ */
00095 
00096 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_MCAST_Parser)
00097 ACE_FACTORY_DECLARE (TAO, TAO_MCAST_Parser)
00098 
00099 #include /**/ "ace/post.h"
00100 #endif /* TAO_MCAST_PARSER_H */

Generated on Thu Nov 9 11:54:15 2006 for TAO by doxygen 1.3.6