Merge branch 'master' into jwi-bcc64xsingletonwarning
[ACE_TAO.git] / ACE / examples / DLL / Today.h
blob6201236e78a038458a4d417b07e4ce05d7fa9654
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Today.h
7 * This class denotes the Today magazine which is derived from
8 * Magazine.
10 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
12 //=============================================================================
15 #ifndef TODAY_H
16 #define TODAY_H
18 #include "ace/os_include/os_stddef.h"
19 #include "ace/OS_Memory.h"
20 #include "Magazine.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 # pragma once
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 /**
27 * @class Today
29 * @brief This is an derived class of Magazine.
31 * Polymoriphism is exploited and an object pointer of Magazine
32 * is bound to the Today object at runtime.
34 class Today : public Magazine
36 public:
37 // The virtual abstract class method which returns the title of the
38 // magazine.
39 void title () override;
41 // Overload the new/delete opertors so the object will be
42 // created/deleted using the memory allocator associated with the
43 // DLL/SO.
44 void *operator new (size_t bytes);
45 // Overloaded new operator, nothrow_t variant.
46 void *operator new (size_t bytes, const std::nothrow_t&);
47 void operator delete (void *p, const std::nothrow_t&) noexcept;
48 void operator delete (void *ptr);
51 #endif /* TODAY_H */