~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to .pc/debian-changes-2010.12.06-0ubuntu4/drizzled/cached_item.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-01-04 09:31:58 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20110104093158-smhgvkfdi2y9au3i
Tags: 2011.01.07-0ubuntu1
New upstream release.

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