~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key_part_spec.h

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
merge lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#ifndef DRIZZLED_KEY_PART_SPEC_H
22
 
#define DRIZZLED_KEY_PART_SPEC_H
23
 
 
24
 
#include "drizzled/memory/sql_alloc.h"
25
 
#include "drizzled/lex_string.h"
26
 
 
27
 
namespace drizzled
28
 
{
29
 
 
30
 
namespace memory { class Root; }
31
 
 
32
 
class Item;
 
21
#pragma once
 
22
 
 
23
#include <drizzled/memory/sql_alloc.h>
 
24
#include <drizzled/lex_string.h>
 
25
 
 
26
namespace drizzled {
33
27
 
34
28
class Key_part_spec :public memory::SqlAlloc {
35
29
public:
36
 
  LEX_STRING field_name;
 
30
  lex_string_t field_name;
37
31
  uint32_t length;
38
 
  Key_part_spec(const LEX_STRING &name, uint32_t len)
 
32
  Key_part_spec(const lex_string_t &name, uint32_t len)
39
33
    : field_name(name), length(len)
40
34
  {}
41
35
  Key_part_spec(const char *name, const size_t name_len, uint32_t len)
53
47
  */
54
48
  Key_part_spec *clone(memory::Root *mem_root) const
55
49
  {
56
 
    return new (mem_root) Key_part_spec(*this);
 
50
    return new (*mem_root) Key_part_spec(*this);
57
51
  }
58
52
};
59
53
 
60
54
} /* namespace drizzled */
61
55
 
62
 
#endif /* DRIZZLED_KEY_PART_SPEC_H */