~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/double.h

  • Committer: Monty Taylor
  • Date: 2009-09-30 07:01:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20090930070132-b1ol1xu1rpajdddy
Small namespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLE_SERVER_FIELD_DOUBLE
22
 
#define DRIZZLE_SERVER_FIELD_DOUBLE
 
21
#ifndef DRIZZLED_FIELD_DOUBLE_H
 
22
#define DRIZZLED_FIELD_DOUBLE_H
 
23
 
 
24
#include <drizzled/field/real.h>
23
25
 
24
26
class Field_double :public Field_real {
25
27
public:
26
 
  Field_double(unsigned char *ptr_arg, uint32_t len_arg, unsigned char *null_ptr_arg,
27
 
               unsigned char null_bit_arg,
28
 
               enum utype unireg_check_arg, const char *field_name_arg,
29
 
               uint8_t dec_arg,bool zero_arg,bool unsigned_arg)
 
28
 
 
29
  using Field::store;
 
30
  using Field::val_int;
 
31
  using Field::val_str;
 
32
  using Field::cmp;
 
33
 
 
34
  Field_double(unsigned char *ptr_arg, uint32_t len_arg,
 
35
               unsigned char *null_ptr_arg,
 
36
               unsigned char null_bit_arg,
 
37
               enum utype unireg_check_arg, const char *field_name_arg,
 
38
               uint8_t dec_arg,bool zero_arg,bool unsigned_arg)
30
39
    :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
31
40
                unireg_check_arg, field_name_arg,
32
41
                dec_arg, zero_arg, unsigned_arg)
33
42
    {}
34
43
  Field_double(uint32_t len_arg, bool maybe_null_arg, const char *field_name_arg,
35
44
               uint8_t dec_arg)
36
 
    :Field_real((unsigned char*) 0, len_arg, maybe_null_arg ? (unsigned char*) "" : 0, (uint) 0,
 
45
    :Field_real((unsigned char*) 0, len_arg, maybe_null_arg ? (unsigned char*) "" : 0, (uint32_t) 0,
37
46
                NONE, field_name_arg, dec_arg, 0, 0)
38
47
    {}
39
48
  Field_double(uint32_t len_arg, bool maybe_null_arg, const char *field_name_arg,
40
49
               uint8_t dec_arg, bool not_fixed_arg)
41
 
    :Field_real((unsigned char*) 0, len_arg, maybe_null_arg ? (unsigned char*) "" : 0, (uint) 0,
 
50
    :Field_real((unsigned char*) 0, len_arg, maybe_null_arg ? (unsigned char*) "" : 0, (uint32_t) 0,
42
51
                NONE, field_name_arg, dec_arg, 0, 0)
43
52
    {not_fixed= not_fixed_arg; }
44
53
  enum_field_types type() const { return DRIZZLE_TYPE_DOUBLE;}
50
59
  double val_real(void);
51
60
  int64_t val_int(void);
52
61
  String *val_str(String*,String *);
53
 
  bool send_binary(Protocol *protocol);
54
62
  int cmp(const unsigned char *,const unsigned char *);
55
63
  void sort_string(unsigned char *buff,uint32_t length);
56
64
  uint32_t pack_length() const { return sizeof(double); }
60
68
  int do_save_field_metadata(unsigned char *first_byte);
61
69
};
62
70
 
63
 
#endif
 
71
#endif /* DRIZZLED_FIELD_DOUBLE_H */
64
72