~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cache_decimal.h

mergeĀ lp:~hingo/drizzle/drizzle-auth_ldap-fix-and-docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_ITEM_CACHE_DECIMAL_H
21
 
#define DRIZZLED_ITEM_CACHE_DECIMAL_H
 
20
#pragma once
22
21
 
 
22
#include <drizzled/type/decimal.h>
23
23
#include <drizzled/item/cache.h>
24
24
 
25
 
namespace drizzled
26
 
{
 
25
namespace drizzled {
27
26
 
28
 
class Item_cache_decimal: public Item_cache
 
27
class Item_cache_decimal : public Item_cache
29
28
{
30
 
protected:
31
 
  my_decimal decimal_value;
32
29
public:
33
 
  Item_cache_decimal(): Item_cache() {}
34
 
 
35
 
  void store(Item *item);
 
30
  void store(Item*);
36
31
  double val_real();
37
32
  int64_t val_int();
38
 
  String* val_str(String *str);
39
 
  my_decimal *val_decimal(my_decimal *);
 
33
  String* val_str(String*);
 
34
  type::Decimal *val_decimal(type::Decimal*);
40
35
  enum Item_result result_type() const { return DECIMAL_RESULT; }
 
36
protected:
 
37
  type::Decimal decimal_value;
41
38
};
42
39
 
43
40
} /* namespace drizzled */
44
41
 
45
 
#endif /* DRIZZLED_ITEM_CACHE_DECIMAL_H */