~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/real.h

Merged vcol stuff.

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 DRIZZLED_FIELD_REAL_H
22
 
#define DRIZZLED_FIELD_REAL_H
23
 
 
24
 
#include <drizzled/field/num.h>
25
 
 
26
 
namespace drizzled
27
 
{
 
21
#ifndef DRIZZLE_SERVER_FIELD_REAL
 
22
#define DRIZZLE_SERVER_FIELD_REAL
 
23
 
28
24
 
29
25
/* base class for float and double and decimal (old one) */
30
26
class Field_real :public Field_num {
31
27
public:
32
28
  bool not_fixed;
33
29
 
34
 
  using Field::unpack;
35
 
  using Field::pack;
36
 
 
37
30
  Field_real(unsigned char *ptr_arg, uint32_t len_arg, unsigned char *null_ptr_arg,
38
31
             unsigned char null_bit_arg, utype unireg_check_arg,
39
32
             const char *field_name_arg,
42
35
               field_name_arg, dec_arg, zero_arg, unsigned_arg),
43
36
    not_fixed(dec_arg >= NOT_FIXED_DEC)
44
37
    {}
45
 
  int store_decimal(const type::Decimal *);
46
 
  type::Decimal *val_decimal(type::Decimal *);
 
38
  int store_decimal(const my_decimal *);
 
39
  my_decimal *val_decimal(my_decimal *);
47
40
  int truncate(double *nr, double max_length);
48
41
  uint32_t max_display_length() { return field_length; }
49
42
  uint32_t size_of() const { return sizeof(*this); }
53
46
                      uint32_t max_length, bool low_byte_first);
54
47
};
55
48
 
56
 
} /* namespace drizzled */
57
 
 
58
 
#endif /* DRIZZLED_FIELD_REAL_H */
 
49
#endif