diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
commit | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch) | |
tree | 197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/tao/ObjRefTemplate | |
parent | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff) | |
download | ATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tao/ObjRefTemplate')
17 files changed, 1039 insertions, 0 deletions
diff --git a/TAO/tao/ObjRefTemplate/Default_ORT.pidl b/TAO/tao/ObjRefTemplate/Default_ORT.pidl new file mode 100644 index 00000000000..31b9596fe9e --- /dev/null +++ b/TAO/tao/ObjRefTemplate/Default_ORT.pidl @@ -0,0 +1,36 @@ +// -*- IDL -*- +/** + * @file Default_ORT.pidl + * + * $Id$ + * + * @brief Pre-compiled IDL source for the TAO_Default_ORT module. + * + * This file is used to generate Default_ORTC.{h,i,cpp}, using the following + * command: + * + * tao_idl.exe + * -o orig -Ge 1 -GA + * -I../.. + * -Wb,export_macro=TAO_ORT_Export \ + * -Wb,export_include="ort_export.h" \ + * -Wb,pre_include="ace/pre.h" + * -Wb,post_include="ace/post.h" + * Default_ORT.pidl + * + */ + +#ifndef TAO_DEFAULT_ORT_PIDL +#define TAO_DEFAULT_ORT_PIDL + +#include "tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl" + +module TAO_Default_ORT +{ + valuetype ObjectReferenceTemplate + : PortableInterceptor::ObjectReferenceTemplate + { + }; +}; + +#endif /* TAO_DEFAULT_ORT_PIDL */ diff --git a/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.cpp b/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.cpp new file mode 100644 index 00000000000..d670c3ab051 --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.cpp @@ -0,0 +1,58 @@ +// $Id$ + +#include "tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.h" +#include "tao/ObjRefTemplate/ORT_Adapter_Impl.h" +#include "tao/PortableServer/Root_POA.h" + +ACE_RCSID (ORT, + ORT_Adapter_Factory_Impl, + "$Id$") + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace TAO +{ + ORT_Adapter * + ORT_Adapter_Factory_Impl::create () + { + ORT_Adapter_Impl * new_ort_adapter = 0; + + ACE_NEW_RETURN (new_ort_adapter, + TAO::ORT_Adapter_Impl, + 0); + + return new_ort_adapter; + } + + void + ORT_Adapter_Factory_Impl::destroy (ORT_Adapter * adapter) + { + delete adapter; + } + + int + ORT_Adapter_Factory_Impl::Initializer (void) + { + TAO_Root_POA::ort_adapter_factory_name ("Concrete_ORT_Adapter_Factory" + ); + + return ACE_Service_Config::process_directive ( + ace_svc_desc_ORT_Adapter_Factory_Impl + ); + } +} + +TAO_END_VERSIONED_NAMESPACE_DECL + +ACE_STATIC_SVC_DEFINE ( + ORT_Adapter_Factory_Impl, + ACE_TEXT ("Concrete_ORT_Adapter_Factory"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (ORT_Adapter_Factory_Impl), + ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, + 0) + +ACE_FACTORY_NAMESPACE_DEFINE ( + TAO_ORT, + ORT_Adapter_Factory_Impl, + TAO::ORT_Adapter_Factory_Impl) diff --git a/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.h b/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.h new file mode 100644 index 00000000000..397addb069c --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.h @@ -0,0 +1,70 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ORT_Adapter_Factory_Impl.h + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +//============================================================================= + +#ifndef TAO_ORT_ADAPTER_FACTORY_IMPL_H +#define TAO_ORT_ADAPTER_FACTORY_IMPL_H + +#include /**/ "ace/pre.h" + +#include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ObjRefTemplate/ort_export.h" +#include "tao/PortableServer/ORT_Adapter_Factory.h" +#include "tao/Versioned_Namespace.h" + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace TAO +{ + /** + * @class ORT_Adapter_Factory_Impl + * + * @brief ORT_Adapter_Factory_Impl + * + * Class that creates instances of TAO::ORT_Adapter + * (one per POA). This is the derived class that contains the actual + * implementation. + */ + class TAO_ORT_Export ORT_Adapter_Factory_Impl + : public ORT_Adapter_Factory + { + public: + /// Create an adapter + virtual TAO::ORT_Adapter * create (); + + /// Destroy an adapter that is created by this factory + virtual void destroy (TAO::ORT_Adapter * adapter); + + // Used to force the initialization of the code. + static int Initializer (void); + }; +} + +static int TAO_Requires_ORTFactory_Initializer = + TAO::ORT_Adapter_Factory_Impl::Initializer (); + +TAO_END_VERSIONED_NAMESPACE_DECL + +ACE_STATIC_SVC_DECLARE (ORT_Adapter_Factory_Impl) +ACE_FACTORY_DECLARE (TAO_ORT, ORT_Adapter_Factory_Impl) + + +#define TAO_OBJREF_TEMPLATE_SAFE_INCLUDE +#include "tao/ObjRefTemplate/ObjectReferenceTemplateC.h" +#undef TAO_OBJREF_TEMPLATE_SAFE_INCLUDE +#include /**/ "ace/post.h" + +#endif /* TAO_ORT_ADAPTER_FACTORY_IMPL_H */ diff --git a/TAO/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp b/TAO/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp new file mode 100644 index 00000000000..1e697edc9cc --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp @@ -0,0 +1,117 @@ +// $Id$ + +#include "tao/ObjRefTemplate/ORT_Adapter_Impl.h" +#include "tao/PortableServer/Root_POA.h" +#include "tao/CORBA_String.h" +#include "tao/ORB_Constants.h" +#include "tao/CORBA_methods.h" + + +ACE_RCSID (ObjRefTemplate, + ORT_Adapter_Impl, + "$Id$") + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +char * +TAO::ORT_Adapter_Impl::tao_server_id (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // No need to duplicate, the ort_template_ method has to do the duplicate + return this->ort_template_->server_id (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +char * +TAO::ORT_Adapter_Impl::tao_orb_id (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // No need to duplicate, the ort_template_ method has to do the duplicate + return this->ort_template_->orb_id (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +PortableInterceptor::AdapterName * +TAO::ORT_Adapter_Impl::tao_adapter_name (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // No need to duplicate, the ort_template_ method has to do the duplicate + return this->ort_template_->adapter_name (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +CORBA::Object_ptr +TAO::ORT_Adapter_Impl::make_object (const char *repo_id, + const PortableInterceptor::ObjectId &id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return this->ort_factory_->make_object (repo_id, + id + ACE_ENV_ARG_PARAMETER); +} + +PortableInterceptor::ObjectReferenceTemplate * +TAO::ORT_Adapter_Impl::get_adapter_template (void) +{ + CORBA::add_ref (this->ort_template_.in ()); + + return this->ort_template_; +} + +PortableInterceptor::ObjectReferenceFactory * +TAO::ORT_Adapter_Impl::get_obj_ref_factory (void) +{ + CORBA::add_ref (this->ort_factory_.in ()); + + return this->ort_factory_; +} + +int +TAO::ORT_Adapter_Impl::set_obj_ref_factory ( + PortableInterceptor::ObjectReferenceFactory *cf + ACE_ENV_ARG_DECL_NOT_USED) +{ + this->ort_factory_ = cf; + + CORBA::add_ref (this->ort_factory_.in ()); + + return 0; +} + +void +TAO::ORT_Adapter_Impl::release ( + PortableInterceptor::ObjectReferenceTemplate * t) +{ + CORBA::remove_ref (t); +} + +int +TAO::ORT_Adapter_Impl::activate ( + const char *server_id, + const char *orb_id, + PortableInterceptor::AdapterName *adapter_name, + PortableServer::POA_ptr poa + ACE_ENV_ARG_DECL) +{ + // No need to lock here, there is one instance for each POA and + // when the POA creates and actives an ORT_Adapter it will lock + // itself. Create an ObjectReferenceTemplate for this POA. + + ObjectReferenceTemplate * t = 0; + ACE_NEW_THROW_EX (t, + ObjectReferenceTemplate (server_id, + orb_id, + adapter_name, + poa), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (-1); + + this->ort_template_ = t; + + // Must increase ref count since this->ort_factory_ will + // decrease it upon destruction. + CORBA::add_ref (t); + this->ort_factory_ = t; + + return 0; +} + +TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/ObjRefTemplate/ORT_Adapter_Impl.h b/TAO/tao/ObjRefTemplate/ORT_Adapter_Impl.h new file mode 100644 index 00000000000..ff30c49bbdf --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ORT_Adapter_Impl.h @@ -0,0 +1,120 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ORT_Adapter_Impl.h + * + * $Id$ + * + * This is the implementation of the TAO::ORT_Adapter + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +//============================================================================= + +#ifndef TAO_ORT_ADAPTER_IMPL_H +#define TAO_ORT_ADAPTER_IMPL_H + +#include /**/ "ace/pre.h" + +#include "tao/ObjRefTemplate/ort_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PortableServer/ORT_Adapter.h" +#include "tao/ObjRefTemplate/ObjectReferenceTemplate_i.h" + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace TAO +{ + /** + * @class ObjectReferenceTemplate_Adapter_Impl + * + * @brief Implementation of the TAO::ORT_Adapter + */ + class ORT_Adapter_Impl + : public ORT_Adapter + { + public: + /// Activate this adapter + virtual int activate (const char *server_id, + const char *orb_id, + PortableInterceptor::AdapterName *adapter_name, + PortableServer::POA_ptr poa + ACE_ENV_ARG_DECL); + + /// Accessor methods to ObjectReferenceTemplate template + virtual PortableInterceptor::ObjectReferenceTemplate *get_adapter_template (void); + + /// Accessor methods to PortableInterceptor::ObjectReferenceFactory + virtual PortableInterceptor::ObjectReferenceFactory * get_obj_ref_factory (void); + + /// Set a different ort_factory to be used. + virtual int set_obj_ref_factory ( + PortableInterceptor::ObjectReferenceFactory * current_factory + ACE_ENV_ARG_DECL); + + /** + * @see @c TAO::ORT_Adapter for details. + */ + virtual void release (PortableInterceptor::ObjectReferenceTemplate * ort); + + /** + * @name Adapter methods for PortableInterceptor::ObjectReferenceTemplate + * Methods + */ + //@{ + virtual char * tao_server_id (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual char * tao_orb_id (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual PortableInterceptor::AdapterName * tao_adapter_name ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + //@} + + /** + * @name PortableInterceptor::ObjectReferenceFactory Methods + * + * Methods required by the + * PortableInterceptor::ObjectReferenceFactory ValueType. + */ + //@{ + virtual CORBA::Object_ptr make_object ( + const char * repository_id, + const PortableInterceptor::ObjectId & id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + //@} + + private: + + /// The ORT Template, this is the factory and its identity. + PortableInterceptor::ObjectReferenceTemplate_var ort_template_; + + /// The ORT Factory. + PortableInterceptor::ObjectReferenceFactory_var ort_factory_; + + }; + +} + +TAO_END_VERSIONED_NAMESPACE_DECL + +#if defined(_MSC_VER) +# pragma warning(pop) +#endif /* _MSC_VER */ + +#include /**/ "ace/post.h" + +#endif /* TAO_ORT_ADAPTER_IMPL_H */ diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate.h new file mode 100644 index 00000000000..f1a112b9d3f --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate.h @@ -0,0 +1,26 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ObjectReferenceTemplate.h + * + * $Id$ + * + * This is the implementation of the TAO::ORT_Adapter + * + * @author Bala Natarajan <bala@dre.vanderbilt.edu> + */ +//============================================================================= + +#ifndef TAO_OBJECT_REFERENCE_TEMPLATE_H +#define TAO_OBJECT_REFERENCE_TEMPLATE_H +#include /**/ "ace/pre.h" + +#include "tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include /**/ "ace/post.h" +#endif /*TAO_OBJECT_REFERENCE_TEMPLATE_H*/ diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate.pidl b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate.pidl new file mode 100644 index 00000000000..8ec779c75cf --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate.pidl @@ -0,0 +1,56 @@ +// -*- IDL -*- + +/** + * @file ObjectReferenceTemplate.pidl + * + * $Id$ + * + * @brief Pre-compiled IDL source for the ObjectReferenceTemplate module. + * + * This file is used to generate ObjectReferenceTemplateC.{h,i,cpp}, + * using the following command: + * + * tao_idl.exe + * -o orig -Gp -Gd -Ge 1 -GA + * -I$(TAO_ROOT) + * -Wb,export_macro=TAO_ORT_Export + * -Wb,export_include=ort_export.h + * -Wb,pre_include="ace/pre.h" + * -Wb,post_include="ace/post.h" + * ObjectReferenceTemplate.pidl + * + * and then: + * + * cp orig/ObjectReferenceTemplateC.{h,i,cpp} . + * patch < diffs/ObjectReferenceTemplate.diff + * + * The code left in ObjectReferenceTemplateC.{h,i,cpp} is ready for use. + * + */ + +// File: ObjectReferenceTemplate.idl + +#ifndef _OBJECT_REFERENCE_TEMPLATE_IDL_ +#define _OBJECT_REFERENCE_TEMPLATE_IDL_ + +#include "tao/PI_Forward.pidl" + +module PortableInterceptor +{ + typeprefix PortableInterceptor "omg.org"; + + abstract valuetype ObjectReferenceFactory { + Object make_object (in string repository_id, + in ObjectId id); + }; + + abstract valuetype ObjectReferenceTemplate : ObjectReferenceFactory { + readonly attribute ServerId server_id; + readonly attribute ORBId orb_id; + readonly attribute AdapterName adapter_name; + }; + + typedef sequence<ObjectReferenceTemplate> ObjectReferenceTemplateSeq; +}; + +#endif /* _OBJECT_REFERENCE_TEMPLATE_IDL_ */ diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateA.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateA.h new file mode 100644 index 00000000000..e543e41332e --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplateA.h @@ -0,0 +1,3 @@ +// $Id$ +// This file deliberately empty. See bugzilla #2549. + diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp new file mode 100644 index 00000000000..5aade26a354 --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp @@ -0,0 +1,80 @@ +#include "tao/ObjRefTemplate/ObjectReferenceTemplate_i.h" +#include "tao/PortableServer/Root_POA.h" + +#include "tao/CORBA_String.h" +#include "tao/ORB_Constants.h" + +ACE_RCSID (ORT, + ObjectReferenceTemplate_i, + "$Id$") + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace TAO +{ + ObjectReferenceTemplate::ObjectReferenceTemplate ( + const char *server_id, + const char *orb_id, + PortableInterceptor::AdapterName *adapter_name, + PortableServer::POA_ptr poa) + : server_id_ (server_id), + orb_id_ (orb_id), + adapter_name_ (adapter_name), + poa_ (PortableServer::POA::_duplicate (poa)) + { + } + + ObjectReferenceTemplate::~ObjectReferenceTemplate (void) + { + } + + char * + ObjectReferenceTemplate::server_id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return CORBA::string_dup (this->server_id_); + } + + char * + ObjectReferenceTemplate::orb_id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return CORBA::string_dup (this->orb_id_); + } + + PortableInterceptor::AdapterName * + ObjectReferenceTemplate::adapter_name (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + PortableInterceptor::AdapterName *adapter_name = 0; + + ACE_NEW_THROW_EX (adapter_name, + PortableInterceptor::AdapterName ( + *(this->adapter_name_)), + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( + TAO::VMCID, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + return adapter_name; + } + + CORBA::Object_ptr + ObjectReferenceTemplate::make_object ( + const char *, + const PortableInterceptor::ObjectId & + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + if (CORBA::is_nil(poa_.in())) + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), CORBA::Object::_nil ()); + + TAO_Root_POA* tao_poa = dynamic_cast<TAO_Root_POA*>(poa_.in()); + + return tao_poa->invoke_key_to_object (ACE_ENV_SINGLE_ARG_PARAMETER); + } +} + +TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h new file mode 100644 index 00000000000..cb19700492a --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h @@ -0,0 +1,124 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ObjectReferenceTemplate_i.h + * + * $Id$ + * + * This is the implementation of the + * PortableInterceptor::ObjectReferenceTemplate ValueType. + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +//============================================================================= + +#ifndef TAO_OBJECT_REFERENCE_TEMPLATE_I_H +#define TAO_OBJECT_REFERENCE_TEMPLATE_I_H + +#include /**/ "ace/pre.h" + +#include "tao/ObjRefTemplate/ort_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ObjRefTemplate/Default_ORTC.h" +#include "tao/SystemException.h" + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace PortableServer +{ + class POA; + + typedef POA *POA_ptr; + typedef TAO_Objref_Var_T<POA> POA_var; +} + +namespace TAO +{ + /** + * @class ObjectReferenceTemplate + * + * @brief Implementation of the PortableInterceptor::ObjectReferenceTemplate + * interface. This is a default implementation created to be returned + * by the IORInfo when the user requests the ORT or ORF. + */ + class ObjectReferenceTemplate + : public virtual OBV_TAO_Default_ORT::ObjectReferenceTemplate, + public virtual CORBA::DefaultValueRefCountBase + { + public: + /// Constructor + ObjectReferenceTemplate (const char *server_id, + const char *orb_id, + PortableInterceptor::AdapterName *adapter_name, + PortableServer::POA_ptr poa); + + /** + * @name PortableInterceptor::ObjectReferenceTemplate Methods + * + * Methods required by the + * PortableInterceptor::ObjectReferenceTemplate ValueType. + */ + //@{ + virtual char * server_id (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual char * orb_id (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual PortableInterceptor::AdapterName * adapter_name ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + //@} + + /** + * @name PortableInterceptor::ObjectReferenceFactory Methods + * + * Methods required by the + * PortableInterceptor::ObjectReferenceFactory ValueType. + */ + //@{ + virtual CORBA::Object_ptr make_object ( + const char * repository_id, + const PortableInterceptor::ObjectId & id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + CORBA::SystemException + )); + //@} + + protected: + + /// Destructor + /** + * Protected destructor to enforce proper memory management via + * reference counting. + */ + ~ObjectReferenceTemplate (void); + + private: + const char *server_id_; + const char *orb_id_; + PortableInterceptor::AdapterName_var adapter_name_; + PortableServer::POA_var poa_; + }; +} + +TAO_END_VERSIONED_NAMESPACE_DECL + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#include /**/ "ace/post.h" + +#endif /* TAO_OBJECT_REFERENCE_TEMPLATE_I_H */ diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl new file mode 100644 index 00000000000..9e937f9251c --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_include.pidl @@ -0,0 +1,37 @@ +/** + * @file ObjectReferenceTemplate_include.pidl + * + * $Id$ + * + * @brief Include file for use in applications that need ObjectReferenceTemplate.pidl. + * + * This file just includes ObjectReferenceTemplate.pidl. The *C.h file generated from + * this is hand-crafted to itself include ObjectReferenceTemplate.h instead of + * ObjectReferenceTemplateC.h (which will produce a compiler error message if + * included directly). The ObjectReferenceTemplate_includeC.h file can then be + * included directly and automatically by the IDL compiler when + * building the application. + * + * 1. Run the tao_idl compiler on the pidl file. The command used for + * this is: + * + * tao_idl -o orig -St -Sp + * -Wb,pre_include="ace/pre.h" + * -Wb,post_include="ace/post.h" + * ObjectReferenceTemplate_include.pidl + * + * 2. Then change this line in ObjectReferenceTemplate_includeC.h: + * + * #include "ObjectReferenceTemplateC.h" + * + * to + * + * #include "ObjectReferenceTemplate.h" + */ + +#ifndef _OBJECTREFERENCETEMPLATE_INCLUDE_IDL_ +#define _OBJECTREFERENCETEMPLATE_INCLUDE_IDL_ + +#include "tao/ObjRefTemplate/ObjectReferenceTemplate.pidl" + +#endif /* _OBJECTREFERENCETEMPLATE_INCLUDE_IDL_ */ diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeA.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeA.h new file mode 100644 index 00000000000..fbf583b4fef --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeA.h @@ -0,0 +1,66 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be\be_codegen.cpp:390 + +#ifndef _TAO_IDL_ORIG_OBJECTREFERENCETEMPLATE_INCLUDEA_H_ +#define _TAO_IDL_ORIG_OBJECTREFERENCETEMPLATE_INCLUDES_H_ + +#include /**/ "ace/pre.h" + +#include "tao/ObjRefTemplate/ObjectReferenceTemplate_includeC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be\be_codegen.cpp:999 + + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#include /**/ "ace/post.h" +#endif /* ifndef */ + diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeC.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeC.h new file mode 100644 index 00000000000..bef52c5826e --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeC.h @@ -0,0 +1,98 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be\be_codegen.cpp:153 + +#ifndef _TAO_IDL_ORIG_OBJECTREFERENCETEMPLATE_INCLUDEC_H_ +#define _TAO_IDL_ORIG_OBJECTREFERENCETEMPLATE_INCLUDEC_H_ + +#include /**/ "ace/pre.h" + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ObjRefTemplate/ort_export.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" + +#include "tao/ObjRefTemplate/ObjectReferenceTemplate.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO TAO_ORT_Export + +#if defined (TAO_EXPORT_NESTED_CLASSES) +# if defined (TAO_EXPORT_NESTED_MACRO) +# undef TAO_EXPORT_NESTED_MACRO +# endif /* defined (TAO_EXPORT_NESTED_MACRO) */ +# define TAO_EXPORT_NESTED_MACRO TAO_ORT_Export +#endif /* TAO_EXPORT_NESTED_CLASSES */ + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be\be_visitor_traits.cpp:59 + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +// Traits specializations. +namespace TAO +{ +} + +// TAO_IDL - Generated from +// be\be_codegen.cpp:963 + +TAO_END_VERSIONED_NAMESPACE_DECL + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#include /**/ "ace/post.h" + +#endif /* ifndef */ + + diff --git a/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeS.h b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeS.h new file mode 100644 index 00000000000..65f2ae33b8a --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ObjectReferenceTemplate_includeS.h @@ -0,0 +1,67 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be\be_codegen.cpp:390 + +#ifndef _TAO_IDL_ORIG_OBJECTREFERENCETEMPLATE_INCLUDES_H_ +#define _TAO_IDL_ORIG_OBJECTREFERENCETEMPLATE_INCLUDES_H_ + +#include /**/ "ace/pre.h" + +#include "tao/ObjRefTemplate/ObjectReferenceTemplateS.h" +#include "tao/ObjRefTemplate/ObjectReferenceTemplate_includeC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be\be_codegen.cpp:999 + + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#include /**/ "ace/post.h" +#endif /* ifndef */ + diff --git a/TAO/tao/ObjRefTemplate/TAO_ObjRefTemplate.pc.in b/TAO/tao/ObjRefTemplate/TAO_ObjRefTemplate.pc.in new file mode 100644 index 00000000000..0d9b434e777 --- /dev/null +++ b/TAO/tao/ObjRefTemplate/TAO_ObjRefTemplate.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: TAO_ObjRefTemplate +Description: TAO ObjRefTemplate Library +Requires: TAO_PortableServer, TAO_Valuetype, TAO_AnyTypeCode, TAO +Version: @VERSION@ +Libs: -L${libdir} -lTAO_ObjRefTemplate +Cflags: -I${includedir} diff --git a/TAO/tao/ObjRefTemplate/TAO_ObjRefTemplate.rc b/TAO/tao/ObjRefTemplate/TAO_ObjRefTemplate.rc new file mode 100644 index 00000000000..7a2e46e5c0c --- /dev/null +++ b/TAO/tao/ObjRefTemplate/TAO_ObjRefTemplate.rc @@ -0,0 +1,30 @@ +#include "..\Version.h" + +1 VERSIONINFO + FILEVERSION TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION,0 + PRODUCTVERSION TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "FileDescription", "ObjRefTemplate\0" + VALUE "FileVersion", TAO_VERSION "\0" + VALUE "InternalName", "TAO_ObjRefTemplateDLL\0" + VALUE "LegalCopyright", "\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "TAO_ObjRefTemplate.DLL\0" + VALUE "ProductName", "TAO\0" + VALUE "ProductVersion", TAO_VERSION "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/TAO/tao/ObjRefTemplate/ort_export.h b/TAO/tao/ObjRefTemplate/ort_export.h new file mode 100644 index 00000000000..3da9ca420ee --- /dev/null +++ b/TAO/tao/ObjRefTemplate/ort_export.h @@ -0,0 +1,40 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl +// ------------------------------ +#ifndef TAO_ORT_EXPORT_H +#define TAO_ORT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (TAO_AS_STATIC_LIBS) +# if !defined (TAO_ORT_HAS_DLL) +# define TAO_ORT_HAS_DLL 0 +# endif /* ! TAO_ORT_HAS_DLL */ +#else +# if !defined (TAO_ORT_HAS_DLL) +# define TAO_ORT_HAS_DLL 1 +# endif /* ! TAO_ORT_HAS_DLL */ +#endif + +#if defined (TAO_ORT_HAS_DLL) && (TAO_ORT_HAS_DLL == 1) +# if defined (TAO_ORT_BUILD_DLL) +# define TAO_ORT_Export ACE_Proper_Export_Flag +# define TAO_ORT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define TAO_ORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* TAO_ORT_BUILD_DLL */ +# define TAO_ORT_Export ACE_Proper_Import_Flag +# define TAO_ORT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define TAO_ORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* TAO_ORT_BUILD_DLL */ +#else /* TAO_ORT_HAS_DLL == 1 */ +# define TAO_ORT_Export +# define TAO_ORT_SINGLETON_DECLARATION(T) +# define TAO_ORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* TAO_ORT_HAS_DLL == 1 */ + +#endif /* TAO_ORT_EXPORT_H */ + +// End of auto generated file. |