POA_Current.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    POA_Current.h
00006  *
00007  *  $Id: POA_Current.h 81429 2008-04-24 18:49:54Z johnnyw $
00008  *
00009  *  @author Irfan Pyarali
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_POA_CURRENT_H
00014 #define TAO_POA_CURRENT_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/PortableServer/portableserver_export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/PortableServer/PS_CurrentC.h"
00025 #include "tao/LocalObject.h"
00026 
00027 #if defined(_MSC_VER)
00028 #pragma warning(push)
00029 #pragma warning(disable:4250)
00030 #endif /* _MSC_VER */
00031 
00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00033 
00034 namespace TAO
00035 {
00036   namespace Portable_Server
00037   {
00038     class POA_Current_Impl;
00039 
00040     class TAO_PortableServer_Export POA_Current
00041       : public PortableServer::Current
00042       , public ::CORBA::LocalObject
00043     {
00044     public:
00045 
00046       /**
00047        * Returns the POA on which the current request is being invoked.
00048        * Can raise the @c NoContext exception if this function is
00049        * not invoked in the context of an upcall.
00050        */
00051       PortableServer::POA_ptr get_POA (void);
00052 
00053       /**
00054        * Returns the object id of the current request being invoked.  Can
00055        * raise the @c NoContext exception if this function is not
00056        * invoked in the context of an upcall.
00057        */
00058       PortableServer::ObjectId *get_object_id (void);
00059 
00060       /**
00061        * This operation returns a locally manufactured reference to the object
00062        * in the context of which it is called. If called outside the context
00063        * of a POA dispatched operation, a NoContext exception is raised.
00064        * @note This reference is not guaranteed to be identical to the original
00065        * reference the client used to make the invocation, and calling the
00066        * Object::is_equivalent operation to compare the two references may not
00067        * necessarily return true.
00068        */
00069       CORBA::Object_ptr get_reference (void);
00070 
00071       /**
00072        * Returns a reference to the servant that hosts the object in whose
00073        * context it is called. If called outside the context of the POA
00074        * dispatched operation, a NoContext exception is raised
00075        */
00076       PortableServer::Servant get_servant (void);
00077 
00078       /// Returns the class that implements this interface.
00079       POA_Current_Impl *implementation (void);
00080 
00081       /// Sets the thread-specific pointer to the new POA Current state,
00082       /// returning a pointer to the existing POA Current state.
00083       POA_Current_Impl *implementation (POA_Current_Impl *new_current);
00084     };
00085   }
00086 }
00087 
00088 TAO_END_VERSIONED_NAMESPACE_DECL
00089 
00090 #if defined(_MSC_VER)
00091 #pragma warning(pop)
00092 #endif /* _MSC_VER */
00093 
00094 #include /**/ "ace/post.h"
00095 
00096 #endif /* TAO_POA_CURRENT_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7