~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/numhybrid.h

  • Committer: Lee
  • Date: 2008-10-30 22:02:01 UTC
  • mto: (572.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: lbieber@lbieber-desktop-20081030220201-elb6qprbzpn7c5a4
add my name to the AUTHORS file

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, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
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_FUNCTION_NUMHYBRID_H
21
 
#define DRIZZLED_FUNCTION_NUMHYBRID_H
22
 
 
23
 
#include <drizzled/function/func.h>
24
 
 
25
 
namespace drizzled
26
 
{
 
20
#ifndef DRIZZLED_FUNCTIONS_NUMHYBRID_H
 
21
#define DRIZZLED_FUNCTIONS_NUMHYBRID_H
 
22
 
 
23
#include <drizzled/item.h>
 
24
#include <drizzled/functions/func.h>
27
25
 
28
26
class Item_func_numhybrid: public Item_func
29
27
{
30
28
protected:
31
29
  Item_result hybrid_type;
32
30
public:
33
 
  Item_func_numhybrid(): Item_func(), hybrid_type(REAL_RESULT)
34
 
  {}
35
31
  Item_func_numhybrid(Item *a) :Item_func(a), hybrid_type(REAL_RESULT)
36
32
  {}
37
33
  Item_func_numhybrid(Item *a,Item *b)
48
44
 
49
45
  double val_real();
50
46
  int64_t val_int();
51
 
  type::Decimal *val_decimal(type::Decimal *);
 
47
  my_decimal *val_decimal(my_decimal *);
52
48
  String *val_str(String*str);
53
49
 
54
50
  /**
72
68
     result type is DECIMAL.
73
69
 
74
70
     @param A pointer where the DECIMAL value will be allocated.
75
 
     @return
 
71
     @return 
76
72
       - 0 If the result is NULL
77
73
       - The same pointer it was given, with the area initialized to the
78
74
         result of the operation.
79
75
  */
80
 
  virtual type::Decimal *decimal_op(type::Decimal *)= 0;
 
76
  virtual my_decimal *decimal_op(my_decimal *)= 0;
81
77
 
82
78
  /**
83
79
     @brief Performs the operation that this functions implements when the
89
85
  bool is_null() { update_null_value(); return null_value; }
90
86
};
91
87
 
92
 
} /* namespace drizzled */
93
 
 
94
 
#endif /* DRIZZLED_FUNCTION_NUMHYBRID_H */
 
88
#endif /* DRIZZLED_FUNCTIONS_NUMHYBRID_H */