~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/temporal_interval.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

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
 
4
 *  Copyright (C) 2009 Sun Microsystems, Inc.
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"
 
28
#include <drizzled/item.h>
 
29
#include <drizzled/type/time.h>
29
30
 
30
31
namespace drizzled 
31
32
{
39
40
public:
40
41
 
41
42
  TemporalInterval(uint32_t in_year,
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)
 
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)
58
58
  {}
59
59
 
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)
 
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)
70
69
  {}
71
70
 
72
71
  /**
137
136
   * @retval true date was added and value stored properly
138
137
   * @retval false result of addition is a null value
139
138
   */
140
 
  bool addDate(DRIZZLE_TIME *ltime, interval_type int_type);
 
139
  bool addDate(type::Time *ltime, interval_type int_type);
141
140
 
142
141
private:
143
142