~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/curdate.h

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "drizzled/function/time/date.h"
24
24
#include "drizzled/temporal.h"
25
25
 
 
26
namespace drizzled
 
27
{
 
28
 
26
29
/* Abstract CURDATE function. See also Item_func_curtime. */
27
30
class Item_func_curdate :public Item_date
28
31
{
29
32
protected:
30
33
  DRIZZLE_TIME ltime;
31
 
  drizzled::Date cached_temporal;
 
34
  Date cached_temporal;
32
35
public:
33
36
  Item_func_curdate() :Item_date() {}
34
37
  void fix_length_and_dec();
35
38
  /**
36
39
   * All functions which inherit from Item_date must implement
37
40
   * their own get_temporal() method, which takes a supplied
38
 
   * drizzled::Date reference and populates it with a correct
 
41
   * Date reference and populates it with a correct
39
42
   * date based on the semantics of the function.
40
43
   *
41
44
   * For CURDATE() and sisters, there is no argument, and we 
44
47
   * Always returns true, since a Date can always be constructed
45
48
   * from a time_t
46
49
   *
47
 
   * @param Reference to a drizzled::Date to populate
 
50
   * @param Reference to a Date to populate
48
51
   */
49
 
  bool get_temporal(drizzled::Date &temporal);
 
52
  bool get_temporal(Date &temporal);
50
53
  virtual void store_now_in_TIME(DRIZZLE_TIME *now_time)=0;
51
54
};
52
55
 
66
69
  void store_now_in_TIME(DRIZZLE_TIME *now_time);
67
70
};
68
71
 
 
72
} /* namespace drizzled */
 
73
 
69
74
#endif /* DRIZZLED_FUNCTION_TIME_CURDATE_H */