~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/table.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_GENERATOR_TABLE_H
22
22
#define DRIZZLED_GENERATOR_TABLE_H
23
23
 
24
 
#include "drizzled/session.h"
25
24
#include "drizzled/plugin/storage_engine.h"
26
25
 
27
26
namespace drizzled {
 
27
 
 
28
class Session;
 
29
 
28
30
namespace generator {
29
31
 
30
32
class Table
31
33
{
32
34
  Session &session;
33
 
  message::TablePtr table;
 
35
  message::table::shared_ptr table;
34
36
 
35
 
  TableIdentifiers table_names;
36
 
  TableIdentifiers::const_iterator table_iterator;
 
37
  identifier::Table::vector table_names;
 
38
  identifier::Table::vector::const_iterator table_iterator;
37
39
 
38
40
public:
39
41
 
40
 
  Table(Session &arg, const SchemaIdentifier &schema_identifier);
 
42
  Table(Session &arg, const identifier::Schema &schema_identifier);
41
43
 
42
 
  operator const drizzled::message::TablePtr()
 
44
  operator const drizzled::message::table::shared_ptr()
43
45
  {
44
46
    while (table_iterator != table_names.end())
45
47
    {
51
53
        return table;
52
54
    }
53
55
 
54
 
    return message::TablePtr();
 
56
    return message::table::shared_ptr();
55
57
  }
56
58
 
57
 
  operator const drizzled::TableIdentifier*()
 
59
  operator const drizzled::identifier::Table*()
58
60
  {
59
61
    while (table_iterator != table_names.end())
60
62
    {
61
 
      const drizzled::TableIdentifier *_ptr= &(*table_iterator);
 
63
      const drizzled::identifier::Table *_ptr= &(*table_iterator);
62
64
      table_iterator++;
63
65
 
64
66
      return _ptr;