Object_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Object_T.h
00006  *
00007  *  $Id: Object_T.h 76995 2007-02-11 12:51:42Z johnnyw $
00008  *
00009  *   Templatized utilities common to all IDL interfaces.
00010  *
00011  *  @author  Jeff Parsons <j.parsons@vanderbilt.edu>
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_CORBA_OBJECT_T_H
00016 #define TAO_CORBA_OBJECT_T_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "ace/config-all.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include /**/ "tao/Versioned_Namespace.h"
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 namespace CORBA
00031 {
00032   class Object;
00033   typedef Object *Object_ptr;
00034 }
00035 
00036 namespace TAO
00037 {
00038   class Collocation_Proxy_Broker;
00039 
00040   typedef
00041     Collocation_Proxy_Broker * (* Proxy_Broker_Factory)(CORBA::Object_ptr);
00042 
00043   template<typename T>
00044   class Narrow_Utils
00045   {
00046   public:
00047     typedef T *T_ptr;
00048 
00049     static T_ptr narrow (CORBA::Object_ptr,
00050                          const char *repo_id,
00051                          Proxy_Broker_Factory);
00052 
00053     // Version used the operators.
00054     static T_ptr unchecked_narrow (CORBA::Object_ptr, Proxy_Broker_Factory);
00055 
00056     static T_ptr unchecked_narrow (CORBA::Object_ptr,
00057                                    const char *repo_id,
00058                                    Proxy_Broker_Factory);
00059 
00060   private:
00061     // Code for lazily evaluated IORs.
00062     static T_ptr lazy_evaluation (CORBA::Object_ptr);
00063   };
00064 }
00065 
00066 TAO_END_VERSIONED_NAMESPACE_DECL
00067 
00068 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00069 #include "tao/Object_T.cpp"
00070 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00071 
00072 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00073 #pragma implementation ("Object_T.cpp")
00074 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00075 
00076 #include /**/ "ace/post.h"
00077 
00078 #endif /* TAO_CORBA_OBJECT_T_H */

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7