~xnox/ubuntu/saucy/drizzle/merge

« back to all changes in this revision

Viewing changes to drizzled/temporal.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-01-01 13:55:03 UTC
  • Revision ID: james.westby@ubuntu.com-20110101135503-x2ub1akxoisgwi6z
Tags: 2010.12.06-0ubuntu4
* Fixed missing build depends.
* Added Lee to uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
#include <ostream>
73
73
 
74
74
/* Outside forward declarations */
75
 
class my_decimal;
 
75
namespace type {
 
76
class Decimal;
 
77
}
76
78
 
77
79
namespace drizzled
78
80
{
419
421
   *
420
422
   * @param Pointer to a time_t to convert to
421
423
   */
422
 
  virtual void to_time_t(time_t *to) const;
 
424
  virtual void to_time_t(time_t &to) const;
423
425
 
424
426
  /**
425
427
   * Attempts to populate the Date instance based
433
435
  virtual bool from_time_t(const time_t from);
434
436
 
435
437
  /**
436
 
   * Fills a supplied my_decimal with a representation of
 
438
   * Fills a supplied type::Decimal with a representation of
437
439
   * the Date value.
438
440
   *
439
 
   * @param Pointer to the my_decimal to fill
 
441
   * @param Pointer to the type::Decimal to fill
440
442
   */
441
 
  virtual void to_decimal(my_decimal *to) const;
 
443
  virtual void to_decimal(type::Decimal *to) const;
442
444
 
443
445
  friend class TemporalInterval;
444
446
  friend class Timestamp;
485
487
  bool is_valid_datetime() const {return false;}
486
488
  bool is_valid_time() const {return is_valid();}
487
489
  bool is_valid_timestamp() const {return false;}
 
490
 
488
491
  /** Returns whether the temporal value is valid date. */
489
492
  bool is_valid() const;
 
493
  bool is_fuzzy_valid() const;
490
494
 
491
495
  /**
492
496
   * Fills a supplied char string with a
530
534
  void to_int32_t(int32_t *to) const;
531
535
 
532
536
  /**
 
537
   * Fills a supplied 8-byte integer pointer with an
 
538
   * integer representation of the Time
 
539
   * value. It is assume seconds past unix epoch
 
540
   *
 
541
   * @param Integer to fill.
 
542
   */
 
543
  void to_uint64_t(uint64_t &to) const;
 
544
 
 
545
  /**
533
546
   * Attempts to populate the Time instance based
534
547
   * on the contents of a supplied 4-byte integer.
535
548
   *
557
570
  bool from_time_t(const time_t from);
558
571
 
559
572
  /**
560
 
   * Fills a supplied my_decimal with a representation of
 
573
   * Fills a supplied type::Decimal with a representation of
561
574
   * the Time value.
562
575
   *
563
 
   * @param Pointer to the my_decimal to fill
 
576
   * @param Pointer to the type::Decimal to fill
564
577
   */
565
 
  void to_decimal(my_decimal *to) const;
 
578
  void to_decimal(type::Decimal *to) const;
566
579
 
567
580
  friend class Date;
568
581
  friend class DateTime;
671
684
  void to_tm(struct tm *to) const;
672
685
 
673
686
  /**
674
 
   * Fills a supplied my_decimal with a representation of
 
687
   * Fills a supplied type::Decimal with a representation of
675
688
   * the DateTime value.
676
689
   *
677
 
   * @param Pointer to the my_decimal to fill
 
690
   * @param Pointer to the type::Decimal to fill
678
691
   */
679
 
  void to_decimal(my_decimal *to) const;
 
692
  void to_decimal(type::Decimal *to) const;
680
693
 
681
694
  friend class Timestamp;
682
695
};
738
751
   *
739
752
   * @param Pointer to a time_t to convert to
740
753
   */
741
 
  void to_time_t(time_t *to) const;
 
754
  void to_time_t(time_t &to) const;
742
755
};
743
756
 
744
757
/**