Merge branch 'master' into jwi-bcc64xsingletonwarning
[ACE_TAO.git] / ACE / examples / DLL / Newsweek.h
blobaafce40e002e5580ae8e77514ca561adca1824c8
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Newsweek.h
7 * This is a derived class from Magazine which is a magazine
8 * pertaining to news and information.
10 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
12 //=============================================================================
15 #ifndef NEWSWEEK_H
16 #define NEWSWEEK_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 Newsweek
29 * @brief This is an derived class of Magazine.
31 * Polymoriphism is exploited and an object pointer
32 * of Magazine is bound to the Newsweek object at runtime.
34 class Newsweek : public Magazine
36 public:
37 // This is the abstract class method which describes the magazine.
38 void title () override;
40 // Overload the new/delete opertors so the object will be
41 // created/deleted using the memory allocator associated with the
42 // DLL/SO.
43 void *operator new (size_t bytes);
44 // Overloaded new operator, nothrow_t variant.
45 void *operator new (size_t bytes, const std::nothrow_t&);
46 void operator delete (void *p, const std::nothrow_t&) noexcept;
47 void operator delete (void *ptr);
50 # endif /* NEWSWEEK_H */