Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreTime.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_TIME__
8 #define __HDI_CORE_TIME__
9 
10 #include "hdicoreDuration.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class Time;
17  }
18 
19  namespace core
20  {
24  class Time
25  {
26  public:
32  Time();
33 
41  Time(const Time& t_);
42 
53  explicit Time(const int32_t secsSinceMN_);
54 
55 
66  explicit Time(const double secsSinceMN_);
67 
79  Time(const std::string& time_);
80 
94  Time(const int16_t hour_, const int16_t min_, const int16_t sec_ = 0, const int32_t us_ = 0);
95 
104  static Time Current(const bool us_ = false);
105 
111  virtual ~Time();
112 
121  virtual Time& operator=(const Time& rhs_);
122 
131  virtual bool operator==(const Time& rhs_) const;
132 
141  virtual bool operator!=(const Time& rhs_) const;
142 
153  virtual bool operator<(const Time& rhs_) const;
154 
165  virtual bool operator<=(const Time& rhs_) const;
166 
177  virtual bool operator>(const Time& rhs_) const;
178 
189  virtual bool operator>=(const Time& rhs_) const;
190 
199  virtual Duration operator-(const Time& rhs_) const;
200 
210  virtual Time operator-(const Duration& rhs_) const;
211 
223  virtual Time& operator-=(const Duration& rhs_);
224 
233  virtual Time operator+(const Duration& rhs_) const;
234 
245  virtual Time& operator+=(const Duration& rhs_);
246 
267  virtual std::string format(const std::string& format_ = "H:i:s") const;
268 
276  virtual int16_t hour() const;
277 
288  virtual void setHour(const int16_t hour_);
289 
297  virtual int16_t minute() const;
298 
309  virtual void setMinute(const int16_t min_);
310 
318  virtual int16_t second() const;
319 
330  virtual void setSecond(const int16_t sec_);
331 
339  virtual int32_t microsecond() const;
340 
351  virtual void setMicrosecond(const int32_t us_);
352 
360  virtual double secondsSinceMidnight() const;
361 
372  virtual void setSecondsSinceMidnight(const double secsSinceMN_);
373 
374 
375  private:
376  friend class DateTime;
377 
381  plugin::Time* __impl;
382 
388  Time(const plugin::Time&);
389  };
390 
391  typedef std::auto_ptr<Time> TimeAP;
392  }
393 }
394 
405 
406 #endif
407 // __HDI_CORE_TIME__
Allows for acquisition and manipulation of a time (of day)
Definition: hdicoreTime.h:24
Allows for acquisition and manipulation of a date (day of year) and time (of day) ...
Definition: hdicoreDateTime.h:25
hdi::core::Time operator+(const hdi::core::Duration &lhs_, const hdi::core::Time &rhs_)
Adds a duration to a time of day.
Header file for handling a duration of time.
Definition: hdicoreaiArray.h:12
Allows for acquisition and manipulation of a duration of time.
Definition: hdicoreDuration.h:24