MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LogHandlerList.hpp
1 /*
2  Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef LOGHANDLERLIST_H
19 #define LOGHANDLERLIST_H
20 
21 class LogHandler;
22 #include <ndb_global.h>
23 
31 {
32 public:
37 
42 
48  bool add(LogHandler* pNewHandler);
49 
55  bool remove(LogHandler* pRemoveHandler);
56 
60  void removeAll();
61 
66  LogHandler* next();
67 
71  int size() const;
72 private:
74  struct LogHandlerNode
75  {
76  LogHandlerNode* pPrev;
77  LogHandlerNode* pNext;
78  LogHandler* pHandler;
79  };
80 
81  LogHandlerNode* next(LogHandlerNode* pNode);
82  LogHandlerNode* prev(LogHandlerNode* pNode);
83 
84  void removeNode(LogHandlerNode* pNode);
85 
86  int m_size;
87 
88  LogHandlerNode* m_pHeadNode;
89  LogHandlerNode* m_pTailNode;
90  LogHandlerNode* m_pCurrNode;
91 };
92 
93 #endif
94 
95