~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/unused.h

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2010 Brian Aker
5
 
 *  Copyright (C) 2010 Sun Microsystems, Inc.
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
 
 
22
 
#ifndef DRIZZLED_TABLE_UNUSED_H
23
 
#define DRIZZLED_TABLE_UNUSED_H
24
 
 
25
 
namespace drizzled {
26
 
namespace table {
27
 
 
28
 
class UnusedTables {
29
 
  Concurrent *tables;                           /* Used by mysql_test */
30
 
 
31
 
  Concurrent *getTable() const
32
 
  {
33
 
    return tables;
34
 
  }
35
 
 
36
 
  Concurrent *setTable(Table *arg)
37
 
  {
38
 
    return tables= static_cast<Concurrent *>(arg);
39
 
  }
40
 
 
41
 
public:
42
 
 
43
 
  void cull();
44
 
 
45
 
  void cullByVersion();
46
 
  
47
 
  void link(Concurrent *table);
48
 
 
49
 
  void unlink(Concurrent *table);
50
 
 
51
 
/* move table first in unused links */
52
 
 
53
 
  void relink(Concurrent *table);
54
 
 
55
 
  void clear();
56
 
 
57
 
  UnusedTables():
58
 
    tables(NULL)
59
 
  { }
60
 
 
61
 
  ~UnusedTables()
62
 
  { 
63
 
  }
64
 
};
65
 
 
66
 
UnusedTables &getUnused(void);
67
 
 
68
 
 
69
 
} /* namepsace table */
70
 
} /* namepsace drizzled */
71
 
 
72
 
#endif /* DRIZZLED_TABLE_UNUSED_H */