TSDuck v3.40-4033
MPEG Transport Stream Toolkit
|
Template representation of a CAS date. More...
#include <tsCASDate.h>
Public Member Functions | |
CASDate ()=default | |
Default constructor. | |
CASDate (const Time &t) | |
Constructor from a Time object. | |
CASDate (int year, int month, int day) | |
Constructor from fields. | |
CASDate (uint16_t value) | |
Constructor from a 16-bit binary value. | |
int | day () const |
Get the day number. | |
void | invalidate () |
Make the date invalid. | |
bool | isValid () const |
Check if a date is valid. | |
int | month () const |
Get the month number. | |
operator ts::Time () const | |
Convert to a Time object. | |
virtual UString | toString () const override |
Convert to a string object. | |
uint16_t | value () const |
Convert to a 16-bit value, for binary insertion. | |
int | year () const |
Get the year number. | |
Static Public Member Functions | |
static CASDate | Max () |
A static function to return the maximum date. | |
static CASDate | Min () |
A static function to return the minimum date. | |
Template representation of a CAS date.
This general format is used by several CAS vendors.
YEARBASE | The base year for the dates (CAS dependent). |
|
default |
Default constructor.
The date is initially invalid.
|
inline |
Constructor from a 16-bit binary value.
[in] | value | 16-bit binary representation of the date. |
|
inline |
Constructor from fields.
[in] | year | Year number. |
[in] | month | Month number. |
[in] | day | Day number. |
ts::CASDate< YEARBASE >::CASDate | ( | const Time & | t | ) |
|
inlinestatic |
A static function to return the minimum date.
|
inlinestatic |
A static function to return the maximum date.
|
inline |
Check if a date is valid.
|
inline |
Get the year number.
|
inline |
Get the month number.
|
inline |
Get the day number.
|
inline |
Convert to a 16-bit value, for binary insertion.
ts::CASDate< YEARBASE >::operator ts::Time | ( | ) | const |
Convert to a Time object.
|
overridevirtual |
Convert to a string object.
Implements ts::StringifyInterface.