~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/temporal.h

  • Committer: Jay Pipes
  • Date: 2009-02-28 20:43:31 UTC
  • mto: (910.2.6 mordred-noatomics)
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: jpipes@serialcoder-20090228204331-6x804cdbfzyy9w8i
Merged in remove-timezone work

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
 
73
73
#include "drizzled/calendar.h"
74
74
 
 
75
#include <ostream>
 
76
 
75
77
/* Outside forward declarations */
76
78
class my_decimal;
77
79
 
236
238
  bool operator<=(const DateTime &rhs);
237
239
 
238
240
  /**
239
 
   * Comparison operator overloads to compare a Date against
240
 
   * a Timestamp value.
241
 
   *
242
 
   * @param Timestamp to compare against.
243
 
   */
244
 
  bool operator==(const Timestamp &rhs);
245
 
  bool operator!=(const Timestamp &rhs);
246
 
  bool operator>(const Timestamp &rhs);
247
 
  bool operator>=(const Timestamp &rhs);
248
 
  bool operator<(const Timestamp &rhs);
249
 
  bool operator<=(const Timestamp &rhs);
250
 
 
251
 
  /**
252
241
   * Operator overload for adding/subtracting another Date
253
242
   * (or subclass) to/from this temporal.  When subtracting
254
243
   * or adding two Dates, we return a new Date instance.
669
658
public:
670
659
  Timestamp() :DateTime() {}
671
660
 
 
661
  /**
 
662
   * Comparison operator overloads to compare this against
 
663
   * another Timestamp value.
 
664
   *
 
665
   * @param Timestamp to compare against.
 
666
   */
 
667
  bool operator==(const Timestamp &rhs);
 
668
  bool operator!=(const Timestamp &rhs);
 
669
  bool operator>(const Timestamp &rhs);
 
670
  bool operator>=(const Timestamp &rhs);
 
671
  bool operator<(const Timestamp &rhs);
 
672
  bool operator<=(const Timestamp &rhs);
 
673
 
672
674
  bool is_valid_timestamp() const {return is_valid();}
673
675
  /** Returns whether the temporal value is valid timestamp. */
674
676
  virtual bool is_valid() const;
683
685
};
684
686
 
685
687
/**
 
688
 * Operator overload to an output stream for a Timestamp.
 
689
 */
 
690
std::ostream& operator<<(std::ostream& os, const Timestamp& subject);
 
691
 
 
692
/**
686
693
 * Class representing temporal components in the UNIX epoch
687
694
 * with an additional microsecond component.
688
695
 */