Merge branch 'master' into jwi-bcc64xsingletonwarning
[ACE_TAO.git] / ACE / examples / DLL / Today.cpp
blob6ce81930b13470548ca22bfc4a23d3608bcc6bbe
1 #define ACE_BUILD_SVC_DLL
3 #include "Today.h"
4 #include "ace/Log_Msg.h"
5 #include "ace/svc_export.h"
6 #include "ace/OS_Memory.h"
8 // Implementation of the abstract class method which describes the
9 // magazine.
10 void
11 Today::title ()
13 ACE_DEBUG ((LM_DEBUG,
14 "Today: XML Special Apr 02\n"));
17 void *
18 Today::operator new (size_t bytes)
20 return ::new char[bytes];
22 void *
23 Today::operator new (size_t bytes, const std::nothrow_t&)
25 return ::new (std::nothrow) char[bytes];
27 void
28 Today::operator delete (void *p, const std::nothrow_t&) noexcept
30 delete [] static_cast <char *> (p);
32 void
33 Today::operator delete (void *ptr)
35 delete [] static_cast <char *> (ptr);
38 // Returns the pointer to the Today class.
39 // The ACE_BUILD_SVC_DLL and ACE_Svc_Export directives are necessary to
40 // take care of exporting the function for Win32 platforms.
41 extern "C" ACE_Svc_Export Magazine *create_magazine ();
43 Magazine *create_magazine ()
45 Magazine *mag = 0;
46 ACE_NEW_RETURN (mag, Today, 0);
47 return mag;