00001 // -*- C++ -*- 00002 00003 // ================================================================ 00004 /** 00005 * @file Object_Loader.h 00006 * 00007 * Object_Loader.h,v 1.16 2005/11/02 07:13:04 ossama Exp 00008 * 00009 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00010 */ 00011 // ================================================================ 00012 00013 #ifndef TAO_OBJECT_LOADER_H 00014 #define TAO_OBJECT_LOADER_H 00015 00016 #include /**/ "ace/pre.h" 00017 #include "ace/Service_Object.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "tao/SystemException.h" 00024 00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00026 00027 namespace CORBA 00028 { 00029 class Object; 00030 typedef Object *Object_ptr; 00031 00032 class ORB; 00033 typedef ORB *ORB_ptr; 00034 } 00035 00036 /** 00037 * @class TAO_Object_Loader 00038 * 00039 * @brief A class to dynamically load object implementations into an 00040 * ORB. 00041 * 00042 * Many services and components of the ORB can be dynamically 00043 * loaded, often these components are returned to the application via 00044 * an object reference (CORBA::Object_ptr). This class is used to 00045 * dynamically load such components, and encapsulate the creation of 00046 * the object reference. 00047 * 00048 */ 00049 class TAO_Export TAO_Object_Loader : public ACE_Service_Object 00050 { 00051 public: 00052 /// The destructor 00053 virtual ~TAO_Object_Loader (void); 00054 00055 /** 00056 * Create and activate a new object into the orb. 00057 * This method cannot throw any exception, but it can return a nil 00058 * object to indicate an error condition. 00059 */ 00060 virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb, 00061 int argc, 00062 ACE_TCHAR* argv [] 00063 ACE_ENV_ARG_DECL_NOT_USED) 00064 ACE_THROW_SPEC ((CORBA::SystemException)) = 0; 00065 }; 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL 00068 00069 #include /**/ "ace/post.h" 00070 00071 #endif /* TAO_OBJECT_LOADER_H */