~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cached_item.h

  • Committer: Brian Aker
  • Date: 2010-01-27 18:58:12 UTC
  • Revision ID: brian@gaz-20100127185812-n62n0vwetnx8jrjy
Remove dead code.

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) 2008 Sun Microsystems
 
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 DRIZZLED_CACHED_ITEM_H
 
21
#define DRIZZLED_CACHED_ITEM_H
 
22
 
 
23
#include "drizzled/memory/sql_alloc.h"
 
24
#include "drizzled/sql_string.h"
 
25
#include "drizzled/my_decimal.h"
 
26
 
 
27
class Item;
 
28
class Session;
 
29
class Field;
 
30
 
 
31
class Cached_item :public drizzled::memory::SqlAlloc
 
32
{
 
33
public:
 
34
  bool null_value;
 
35
  Cached_item() :null_value(0) {}
 
36
  virtual bool cmp(void)=0;
 
37
  virtual ~Cached_item(); /*line -e1509 */
 
38
};
 
39
 
 
40
class Cached_item_str :public Cached_item
 
41
{
 
42
  Item *item;
 
43
  String value,tmp_value;
 
44
public:
 
45
  Cached_item_str(Session *session, Item *arg);
 
46
  bool cmp(void);
 
47
  ~Cached_item_str();                           // Deallocate String:s
 
48
};
 
49
 
 
50
 
 
51
class Cached_item_real :public Cached_item
 
52
{
 
53
  Item *item;
 
54
  double value;
 
55
public:
 
56
  Cached_item_real(Item *item_par) :item(item_par),value(0.0) {}
 
57
  bool cmp(void);
 
58
};
 
59
 
 
60
class Cached_item_int :public Cached_item
 
61
{
 
62
  Item *item;
 
63
  int64_t value;
 
64
public:
 
65
  Cached_item_int(Item *item_par) :item(item_par),value(0) {}
 
66
  bool cmp(void);
 
67
};
 
68
 
 
69
 
 
70
class Cached_item_decimal :public Cached_item
 
71
{
 
72
  Item *item;
 
73
  my_decimal value;
 
74
public:
 
75
  Cached_item_decimal(Item *item_par);
 
76
  bool cmp(void);
 
77
};
 
78
 
 
79
class Cached_item_field :public Cached_item
 
80
{
 
81
  unsigned char *buff;
 
82
  Field *field;
 
83
  uint32_t length;
 
84
 
 
85
public:
 
86
  Cached_item_field(Field *arg_field);
 
87
  bool cmp(void);
 
88
};
 
89
 
 
90
Cached_item *new_Cached_item(Session *session, Item *item);
 
91
 
 
92
#endif /* DRIZZLED_CACHED_ITEM_H */