From 7cbd8169257ca780bf12d35fe33de08b77f40fec Mon Sep 17 00:00:00 2001 From: fhunleth Date: Tue, 15 May 2001 15:16:02 +0000 Subject: Tue Apr 15 10:10:10 2001 Frank Hunleth --- TAO/examples/PluggableUDP/DIOP/DIOP.cpp | 13 ++++++++ TAO/examples/PluggableUDP/DIOP/DIOP.h | 39 ++++++++++++++++++++++ TAO/examples/PluggableUDP/DIOP/Makefile | 1 + TAO/examples/PluggableUDP/DIOP/TAO_DIOP.dsp | 8 +++++ TAO/examples/PluggableUDP/DIOP/TAO_DIOP_Static.dsp | 8 +++++ 5 files changed, 69 insertions(+) create mode 100644 TAO/examples/PluggableUDP/DIOP/DIOP.cpp create mode 100644 TAO/examples/PluggableUDP/DIOP/DIOP.h (limited to 'TAO/examples/PluggableUDP/DIOP') diff --git a/TAO/examples/PluggableUDP/DIOP/DIOP.cpp b/TAO/examples/PluggableUDP/DIOP/DIOP.cpp new file mode 100644 index 00000000000..2cc260e65cb --- /dev/null +++ b/TAO/examples/PluggableUDP/DIOP/DIOP.cpp @@ -0,0 +1,13 @@ +// $Id$ + +#include "DIOP.h" +#include "DIOP_Factory.h" + +ACE_RCSID(TAO_DIOP, DIOP_Factory, "$Id$") + +TAO_DIOP_Protocol_Factory_Adder::TAO_DIOP_Protocol_Factory_Adder (void) +{ + ACE_Service_Config::static_svcs ()-> + insert (&ace_svc_desc_TAO_DIOP_Protocol_Factory); +} + diff --git a/TAO/examples/PluggableUDP/DIOP/DIOP.h b/TAO/examples/PluggableUDP/DIOP/DIOP.h new file mode 100644 index 00000000000..fff1804127a --- /dev/null +++ b/TAO/examples/PluggableUDP/DIOP/DIOP.h @@ -0,0 +1,39 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file DIOP.h + * + * $Id$ + * + * This file is used to force DIOP to be linked in and initialized in + * static builds. The application has to include this file in at least + * one source file so that a static class instance can be initialized + * and force the rest of DIOP into the executable. + * + * @author Frank Hunleth + */ +//============================================================================= + + +#ifndef TAO_DIOP_H +#define TAO_DIOP_H +#include "ace/pre.h" +#include "diop_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class TAO_DIOP_Export TAO_DIOP_Protocol_Factory_Adder +{ +public: + TAO_DIOP_Protocol_Factory_Adder (void); +}; + +// Static instances that will force everything in DIOP to be pulled in. +static TAO_DIOP_Protocol_Factory_Adder TAO_DIOP_adder; + +#include "ace/post.h" +#endif /* TAO_DIOP_FACTORY_H */ + diff --git a/TAO/examples/PluggableUDP/DIOP/Makefile b/TAO/examples/PluggableUDP/DIOP/Makefile index 4a0f9955d31..9161912047b 100644 --- a/TAO/examples/PluggableUDP/DIOP/Makefile +++ b/TAO/examples/PluggableUDP/DIOP/Makefile @@ -30,6 +30,7 @@ CPP_SRCS += \ DIOP_Acceptor \ DIOP_Connection_Handler \ DIOP_Endpoint \ + DIOP IDL_SRC = \ $(addsuffix S.cpp, $(IDL_FILES)) \ diff --git a/TAO/examples/PluggableUDP/DIOP/TAO_DIOP.dsp b/TAO/examples/PluggableUDP/DIOP/TAO_DIOP.dsp index d141c19ff21..5bf8c6c2d21 100644 --- a/TAO/examples/PluggableUDP/DIOP/TAO_DIOP.dsp +++ b/TAO/examples/PluggableUDP/DIOP/TAO_DIOP.dsp @@ -94,6 +94,10 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=.\DIOP.cpp +# End Source File +# Begin Source File + SOURCE=.\DIOP_Acceptor.cpp # End Source File # Begin Source File @@ -126,6 +130,10 @@ SOURCE=.\DIOP_Transport.cpp # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File +SOURCE=.\DIOP.h +# End Source File +# Begin Source File + SOURCE=.\DIOP_Acceptor.h # End Source File # Begin Source File diff --git a/TAO/examples/PluggableUDP/DIOP/TAO_DIOP_Static.dsp b/TAO/examples/PluggableUDP/DIOP/TAO_DIOP_Static.dsp index 1c04061945d..1ae24bf4812 100644 --- a/TAO/examples/PluggableUDP/DIOP/TAO_DIOP_Static.dsp +++ b/TAO/examples/PluggableUDP/DIOP/TAO_DIOP_Static.dsp @@ -91,6 +91,10 @@ LIB32=link.exe -lib # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=.\DIOP.cpp +# End Source File +# Begin Source File + SOURCE=.\DIOP_Acceptor.cpp # End Source File # Begin Source File @@ -123,6 +127,10 @@ SOURCE=.\DIOP_Transport.cpp # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File +SOURCE=.\DIOP.h +# End Source File +# Begin Source File + SOURCE=.\DIOP_Acceptor.h # End Source File # Begin Source File -- cgit v1.2.1