Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Abstract_Servant_Base.h

Go to the documentation of this file.
00001 
00002 //=============================================================================
00003 /**
00004  *  @file    Abstract_Servant_Base.h
00005  *
00006  *  $Id: Abstract_Servant_Base.h,v 1.1.1.2 2003/02/21 18:36:44 chad Exp $
00007  *
00008  *  This files contains the TAO_Abstract_ServantBase, which is used
00009  *  as a way to decuple the PortableServer from the TAO Core,
00010  *  and make it possible to keep the reference to the servant in
00011  *  the CORBA::Object class.
00012  *
00013  *
00014  *  @author  Angelo Corsaro <corsaro@cs.wustl.edu>
00015  */
00016 //=============================================================================
00017 
00018 
00019 #ifndef TAO_ABSTRACT_SERVANT_BASE_H_
00020 #define TAO_ABSTRACT_SERVANT_BASE_H_
00021 
00022 // -- ACE Include --
00023 #include "ace/pre.h"
00024 #include "tao/corbafwd.h"
00025 
00026 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00027 # pragma once
00028 #endif /* ACE_LACKS_PRAGMA_ONCE */
00029 
00030 class TAO_ServerRequest;
00031 
00032 class TAO_Export TAO_Abstract_ServantBase
00033 {
00034 public:
00035   /// Destructor
00036   virtual ~TAO_Abstract_ServantBase (void);
00037 
00038   /// Local implementation of the CORBA::Object::_is_a method.
00039   virtual CORBA::Boolean _is_a (const char* logical_type_id
00040                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 0;
00041 
00042   /// Default <_non_existent>: always returns false.
00043   virtual CORBA::Boolean _non_existent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) = 0;
00044 
00045   /// Query the Interface Repository.
00046   virtual CORBA_InterfaceDef_ptr _get_interface (
00047       ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
00048     ) = 0;
00049 
00050   /// Default <_get_component>: always returns nil.
00051   virtual CORBA::Object_ptr _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) = 0;
00052 
00053   //@{
00054   /// @name Reference counting hooks: no-ops by default.
00055   virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00056   virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00057   //@}
00058 
00059   /// Get the correct vtable.
00060   virtual void *_downcast (const char *repository_id) = 0;
00061 
00062   /// This is an auxiliary method for _this() and _narrow().
00063   virtual TAO_Stub *_create_stub (ACE_ENV_SINGLE_ARG_DECL) = 0;
00064 
00065 protected:
00066   /// Default constructor, only derived classes can be created.
00067   TAO_Abstract_ServantBase (void);
00068 
00069   /// Copy constructor, protected so no instances can be created.
00070   TAO_Abstract_ServantBase (const TAO_Abstract_ServantBase &);
00071 
00072   /// assignment operator.
00073   TAO_Abstract_ServantBase &operator= (const TAO_Abstract_ServantBase &);
00074 
00075   /// Dispatches a request to the object
00076   /**
00077    * Find the operation, cast the type to the most derived type,
00078    * demarshall all the parameters from the request and finally
00079    * invokes the operation, storing the results and out parameters (if
00080    * any) or the exceptions thrown into @a request.
00081    */
00082   virtual void _dispatch (TAO_ServerRequest &request,
00083                           void *servant_upcall
00084                           ACE_ENV_ARG_DECL) = 0;
00085 
00086   virtual void synchronous_upcall_dispatch (TAO_ServerRequest &req,
00087                                             void *servant_upcall,
00088                                             void *derived_this
00089                                             ACE_ENV_ARG_DECL) = 0;
00090 
00091   /// Find an operation in the operation table.
00092   virtual int _find (const char *opname,
00093                      TAO_Skeleton &skelfunc,
00094                      const unsigned int length = 0) = 0;
00095 
00096   /// Register a CORBA IDL operation name.
00097   virtual int _bind (const char *opname,
00098                      const TAO_Skeleton skel_ptr) = 0;
00099 
00100   /// Get this interface's repository id (TAO specific).
00101   virtual const char *_interface_repository_id (void) const = 0;
00102 };
00103 
00104 #include "ace/post.h"
00105 #endif /* TAO_ABSTRACT_SERVANT_BASE_H_ */

Generated on Mon Jun 16 13:47:55 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002