~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/abs.h

  • Committer: Brian Aker
  • Date: 2009-08-18 07:20:29 UTC
  • mfrom: (1117.1.9 merge)
  • Revision ID: brian@gaz-20090818072029-s9ch5lcmltxwidn7
Merge of Brian

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 PLUGIN_MATH_FUNCTIONS_ABS_H
21
 
#define PLUGIN_MATH_FUNCTIONS_ABS_H
 
20
#ifndef DRIZZLED_FUNCTION_MATH_ABS_H
 
21
#define DRIZZLED_FUNCTION_MATH_ABS_H
22
22
 
23
23
#include <drizzled/function/func.h>
24
24
#include <drizzled/function/num1.h>
25
25
 
26
 
namespace drizzled
27
 
{
28
 
 
29
26
class Item_func_abs :public Item_func_num1
30
27
{
31
28
public:
32
 
  Item_func_abs() :Item_func_num1() {}
 
29
  Item_func_abs(Item *a) :Item_func_num1(a) {}
33
30
  double real_op();
34
31
  int64_t int_op();
35
 
  type::Decimal *decimal_op(type::Decimal *);
 
32
  my_decimal *decimal_op(my_decimal *);
36
33
  const char *func_name() const { return "abs"; }
37
34
  void fix_length_and_dec();
38
 
  bool check_argument_count(int n) { return n == 1; }
39
35
};
40
36
 
41
 
} /* namespace drizzled */
42
 
 
43
 
#endif /* PLUGIN_MATH_FUNCTIONS_ABS_H */
 
37
#endif /* DRIZZLED_FUNCTION_MATH_ABS_H */