~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/instance/base.h

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  instance of table share per one table in the database.
24
24
*/
25
25
 
26
 
#ifndef DRIZZLED_TABLE_INSTANCE_BASE_H
27
 
#define DRIZZLED_TABLE_INSTANCE_BASE_H
 
26
#pragma once
28
27
 
29
28
#include <string>
30
29
 
34
33
#include <boost/shared_ptr.hpp>
35
34
#include <boost/scoped_ptr.hpp>
36
35
 
37
 
#include "drizzled/typelib.h"
38
 
#include "drizzled/memory/root.h"
39
 
#include "drizzled/message.h"
40
 
#include "drizzled/util/string.h"
41
 
 
42
 
#include "drizzled/lex_string.h"
43
 
#include "drizzled/key_map.h"
44
 
 
45
 
#include "drizzled/table/cache.h"
46
 
 
 
36
#include <drizzled/memory/root.h>
 
37
#include <drizzled/message.h>
 
38
#include <drizzled/util/string.h>
 
39
#include <drizzled/lex_string.h>
 
40
#include <drizzled/key_map.h>
47
41
#include <drizzled/field.h>
48
42
 
49
 
 
50
 
namespace drizzled
51
 
{
 
43
namespace drizzled {
52
44
 
53
45
const static std::string NO_PROTOBUFFER_AVAILABLE("NO PROTOBUFFER AVAILABLE");
54
46
 
55
 
namespace plugin
56
 
{
57
 
class EventObserverList;
58
 
class StorageEngine;
59
 
}
60
 
 
61
 
namespace table {
62
 
class Singular;
63
 
}
64
 
 
65
 
class Field_blob;
66
 
 
67
47
class TableShare
68
48
{
69
49
  typedef std::vector<std::string> StringVector;
184
164
    if (iter == name_hash.end())
185
165
        return 0;
186
166
 
187
 
    return (*iter).second;
 
167
    return iter->second;
188
168
  }
189
169
 
190
170
private:
434
414
  void setTableMessage(const message::Table &arg)
435
415
  {
436
416
    assert(not getTableMessage());
437
 
    _table_message.reset(new(std::nothrow) message::Table(arg));
 
417
    _table_message.reset(new message::Table(arg));
438
418
  }
439
419
 
440
420
  const message::Table::Field &field(int32_t field_position) const
445
425
 
446
426
  inline bool hasComment() const
447
427
  {
448
 
    return (getTableMessage()) ?  getTableMessage()->options().has_comment() : false; 
 
428
    return getTableMessage() ?  getTableMessage()->options().has_comment() : false; 
449
429
  }
450
430
 
451
431
  inline const char *getComment()
720
700
                              Table &outparam,
721
701
                              bool &error_reported);
722
702
public:
723
 
  bool parse_table_proto(Session& session, message::Table &table);
 
703
  bool parse_table_proto(Session& session, const message::Table &table);
 
704
 
 
705
  virtual bool is_replicated() const
 
706
  {
 
707
    return false;
 
708
  }
724
709
};
725
710
 
726
711
} /* namespace drizzled */
727
712
 
728
 
#endif /* DRIZZLED_TABLE_INSTANCE_BASE_H */