Exemplo n.º 1
0
TSecTm::TSecTm(const PXmlTok& XmlTok) {
  const int Year = XmlTok->GetIntArgVal("Year");
  const int Month = XmlTok->GetIntArgVal("Month");
  const int Day = XmlTok->GetIntArgVal("Day");
  const int Hour = XmlTok->GetIntArgVal("Hour");
  const int Min = XmlTok->GetIntArgVal("Min");
  const int Sec = XmlTok->GetIntArgVal("Sec");
  AbsSecs = TSecTm(Year, Month, Day, Hour, Min, Sec).GetAbsSecs();
}
TInt GetIntArg(const PXmlTok& QueryXml, const TStr& ArgNm, int DfVal)
{
	if (QueryXml.Empty()) return DfVal;
	return QueryXml->GetIntArgVal(ArgNm, DfVal);
}
TInt GetIntArg(const PXmlTok& QueryXml, const TStr& TagPath, const TStr& ArgNm, int DfVal)
{
	PXmlTok XmlTok = QueryXml->GetTagTok(TagPath);
	if (XmlTok.Empty()) return DfVal;
	return XmlTok->GetIntArgVal(ArgNm, DfVal);
}