The main repository for the StreamModule project.
Révision | 17d1c5b3057ab15497b2e137ab067c15655de72d (tree) |
---|---|
l'heure | 2018-05-29 11:30:26 |
Auteur | Eric Hopper <hopper@omni...> |
Commiter | Eric Hopper |
Make some destructors pure virtual.
@@ -56,6 +56,12 @@ | ||
56 | 56 | virtual void printState(::std::ostream &os) const = 0; |
57 | 57 | }; |
58 | 58 | |
59 | +//-- | |
60 | + | |
61 | +// It's pure virtual, but it will be called directly by destructors in child | |
62 | +// classes. | |
63 | +inline Debugable::~Debugable() = default; | |
64 | + | |
59 | 65 | } // namespace lcore |
60 | 66 | } // namespace strmod |
61 | 67 |
@@ -69,7 +69,7 @@ | ||
69 | 69 | typedef iterator__ const_iterator; |
70 | 70 | |
71 | 71 | //! Not much to talk about. |
72 | - virtual ~StrChunk() = default; | |
72 | + virtual ~StrChunk() = 0; | |
73 | 73 | |
74 | 74 | //! Number of octets this chunk takes up. May be deprecated. |
75 | 75 | virtual unsigned int Length() const = 0; |
@@ -113,6 +113,10 @@ | ||
113 | 113 | |
114 | 114 | //------------------------inline functions for StrChunk------------------------ |
115 | 115 | |
116 | +// It's pure virtual, but it will be called directory by destructors in child | |
117 | +// classes. | |
118 | +inline StrChunk::~StrChunk() = default; | |
119 | + | |
116 | 120 | inline void StrChunk::call_visitStrChunk(ChunkVisitor &visitor, |
117 | 121 | const StrChunkPtr &chunk) |
118 | 122 | { |
@@ -41,8 +41,8 @@ | ||
41 | 41 | public: |
42 | 42 | //! Nothing exciting here. |
43 | 43 | Event() { } |
44 | - //! This is an interface class, of course it has a virtual destructor. | |
45 | - virtual ~Event() = default; | |
44 | + //! This is an abstract class, of course it has a virtual destructor. | |
45 | + virtual ~Event() = 0; | |
46 | 46 | |
47 | 47 | /** Perform the action associated with the event. |
48 | 48 | * If the event was triggered by a dispatcher, the dispatcher that triggered |
@@ -75,6 +75,9 @@ | ||
75 | 75 | |
76 | 76 | //-----------------------------inline functions-------------------------------- |
77 | 77 | |
78 | +// Will be called explicitly by chuld class destructors. | |
79 | +inline Event::~Event() = default; | |
80 | + | |
78 | 81 | inline void Event::operator ()(Dispatcher *dispatcher) |
79 | 82 | { |
80 | 83 | triggerEvent(dispatcher); |