~stewart/drizzle/show-table-message-function

« back to all changes in this revision

Viewing changes to plugin/table_cache_dictionary/table_definition_cache.h

  • Committer: Stewart Smith
  • Date: 2010-03-18 10:17:08 UTC
  • mfrom: (1337.1.14 staging)
  • Revision ID: stewart@flamingspork.com-20100318101708-y04x45iuvm1hnbul
merge trunk

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
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef PLUGIN_TABLE_CACHE_DICTIONARY_TABLE_DEFINITION_CACHE_H
 
21
#define PLUGIN_TABLE_CACHE_DICTIONARY_TABLE_DEFINITION_CACHE_H
 
22
 
 
23
#include "drizzled/table_share.h"
 
24
 
 
25
namespace table_cache_dictionary {
 
26
 
 
27
class TableDefinitionCache : public  drizzled::plugin::TableFunction
 
28
{
 
29
public:
 
30
  TableDefinitionCache();
 
31
 
 
32
  class Generator : public drizzled::plugin::TableFunction::Generator 
 
33
  {
 
34
    bool is_primed;
 
35
    drizzled::TableShare *share;
 
36
    drizzled::TableDefinitionCache::iterator table_share_iterator;
 
37
 
 
38
    void fill();
 
39
 
 
40
    bool nextCore();
 
41
    bool next();
 
42
 
 
43
  public:
 
44
    bool populate();
 
45
 
 
46
    Generator(drizzled::Field **arg);
 
47
    ~Generator();
 
48
  };
 
49
 
 
50
  Generator *generator(drizzled::Field **arg)
 
51
  {
 
52
    return new Generator(arg);
 
53
  }
 
54
};
 
55
 
 
56
} /* namespace table_cache_dictionary */
 
57
 
 
58
#endif /* PLUGIN_TABLE_CACHE_DICTIONARY_TABLE_DEFINITION_CACHE_H */