~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/units.h

  • Committer: Mark Atwood
  • Date: 2011-06-27 19:01:37 UTC
  • mfrom: (2318.6.90 refactor16)
  • Revision ID: me@mark.atwood.name-20110627190137-iflt3vku0kw77l8a
mergeĀ lp:~olafvdspek/drizzle/refactor17

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <drizzled/function/func.h>
23
23
#include <drizzled/function/math/real.h>
24
24
 
25
 
namespace drizzled
26
 
{
 
25
namespace drizzled {
27
26
 
28
 
class Item_func_units :public Item_real_func
 
27
class Item_func_units : public Item_real_func
29
28
{
30
 
  char *name;
31
 
  double mul,add;
32
29
public:
33
 
  Item_func_units(char *name_arg,Item *a,double mul_arg,double add_arg)
34
 
    :Item_real_func(a),name(name_arg),mul(mul_arg),add(add_arg) {}
 
30
  Item_func_units(const char *name_arg, Item *a, double mul_arg, double add_arg)
 
31
    : Item_real_func(a),name(name_arg),mul(mul_arg),add(add_arg) {}
35
32
  double val_real();
36
33
  const char *func_name() const { return name; }
37
34
  void fix_length_and_dec()
38
35
  { decimals= NOT_FIXED_DEC; max_length= float_length(decimals); }
 
36
private:
 
37
  const char *name;
 
38
  double mul;
 
39
  double add;
39
40
};
40
41
 
41
42
} /* namespace drizzled */