Drizzled Public API Documentation

unused.h
00001 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2010 Brian Aker
00005  *  Copyright (C) 2010 Sun Microsystems, Inc.
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #pragma once
00023 
00024 namespace drizzled {
00025 namespace table {
00026 
00027 class UnusedTables {
00028   Concurrent *tables;       /* Used by mysql_test */
00029 
00030   Concurrent *getTable() const
00031   {
00032     return tables;
00033   }
00034 
00035   Concurrent *setTable(Table *arg)
00036   {
00037     return tables= static_cast<Concurrent *>(arg);
00038   }
00039 
00040 public:
00041 
00042   void cull();
00043 
00044   void cullByVersion();
00045   
00046   void link(Concurrent *table);
00047 
00048   void unlink(Concurrent *table);
00049 
00050 /* move table first in unused links */
00051 
00052   void relink(Concurrent *table);
00053 
00054   void clear();
00055 
00056   UnusedTables():
00057     tables(NULL)
00058   { }
00059 
00060   ~UnusedTables()
00061   { 
00062   }
00063 };
00064 
00065 UnusedTables &getUnused(void);
00066 
00067 
00068 } /* namepsace table */
00069 } /* namepsace drizzled */
00070