SNAP Library 4.0, Developer Reference
2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <tm.h>
Public Member Functions | |
TSecTm () | |
TSecTm (const uint &_AbsSecs) | |
operator uint () const | |
TSecTm (const TSecTm &SecTm) | |
TSecTm (const int &YearN, const int &MonthN, const int &DayN, const int &HourN=0, const int &MinN=0, const int &SecN=0) | |
TSecTm (const TTm &Tm) | |
TSecTm (const PXmlTok &XmlTok) | |
PXmlTok | GetXmlTok () const |
TSecTm (TSIn &SIn) | |
void | Load (TSIn &SIn) |
void | Save (TSOut &SOut) const |
TSecTm & | operator= (const TSecTm &SecTm) |
TSecTm & | operator= (const uint &_AbsSecs) |
TSecTm & | operator+= (const uint &Secs) |
TSecTm & | operator-= (const uint &Secs) |
bool | operator== (const TSecTm &SecTm) const |
bool | operator< (const TSecTm &SecTm) const |
int | GetMemUsed () const |
int | GetPrimHashCd () const |
int | GetSecHashCd () const |
bool | IsDef () const |
void | Undef () |
TStr | GetStr (const TLoc &Loc=lUs) const |
TStr | GetStr (const TTmUnit &TmUnit) const |
TStr | GetDtStr (const TLoc &Loc=lUs) const |
TStr | GetDtMdyStr () const |
TStr | GetDtYmdStr () const |
TStr | GetYmdTmStr () const |
TStr | GetYmdTmStr2 () const |
TStr | GetTmStr () const |
TStr | GetTmMinStr () const |
TStr | GetDtTmSortStr () const |
TStr | GetDtTmSortFNmStr () const |
int | GetYearN () const |
int | GetMonthN () const |
TStr | GetMonthNm (const TLoc &Loc=lUs) const |
int | GetDayN () const |
int | GetDayOfWeekN () const |
TStr | GetDayOfWeekNm (const TLoc &Loc=lUs) const |
int | GetHourN () const |
int | GetMinN () const |
int | GetSecN () const |
void | GetComps (int &Year, int &Month, int &Day, int &Hour, int &Min, int &Sec) const |
uint | GetAbsSecs () const |
TSecTm | Round (const TTmUnit &TmUnit) const |
uint | GetInUnits (const TTmUnit &TmUnit) const |
TStr | GetDayPart () const |
TSecTm & | AddSecs (const int &Secs) |
TSecTm & | SubSecs (const int &Secs) |
TSecTm & | AddMins (const int &Mins) |
TSecTm & | SubMins (const int &Mins) |
TSecTm & | AddHours (const int &Hours) |
TSecTm & | SubHours (const int &Hours) |
TSecTm & | AddDays (const int &Days) |
TSecTm & | SubDays (const int &Days) |
TSecTm & | AddWeeks (const int &Weeks) |
TSecTm & | SubWeeks (const int &Weeks) |
void | SaveTxt (TOLx &Lx) const |
Static Public Member Functions | |
static uint | GetDSecs (const TSecTm &SecTm1, const TSecTm &SecTm2) |
static TSecTm | GetZeroTm () |
static TSecTm | GetZeroWeekTm () |
static TSecTm | GetCurTm () |
static TSecTm | GetCurDtTm () |
static TSecTm | GetDtTmFromHmsStr (const TStr &HmsStr) |
static TSecTm | GetDtTmFromMdyStr (const TStr &MdyStr) |
static TSecTm | GetDtTmFromDmyStr (const TStr &DmyStr) |
static TSecTm | GetDtTmFromMdyHmsPmStr (const TStr &MdyHmsPmStr, const char &DateSepCh='/', const char &TimeSepCh=':') |
static TSecTm | GetDtTmFromYmdHmsStr (const TStr &YmdHmsPmStr, const char &DateSepCh='-', const char &TimeSepCh=':') |
static TSecTm | GetDtTmFromStr (const TChA &YmdHmsPmStr, const int &YearId=0, const int &MonId=1, const int &DayId=2, const int &HourId=3, const int &MinId=4, const int &SecId=5) |
static TSecTm | GetDtTm (const int &YearN, const int &MonthN, const int &DayN) |
static TSecTm | GetDtTm (const TSecTm &Tm) |
static TSecTm | LoadTxt (TILx &Lx) |
Static Private Member Functions | |
static bool | GetTmSec (const int &YearN, const int &MonthN, const int &DayN, const int &HourN, const int &MinN, const int &SecN, uint &AbsSec) |
static bool | GetTmSec (struct tm &Tm, uint &AbsSec) |
static bool | GetTmStruct (const uint &AbsSec, struct tm &Tm) |
static time_t | MkGmTime (struct tm *t) |
Private Attributes | |
TUInt | AbsSecs |
|
inline |
Definition at line 92 of file tm.h.
Referenced by GetCurTm(), GetDtTm(), GetDtTmFromDmyStr(), GetDtTmFromStr(), GetInUnits(), GetZeroTm(), LoadTxt(), Round(), and TSecTm().
|
inline |
TSecTm::TSecTm | ( | const int & | YearN, |
const int & | MonthN, | ||
const int & | DayN, | ||
const int & | HourN = 0 , |
||
const int & | MinN = 0 , |
||
const int & | SecN = 0 |
||
) |
Definition at line 427 of file tm.cpp.
References AbsSecs, GetTmSec(), and TUInt::Val.
|
explicit |
Definition at line 436 of file tm.cpp.
References AbsSecs, TXmlTok::GetIntArgVal(), and TSecTm().
|
inline |
Definition at line 168 of file tm.h.
References AbsSecs, IAssert, IsDef(), and TUInt::Val.
Referenced by GetZeroWeekTm().
|
inline |
Definition at line 164 of file tm.h.
References AbsSecs, IAssert, IsDef(), and TUInt::Val.
Referenced by GetDtTmFromHmsStr(), GetDtTmFromMdyHmsPmStr(), and GetDtTmFromYmdHmsStr().
|
inline |
Definition at line 160 of file tm.h.
References AbsSecs, IAssert, IsDef(), and TUInt::Val.
Referenced by GetDtTmFromHmsStr(), GetDtTmFromMdyHmsPmStr(), and GetDtTmFromYmdHmsStr().
|
inline |
Definition at line 156 of file tm.h.
References AbsSecs, IAssert, IsDef(), and TUInt::Val.
Referenced by GetDtTmFromHmsStr(), GetDtTmFromMdyHmsPmStr(), and GetDtTmFromYmdHmsStr().
|
inline |
|
inline |
Definition at line 150 of file tm.h.
References AbsSecs.
Referenced by TTm::GetDateTimeInt(), TTimeNENet::GetEdgeTmBuckets(), TTimeNENet::GetTmBuckets(), TGStat::GetVal(), TNIBs::LabelBurstAutomaton(), TAGMFast::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), and TTimeNENet::SaveEdgeTm().
void TSecTm::GetComps | ( | int & | Year, |
int & | Month, | ||
int & | Day, | ||
int & | Hour, | ||
int & | Min, | ||
int & | Sec | ||
) | const |
|
inlinestatic |
Definition at line 190 of file tm.h.
References GetCurTm(), and GetDtTm().
|
static |
Definition at line 697 of file tm.cpp.
References GetTmSec(), IAssert, TUInt::Mx, and TSecTm().
Referenced by GetCurDtTm(), TExeTm::GetCurTm(), TTimeNENet::LoadEdgeTm(), TAGMFast::MLEGradAscentParallel(), and TCesna::MLEGradAscentParallel().
int TSecTm::GetDayN | ( | ) | const |
Definition at line 578 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by TGStat::GetDay(), GetDtTmSortFNmStr(), GetDtTmSortStr(), GetStr(), and GetXmlTok().
int TSecTm::GetDayOfWeekN | ( | ) | const |
Definition at line 584 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by GetZeroWeekTm().
Definition at line 590 of file tm.cpp.
References AbsSecs, TTmInfo::GetDayOfWeekNm(), GetTmStruct(), IAssert, and IsDef().
TStr TSecTm::GetDayPart | ( | ) | const |
Definition at line 674 of file tm.cpp.
References GetHourN().
TStr TSecTm::GetDtMdyStr | ( | ) | const |
Definition at line 496 of file tm.cpp.
References AbsSecs, TStr::Fmt(), GetTmStruct(), and IAssert.
Definition at line 484 of file tm.cpp.
References AbsSecs, TStr::CStr(), TStr::Fmt(), TTmInfo::GetDayOfWeekNm(), TTmInfo::GetMonthNm(), GetTmStruct(), IAssert, and IsDef().
|
static |
Definition at line 938 of file tm.cpp.
References AbsSecs, GetTmSec(), and TSecTm().
Referenced by GetCurDtTm(), GetDtTmFromDmyStr(), GetDtTmFromMdyHmsPmStr(), GetDtTmFromMdyStr(), and GetDtTmFromYmdHmsStr().
Definition at line 766 of file tm.cpp.
References TChA::Clr(), GetDtTm(), TStr::GetInt(), TTmInfo::GetMonthN(), TStr::Len(), TStr::ToCap(), and TSecTm().
Definition at line 712 of file tm.cpp.
References AddHours(), AddMins(), AddSecs(), TChA::Clr(), TStr::GetInt(), GetZeroTm(), and TStr::Len().
|
static |
Definition at line 800 of file tm.cpp.
References AddHours(), AddMins(), AddSecs(), TChA::Clr(), Fail, GetDtTm(), TStr::GetInt(), TStr::IsInt(), and TStr::Len().
Definition at line 738 of file tm.cpp.
References TChA::Clr(), GetDtTm(), TStr::GetInt(), and TStr::Len().
|
static |
Definition at line 915 of file tm.cpp.
References TVec< TVal, TSizeTy >::Add(), TChA::CStr(), IAssert, TCh::IsNum(), and TSecTm().
|
static |
Definition at line 859 of file tm.cpp.
References AddHours(), AddMins(), AddSecs(), TChA::Clr(), GetDtTm(), TStr::GetInt(), TStr::IsInt(), and TStr::Len().
TStr TSecTm::GetDtTmSortFNmStr | ( | ) | const |
Definition at line 550 of file tm.cpp.
References GetDayN(), GetHourN(), GetMinN(), GetMonthN(), GetSecN(), TInt::GetStr(), and GetYearN().
TStr TSecTm::GetDtTmSortStr | ( | ) | const |
Definition at line 540 of file tm.cpp.
References GetDayN(), GetHourN(), GetMinN(), GetMonthN(), GetSecN(), TInt::GetStr(), and GetYearN().
TStr TSecTm::GetDtYmdStr | ( | ) | const |
Definition at line 502 of file tm.cpp.
References AbsSecs, TStr::Fmt(), GetTmStruct(), and IAssert.
int TSecTm::GetHourN | ( | ) | const |
Definition at line 596 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by GetDayPart(), GetDtTm(), GetDtTmSortFNmStr(), GetDtTmSortStr(), TGStat::GetHour(), GetStr(), and GetXmlTok().
Definition at line 650 of file tm.cpp.
References AbsSecs, Fail, TJulianDate::GetJulianDateN(), GetTmStruct(), IAssert, IsDef(), TUInt::Mx, tmu10Min, tmu12Hour, tmu15Min, tmu1Hour, tmu1Min, tmu1Sec, tmu2Hour, tmu30Min, tmu4Hour, tmu6Hour, tmuDay, tmuMonth, tmuWeek, tmuYear, and TSecTm().
Referenced by TGStat::GetTime().
|
inline |
Definition at line 117 of file tm.h.
References AbsSecs, and TUInt::GetMemUsed().
int TSecTm::GetMinN | ( | ) | const |
Definition at line 602 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by GetDtTm(), GetDtTmSortFNmStr(), GetDtTmSortStr(), TGStat::GetMin(), GetStr(), and GetXmlTok().
int TSecTm::GetMonthN | ( | ) | const |
Definition at line 566 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by GetDtTmSortFNmStr(), GetDtTmSortStr(), TGStat::GetMonth(), GetStr(), and GetXmlTok().
Definition at line 572 of file tm.cpp.
References AbsSecs, TTmInfo::GetMonthNm(), GetTmStruct(), IAssert, and IsDef().
|
inline |
Definition at line 119 of file tm.h.
References AbsSecs, and TUInt::GetPrimHashCd().
|
inline |
Definition at line 120 of file tm.h.
References AbsSecs, and TUInt::GetSecHashCd().
int TSecTm::GetSecN | ( | ) | const |
Definition at line 608 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by GetDtTm(), GetDtTmSortFNmStr(), GetDtTmSortStr(), TGStat::GetSec(), GetStr(), and GetXmlTok().
Definition at line 457 of file tm.cpp.
References AbsSecs, TStr::CStr(), TStr::Fmt(), TTmInfo::GetDayOfWeekNm(), TTmInfo::GetMonthNm(), GetTmStruct(), IAssert, and IsDef().
Referenced by TTimeNENet::DumpTimeStat(), TGStat::GetTmStr(), TTimeNENet::LoadEdgeTm(), TTimeNENet::LoadFlickr(), TTimeNet::PlotMissingPast(), TTimeNENet::PlotMissingPast(), and TGStat::TakeStat().
Definition at line 471 of file tm.cpp.
References TStr::Fmt(), GetDayN(), GetHourN(), GetMinN(), GetMonthN(), GetSecN(), TInt::GetStr(), GetYearN(), tmuDay, tmuMonth, and tmuYear.
TStr TSecTm::GetTmMinStr | ( | ) | const |
Definition at line 530 of file tm.cpp.
References AbsSecs, TStr::Fmt(), GetTmStruct(), IAssert, and IsDef().
|
staticprivate |
Definition at line 363 of file tm.cpp.
Referenced by GetCurTm(), GetDtTm(), and TSecTm().
|
staticprivate |
Definition at line 407 of file tm.cpp.
References TStr::CStr(), EAssertR, TStr::Fmt(), MkGmTime(), and TUInt::Mx.
TStr TSecTm::GetTmStr | ( | ) | const |
Definition at line 520 of file tm.cpp.
References AbsSecs, TStr::Fmt(), GetTmStruct(), IAssert, and IsDef().
Referenced by TExeTm::GetCurTm().
|
staticprivate |
Definition at line 416 of file tm.cpp.
Referenced by GetComps(), GetDayN(), GetDayOfWeekN(), GetDayOfWeekNm(), GetDtMdyStr(), GetDtStr(), GetDtYmdStr(), GetHourN(), GetInUnits(), GetMinN(), GetMonthN(), GetMonthNm(), GetSecN(), GetStr(), GetTmMinStr(), GetTmStr(), GetYearN(), GetYmdTmStr(), GetYmdTmStr2(), and Round().
PXmlTok TSecTm::GetXmlTok | ( | ) | const |
Definition at line 446 of file tm.cpp.
References TXmlTok::AddArg(), GetDayN(), GetHourN(), GetMinN(), GetMonthN(), GetSecN(), GetYearN(), and TXmlTok::New().
int TSecTm::GetYearN | ( | ) | const |
Definition at line 560 of file tm.cpp.
References AbsSecs, GetTmStruct(), IAssert, and IsDef().
Referenced by GetDtTmSortFNmStr(), GetDtTmSortStr(), GetStr(), GetXmlTok(), and TGStat::GetYear().
TStr TSecTm::GetYmdTmStr | ( | ) | const |
Definition at line 508 of file tm.cpp.
References AbsSecs, TStr::Fmt(), GetTmStruct(), and IAssert.
TStr TSecTm::GetYmdTmStr2 | ( | ) | const |
Definition at line 514 of file tm.cpp.
References AbsSecs, TStr::Fmt(), GetTmStruct(), and IAssert.
|
inlinestatic |
Definition at line 187 of file tm.h.
References TSecTm().
Referenced by GetDtTmFromHmsStr(), and GetZeroWeekTm().
|
static |
Definition at line 690 of file tm.cpp.
References AddDays(), GetDayOfWeekN(), GetZeroTm(), and TTmInfo::MonN.
|
inline |
Definition at line 123 of file tm.h.
References AbsSecs, and TUInt::Mx.
Referenced by AddDays(), AddHours(), AddMins(), AddSecs(), AddWeeks(), TTimeNENet::DumpTimeStat(), GetComps(), GetDayN(), GetDayOfWeekN(), GetDayOfWeekNm(), GetDSecs(), GetDtStr(), TTimeNENet::GetGraphUpToTm(), GetHourN(), GetInUnits(), GetMinN(), GetMonthN(), GetMonthNm(), GetSecN(), GetStr(), GetTmMinStr(), GetTmStr(), GetYearN(), TGStat::HasVal(), operator+=(), operator-=(), operator<(), TTimeNet::PlotMissingPast(), Round(), TTimeNENet::SetNodeTmToFirstEdgeTm(), SubDays(), SubHours(), SubMins(), SubSecs(), SubWeeks(), TGStat::TakeStat(), and TTimeNENet::UpdateNodeTimes().
|
inline |
Definition at line 102 of file tm.h.
References AbsSecs, and TUInt::Load().
Definition at line 950 of file tm.cpp.
References TILx::GetInt(), and TSecTm().
Referenced by TILx::GetVarSecTm().
|
staticprivate |
Definition at line 380 of file tm.cpp.
Referenced by GetTmSec().
|
inline |
|
inline |
|
inline |
Definition at line 625 of file tm.cpp.
References AbsSecs, Fail, TJulianDate::GetCalendarDate(), TJulianDate::GetJulianDateN(), GetTmStruct(), IAssert, IsDef(), tmu10Min, tmu12Hour, tmu15Min, tmu1Hour, tmu1Min, tmu1Sec, tmu2Hour, tmu30Min, tmu4Hour, tmu6Hour, tmuDay, tmuMonth, tmuWeek, tmuYear, and TSecTm().
Referenced by TTimeNENet::GetEdgeTmBuckets(), and TTimeNENet::GetTmBuckets().
|
inline |
Definition at line 103 of file tm.h.
References AbsSecs, and TUInt::Save().
Referenced by TGStat::Save().
void TSecTm::SaveTxt | ( | TOLx & | Lx | ) | const |
Definition at line 954 of file tm.cpp.
References AbsSecs, IAssert, TInt::Mx, and TOLx::PutInt().
Referenced by TOLx::PutVarSecTm().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 83 of file tm.h.
Referenced by AddDays(), AddHours(), AddMins(), AddSecs(), AddWeeks(), GetAbsSecs(), GetComps(), GetDayN(), GetDayOfWeekN(), GetDayOfWeekNm(), GetDSecs(), GetDtMdyStr(), GetDtStr(), GetDtTm(), GetDtYmdStr(), GetHourN(), GetInUnits(), GetMemUsed(), GetMinN(), GetMonthN(), GetMonthNm(), GetPrimHashCd(), GetSecHashCd(), GetSecN(), GetStr(), GetTmMinStr(), GetTmStr(), GetYearN(), GetYmdTmStr(), GetYmdTmStr2(), IsDef(), Load(), operator uint(), operator+=(), operator-=(), operator<(), operator=(), operator==(), Round(), Save(), SaveTxt(), SubDays(), SubHours(), SubMins(), SubSecs(), SubWeeks(), TSecTm(), and Undef().