~drizzle-trunk/drizzle/development

1877.2.2 by Brian Aker
Move unused out to its own class.
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1877.2.6 by Brian Aker
Fixed header/etc.
4
 *  Copyright (C) 2010 Brian Aker
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
5
 *  Copyright (C) 2010 Sun Microsystems, Inc.
1877.2.2 by Brian Aker
Move unused out to its own class.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  (at your option) any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program; if not, write to the Free Software
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
 */
21
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
22
#pragma once
1877.2.2 by Brian Aker
Move unused out to its own class.
23
24
namespace drizzled {
1877.2.3 by Brian Aker
Move unused under table
25
namespace table {
1877.2.2 by Brian Aker
Move unused out to its own class.
26
27
class UnusedTables {
1877.2.3 by Brian Aker
Move unused under table
28
  Concurrent *tables;				/* Used by mysql_test */
1877.2.2 by Brian Aker
Move unused out to its own class.
29
1877.2.3 by Brian Aker
Move unused under table
30
  Concurrent *getTable() const
1877.2.2 by Brian Aker
Move unused out to its own class.
31
  {
32
    return tables;
33
  }
34
1877.2.3 by Brian Aker
Move unused under table
35
  Concurrent *setTable(Table *arg)
1877.2.2 by Brian Aker
Move unused out to its own class.
36
  {
1887.2.3 by Brian Aker
Remove dynamic cast
37
    return tables= static_cast<Concurrent *>(arg);
1877.2.2 by Brian Aker
Move unused out to its own class.
38
  }
39
40
public:
41
42
  void cull();
43
44
  void cullByVersion();
45
  
1877.2.3 by Brian Aker
Move unused under table
46
  void link(Concurrent *table);
1877.2.2 by Brian Aker
Move unused out to its own class.
47
1877.2.3 by Brian Aker
Move unused under table
48
  void unlink(Concurrent *table);
1877.2.2 by Brian Aker
Move unused out to its own class.
49
50
/* move table first in unused links */
51
1877.2.3 by Brian Aker
Move unused under table
52
  void relink(Concurrent *table);
1877.2.2 by Brian Aker
Move unused out to its own class.
53
54
  void clear();
55
56
  UnusedTables():
57
    tables(NULL)
58
  { }
59
60
  ~UnusedTables()
61
  { 
62
  }
63
};
64
65
UnusedTables &getUnused(void);
66
67
1877.2.3 by Brian Aker
Move unused under table
68
} /* namepsace table */
1877.2.2 by Brian Aker
Move unused out to its own class.
69
} /* namepsace drizzled */
70