~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/temporal_interval.h

  • Committer: Lee Bieber
  • Date: 2010-11-14 23:15:42 UTC
  • mfrom: (1929.1.42 warning-stack-frame)
  • Revision ID: kalebral@gmail.com-20101114231542-fnnu6ydd2p17n582
Merge Monty - fix bug 672372: some functions use > 32k stack

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) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  Authors: 
7
7
 *
25
25
#define DRIZZLED_TEMPORAL_INTERVAL_H
26
26
 
27
27
/* @TODO Replace this include with some forward decls */
28
 
#include <drizzled/item.h>
29
 
#include <drizzled/type/time.h>
 
28
#include "drizzled/item.h"
30
29
 
31
30
namespace drizzled 
32
31
{
40
39
public:
41
40
 
42
41
  TemporalInterval(uint32_t in_year,
43
 
                   uint32_t in_month,
44
 
                   uint32_t in_day,
45
 
                   uint32_t in_hour,
46
 
                   uint64_t in_minute,
47
 
                   uint64_t in_second,
48
 
                   uint64_t in_second_part,
49
 
                   bool in_neg) :
50
 
    year(in_year),
51
 
    month(in_month),
52
 
    day(in_day),
53
 
    hour(in_hour),
54
 
    minute(in_minute),
55
 
    second(in_second),
56
 
    second_part(in_second_part),
57
 
    neg(in_neg)
 
42
      uint32_t in_month,
 
43
      uint32_t in_day,
 
44
      uint32_t in_hour,
 
45
      uint64_t in_minute,
 
46
      uint64_t in_second,
 
47
      uint64_t in_second_part,
 
48
      bool in_neg)
 
49
    :
 
50
      year(in_year),
 
51
      month(in_month),
 
52
      day(in_day),
 
53
      hour(in_hour),
 
54
      minute(in_minute),
 
55
      second(in_second),
 
56
      second_part(in_second_part),
 
57
      neg(in_neg)
58
58
  {}
59
59
 
60
 
  TemporalInterval() :
61
 
    year(0),
62
 
    month(0),
63
 
    day(0),
64
 
    hour(0),
65
 
    minute(0),
66
 
    second(0),
67
 
    second_part(0),
68
 
    neg(false)
 
60
  TemporalInterval()
 
61
    :
 
62
      year(0),
 
63
      month(0),
 
64
      day(0),
 
65
      hour(0),
 
66
      minute(0),
 
67
      second(0),
 
68
      second_part(0),
 
69
      neg(false)
69
70
  {}
70
71
 
71
72
  /**
136
137
   * @retval true date was added and value stored properly
137
138
   * @retval false result of addition is a null value
138
139
   */
139
 
  bool addDate(type::Time *ltime, interval_type int_type);
 
140
  bool addDate(DRIZZLE_TIME *ltime, interval_type int_type);
140
141
 
141
142
private:
142
143