Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
edltime.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
10
11#ifndef EDLTIME_H
12#define EDLTIME_H
13
14#include <jawsmako/hashable.h>
15#include <edl/iedlobject.h>
16#include <edl/iedlfactory.h>
17#include "edltypes.h"
18#include "edlstring.h"
19#include <time.h>
20
22
23class IEDLTime;
25
32{
33#define IEDLTimeID 0x88d388a7, 0xcd6146bf, 0xa29e9830, 0x722cf8b9
34
35 public:
36
38
44 static EDL_API IEDLTimePtr createNow(IEDLClassFactory *pFactory);
45
51 class Data : public CClassParams
52 {
53 public:
54 Data() : year(0), month(0), day(0), hour(0), minute(0), second(0), ms(0),
55 tzd_sign(1), tzd_hour(0), tzd_min(0)
56 {}
57
58 uint16 year; //year
59 uint16 month; //month (1=January, etc.)
60 uint16 day; //day of month (01 through 31)
61 uint16 hour; //hour (0 through 23)
62 uint16 minute; //minute (00 through 59)
63 uint16 second; //second (00 through 59)
64 uint16 ms; //decimal fraction of a second
65 int16 tzd_sign; //time zone designator - sign (+1 or -1)
66 uint16 tzd_hour; //time zone designator - hour
67 uint16 tzd_min; //time zone designator - min
68 };
69
75 virtual bool setYear(uint16 year) = 0;
76
81 virtual uint16 getYear() const = 0;
82
88 virtual bool setMonth(uint16 month) = 0;
89
94 virtual uint16 getMonth() const = 0;
95
101 virtual bool setDay(uint16 day) = 0;
102
107 virtual uint16 getDay() const = 0;
108
120 virtual bool setTime(uint16 hour = 0, uint16 min = 0, uint16 sec = 0, uint16 ms = 0, int16 tzd_sign = 1, uint16 tzd_hour = 0, uint16 tzd_min = 0) = 0;
121
122#ifdef SWIG
123 %apply uint16_t &OUTPUT { uint16 &hour };
124 %apply uint16_t &OUTPUT { uint16 &min };
125 %apply uint16_t &OUTPUT { uint16 &sec };
126 %apply uint16_t &OUTPUT { uint16 &ms };
127 %apply int16_t &OUTPUT { int16 &tzd_sign };
128 %apply uint16_t &OUTPUT { uint16 &tzd_hour };
129 %apply uint16_t &OUTPUT { uint16 &tzd_min };
130#endif
141 virtual void getTime(uint16 &hour, uint16 &min, uint16 &sec, uint16 &ms, int16 &tzd_sign, uint16 &tzd_hour, uint16 &tzd_min) const = 0;
142#ifdef SWIG
143 %clear uint16 &hour;
144 %clear uint16 &min;
145 %clear uint16 &sec;
146 %clear uint16 &ms;
147 %clear int16 &tzd_sign;
148 %clear uint16 &tzd_hour;
149 %clear uint16 &tzd_min;
150#endif
151
156 virtual EDLSysString toW3CDTF() const = 0;
157
163 virtual bool fromW3CDTF(const EDLSysString &strTime) = 0;
164
171 virtual EDLSysString toPDFDate(bool fullDate = false) const = 0;
172
178 virtual bool fromPDFDate(const EDLSysString &strTime) = 0;
179
185 virtual bool isEqualTo(const IEDLTimePtr &ptrTime) const = 0;
186
194 virtual int32 compare(const IEDLTimePtr &ptrTime) const = 0;
195
199 virtual void now() = 0;
200
204 virtual void toUTC() = 0;
205
209 virtual void toLocalTime() = 0;
210};
211
212#define edlobj2IEDLTime(src) edl_cast((IEDLTime *)NULL, src)
213
215
216#endif /* __EDLTIME_H__ */
EDL Object Interface.
Definition iedlobject.h:31
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
uint16 year
Definition edltime.h:58
Data()
Definition edltime.h:54
uint16 day
Definition edltime.h:60
uint16 tzd_hour
Definition edltime.h:66
uint16 minute
Definition edltime.h:62
uint16 tzd_min
Definition edltime.h:67
uint16 ms
Definition edltime.h:64
uint16 hour
Definition edltime.h:61
uint16 second
Definition edltime.h:63
uint16 month
Definition edltime.h:59
int16 tzd_sign
Definition edltime.h:65
Interface to EDL date-time class.
Definition edltime.h:32
virtual bool setDay(uint16 day)=0
Sets the day.
virtual bool isEqualTo(const IEDLTimePtr &ptrTime) const =0
Check this IEDLTime for equality to another IEDLTime.
DECLARE_CLASS_ID(IEDLTimeID)
virtual uint16 getDay() const =0
Retrieves the day value.
virtual void toLocalTime()=0
Convert to local date/time.
virtual bool fromPDFDate(const EDLSysString &strTime)=0
Fill IEDLTime value from string with PDF date format.
virtual void now()=0
Sets date/time to the current system date and time.
virtual uint16 getYear() const =0
Retrieves the year value.
virtual EDLSysString toW3CDTF() const =0
Convert IEDLTime to string with W3CDTF format.
virtual EDLSysString toPDFDate(bool fullDate=false) const =0
Convert IEDLTime to string with PDF date format.
static EDL_API IEDLTimePtr createNow(IEDLClassFactory *pFactory)
Simplified creator to create the time as of now.
virtual void toUTC()=0
Convert UTC date/time.
virtual uint16 getMonth() const =0
Retrieves the month value.
virtual int32 compare(const IEDLTimePtr &ptrTime) const =0
Compare this time against ptrTime.
virtual bool fromW3CDTF(const EDLSysString &strTime)=0
Fill IEDLTime value from string with W3CDTF format.
virtual void getTime(uint16 &hour, uint16 &min, uint16 &sec, uint16 &ms, int16 &tzd_sign, uint16 &tzd_hour, uint16 &tzd_min) const =0
Retrieves the time.
virtual bool setMonth(uint16 month)=0
Sets the month.
virtual bool setYear(uint16 year)=0
Sets the year.
virtual bool setTime(uint16 hour=0, uint16 min=0, uint16 sec=0, uint16 ms=0, int16 tzd_sign=1, uint16 tzd_hour=0, uint16 tzd_min=0)=0
Sets the time.
Simple interface to provide a consistent hashing method for Mako objects.
Definition hashable.h:25
#define _BEGIN_EDL_NAMESPACE
Definition edlnamespaces.h:75
#define _END_EDL_NAMESPACE
Definition edlnamespaces.h:76
EDLString and EDLSysString classes and associated EDL string manipulation functions.
std::string EDLSysString
Definition edlstring.h:158
#define IEDLTimeID
Definition edltime.h:33
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
unsigned short uint16
Definition edltypes.h:33
#define EDL_API
Definition edltypes.h:86
signed short int16
Definition edltypes.h:28
signed int int32
Definition edltypes.h:29
An abstract interface for an object that can be hashed.
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211