2 //=============================================================================
4 * @file DLL_Test_Impl.h
6 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
8 //=============================================================================
11 #ifndef ACE_TESTS_DLL_TEST_IMPL_H
12 #define ACE_TESTS_DLL_TEST_IMPL_H
15 #include "ace/OS_Memory.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 * @brief The Hello class in the dynamically linkable library.
26 * This class is used in this example to show how a library can
27 * be loaded on demand and its methods called on getting the
28 * symbols from the library.
30 class Hello_Impl
: public Hello
39 /// See the documentation in the base class
40 void say_next () override
;
42 /// Uses ACE::strnew() to allocate the returned string.
43 ACE_TCHAR
*new_info () override
;
45 /// Uses ACE_OS::malloc() to allocate the returned string.
46 ACE_TCHAR
*malloc_info () override
;
48 // Overload the new/delete opertors so the object will be
49 // created/deleted using the memory allocator associated with the
51 void *operator new (size_t bytes
);
53 /// Overloaded new operator, nothrow_t variant.
54 void *operator new (size_t bytes
, const std::nothrow_t
&nt
);
55 void operator delete (void *p
, const std::nothrow_t
&) noexcept
;
57 void operator delete (void *ptr
);
60 #endif /* ACE_TESTS_DLL_TEST_IMPL_H */