1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
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.
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.
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
20
#ifndef DRIZZLED_CACHED_ITEM_H
21
#define DRIZZLED_CACHED_ITEM_H
23
#include "drizzled/memory/sql_alloc.h"
24
#include "drizzled/sql_string.h"
25
#include "drizzled/my_decimal.h"
31
class Cached_item :public drizzled::memory::SqlAlloc
35
Cached_item() :null_value(0) {}
36
virtual bool cmp(void)=0;
37
virtual ~Cached_item(); /*line -e1509 */
40
class Cached_item_str :public Cached_item
43
String value,tmp_value;
45
Cached_item_str(Session *session, Item *arg);
47
~Cached_item_str(); // Deallocate String:s
51
class Cached_item_real :public Cached_item
56
Cached_item_real(Item *item_par) :item(item_par),value(0.0) {}
60
class Cached_item_int :public Cached_item
65
Cached_item_int(Item *item_par) :item(item_par),value(0) {}
70
class Cached_item_decimal :public Cached_item
75
Cached_item_decimal(Item *item_par);
79
class Cached_item_field :public Cached_item
86
Cached_item_field(Field *arg_field);
90
Cached_item *new_Cached_item(Session *session, Item *item);
92
#endif /* DRIZZLED_CACHED_ITEM_H */