11#define UniRunPERIOD_H 1
28 TDatime ts_start_datetime;
30 TDatime* ts_end_datetime;
60 if (ts_end_datetime ==
nullptr)
63 return new TDatime(*ts_end_datetime);
int GetPeriodNumber()
get period number of the current run period
TDatime * GetEndDatetime()
get end datetime of the current run period
void Print()
print information about current run period
static UniRunPeriod * GetRunPeriod(int period_number)
get run period from the database
int SetEndDatetime(TDatime *end_datetime)
set end datetime of the current run period
int SetPeriodNumber(int period_number)
set period number of the current run period
static int GetFirstRunNumber(int period_number)
static int CheckRunPeriodExists(int period_number)
check run period exists in the database: 1- true, 0 - false, <0 - database operation error
int SetStartDatetime(TDatime start_datetime)
set start datetime of the current run period
ClassDef(UniRunPeriod, 1)
static int DeleteRunPeriod(int period_number)
delete run period from the database
static int GetLastRunNumber(int period_number)
static UniRunPeriod * CreateRunPeriod(int period_number, TDatime start_datetime, TDatime *end_datetime)
add new run period to the database
static int GetRunNumbers(UniqueRunNumber *&run_numbers, int period_number)
static int PrintAll()
print all run periods
TDatime GetStartDatetime()
get start datetime of the current run period