Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreDuration.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_DURATION__
8 #define __HDI_CORE_DURATION__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class Duration;
17  }
18 
19  namespace core
20  {
24  class Duration
25  {
26  public:
32  Duration();
33 
41  Duration(const Duration& d_);
42 
51  Duration(const int64_t secs_, const int32_t us_ = 0);
52 
61  static Duration Years(const int64_t years_);
62 
71  static Duration Days(const int64_t days_);
72 
81  static Duration Hours(const int64_t hours_);
82 
91  static Duration Minutes(const int64_t mins_);
92 
103  static Duration TimeZoneOffset();
104 
110  virtual ~Duration();
111 
120  virtual Duration& operator=(const Duration& rhs_);
121 
130  virtual bool operator==(const Duration& rhs_) const;
131 
140  virtual bool operator!=(const Duration& rhs_) const;
141 
151  virtual bool operator<(const Duration& rhs_) const;
152 
163  virtual bool operator<=(const Duration& rhs_) const;
164 
175  virtual bool operator>(const Duration& rhs_) const;
176 
188  virtual bool operator>=(const Duration& rhs_) const;
189 
197  virtual Duration operator-() const;
198 
208  virtual Duration operator-(const Duration& rhs_) const;
209 
220  virtual Duration& operator-=(const Duration& rhs_);
221 
230  virtual Duration operator+(const Duration& rhs_) const;
231 
241  virtual Duration& operator+=(const Duration& rhs_);
242 
251  virtual Duration operator*(const double rhs_) const;
252 
263  virtual Duration& operator*=(const double rhs_);
264 
273  virtual Duration operator/(const double rhs_) const;
274 
284  virtual Duration& operator/=(const double rhs_);
285 
293  virtual double years() const;
294 
302  virtual double days() const;
303 
311  virtual double hours() const;
312 
320  virtual double minutes() const;
321 
329  virtual double seconds() const;
330 
331 
332  private:
333  friend class Date;
334  friend class DateTime;
335  friend class Time;
336 
340  plugin::Duration* __impl;
341 
347  Duration(const plugin::Duration&);
348  };
349 
350  typedef std::auto_ptr<Duration> DurationAP;
351  }
352 }
353 
363 hdi::core::Duration operator*(const double lhs_, const hdi::core::Duration& rhs_);
364 
365 #endif
366 // __HDI_CORE_DURATION__
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::Date operator+(const hdi::core::Duration &lhs_, const hdi::core::Date &rhs_)
Adds a duration to a date.
hdi::core::Duration operator*(const double lhs_, const hdi::core::Duration &rhs_)
Multiplies a duration by a constant.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Definition: hdicoreaiArray.h:12
Allows for acquisition and manipulation of a duration of time.
Definition: hdicoreDuration.h:24
Allows for acquisition and manipulation of a date (day of year)
Definition: hdicoreDate.h:24