more ai generated doc with human review

This commit is contained in:
2026-02-28 12:29:00 +03:00
parent 077f12c9e5
commit 0878891cd8
86 changed files with 2215 additions and 637 deletions

View File

@@ -3,6 +3,11 @@
* \brief
* \~english PITime conversions for Windows
* \~russian Преобразования PITime для Windows
* \details
* \~english This file provides conversion functions between Windows time structures (FILETIME, SYSTEMTIME) and PIP time structures
* (PISystemTime, PIDateTime).
* \~russian Этот файл предоставляет функции преобразования между структурами времени Windows (FILETIME, SYSTEMTIME) и структурами времени
* PIP (PISystemTime, PIDateTime).
*/
/*
PIP - Platform Independent Primitives
@@ -32,7 +37,16 @@
# include <windows.h>
//! \addtogroup Types
//! \{
//! \~english Converts FILETIME to PISystemTime.
//! \~russian Преобразует FILETIME в PISystemTime.
//! \details
//! \~english Converts Windows FILETIME structure to PISystemTime. FILETIME is a 64-bit value representing the number of 100-nanosecond
//! intervals since January 1, 1601 (UTC).
//! \~russian Преобразует структуру Windows FILETIME в PISystemTime. FILETIME - это 64-битное значение, представляющее количество интервалов
//! по 100 наносекунд с 1 января 1601 года (UTC).
inline PISystemTime FILETIME2PISystemTime(const FILETIME & t) {
PISystemTime st;
ullong lt = ullong(t.dwHighDateTime) * 0x100000000U + ullong(t.dwLowDateTime);
@@ -42,6 +56,13 @@ inline PISystemTime FILETIME2PISystemTime(const FILETIME & t) {
}
//! \~english Converts SYSTEMTIME to PIDateTime.
//! \~russian Преобразует SYSTEMTIME в PIDateTime.
//! \details
//! \~english Converts Windows SYSTEMTIME structure to PIDateTime. SYSTEMTIME represents a date and time using individual members for month,
//! day, year, etc.
//! \~russian Преобразует структуру Windows SYSTEMTIME в PIDateTime. SYSTEMTIME представляет дату и время с помощью отдельных членов для
//! месяца, дня, года и т.д.
inline PIDateTime SYSTEMTIME2PIDateTime(const SYSTEMTIME & t) {
PIDateTime dt;
dt.year = t.wYear;
@@ -54,6 +75,13 @@ inline PIDateTime SYSTEMTIME2PIDateTime(const SYSTEMTIME & t) {
return dt;
}
//! \~english Converts FILETIME to PIDateTime.
//! \~russian Преобразует FILETIME в PIDateTime.
//! \details
//! \~english Converts Windows FILETIME to PIDateTime. The FILETIME is first converted to local time, then to SYSTEMTIME, and finally to
//! PIDateTime.
//! \~russian Преобразует Windows FILETIME в PIDateTime. Сначала FILETIME преобразуется в местное время, затем в SYSTEMTIME и наконец в
//! PIDateTime.
inline PIDateTime FILETIME2PIDateTime(const FILETIME & t) {
FILETIME lt;
SYSTEMTIME st;
@@ -62,6 +90,11 @@ inline PIDateTime FILETIME2PIDateTime(const FILETIME & t) {
return SYSTEMTIME2PIDateTime(st);
}
//! \~english Converts PIDateTime to SYSTEMTIME.
//! \~russian Преобразует PIDateTime в SYSTEMTIME.
//! \details
//! \~english Converts PIDateTime to Windows SYSTEMTIME structure.
//! \~russian Преобразует PIDateTime в структуру Windows SYSTEMTIME.
inline SYSTEMTIME PIDateTime2SYSTEMTIME(const PIDateTime & dt) {
SYSTEMTIME st;
st.wYear = dt.year;
@@ -74,6 +107,13 @@ inline SYSTEMTIME PIDateTime2SYSTEMTIME(const PIDateTime & dt) {
return st;
}
//! \~english Converts PIDateTime to FILETIME.
//! \~russian Преобразует PIDateTime в FILETIME.
//! \details
//! \~english Converts PIDateTime to Windows FILETIME. The PIDateTime is first converted to SYSTEMTIME, then to local FILETIME, and finally
//! to UTC FILETIME.
//! \~russian Преобразует PIDateTime в Windows FILETIME. Сначала PIDateTime преобразуется в SYSTEMTIME, затем в местное FILETIME и наконец в
//! UTC FILETIME.
inline FILETIME PIDateTime2FILETIME(const PIDateTime & dt) {
FILETIME lt, ret;
SYSTEMTIME st = PIDateTime2SYSTEMTIME(dt);
@@ -82,6 +122,7 @@ inline FILETIME PIDateTime2FILETIME(const PIDateTime & dt) {
return ret;
}
//! \}
#endif // WINDOWS
#endif // PITIME_WIN_H