HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_DateTimeField.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_DateTimeField.h
7  *
8  * COMMENTS:
9  *
10  *
11  */
12 
13 #ifndef __UT_DATETIMEFIELD_H__
14 #define __UT_DATETIMEFIELD_H__
15 
16 #include "UT_API.h"
17 
18 #include <time.h>
19 
21 {
22 public:
23  UT_DateTimeField() = default;
24  explicit UT_DateTimeField(time_t now) :
25  myTimeT(now)
26  {}
27 
29  {
30  myTimeT = t;
31  return *this;
32  }
33 
34  operator time_t() const { return myTimeT; }
35 
36  time_t value() const { return myTimeT; }
37 
38  static UT_DateTimeField now() { return UT_DateTimeField(time(NULL)); }
39 
40 private:
41  time_t myTimeT = 0;
42 };
43 
44 #endif // __UT_DATETIMEFIELD_H__
45 
GT_API const UT_StringHolder time
#define UT_API
Definition: UT_API.h:14
static UT_DateTimeField now()
GLdouble t
Definition: glad.h:2397
UT_DateTimeField(time_t now)
time_t value() const
UT_DateTimeField & operator=(time_t t)