code format

This commit is contained in:
2022-12-14 14:13:52 +03:00
parent 430a41fefc
commit c2b8a8d6da
297 changed files with 27331 additions and 24162 deletions

View File

@@ -5,22 +5,22 @@
* \~russian Информация о системе
*/
/*
PIP - Platform Independent Primitives
System information
Ivan Pelipenko peri4ko@yandex.ru
PIP - Platform Independent Primitives
System information
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PISYSTEMINFO_H
@@ -35,13 +35,11 @@
//! \~russian Информация о системе.
class PIP_EXPORT PISystemInfo {
public:
//! \ingroup System
//! \~\brief
//! \~english Mount point information.
//! \~russian Информация о точке монтирования.
struct PIP_EXPORT MountInfo {
//! \~english Absolute path to mount point
//! \~russian Абсолютный путь к точке монтирования
PIString mount_point;
@@ -60,7 +58,7 @@ public:
//! \~english Total space in bytes
//! \~russian Полный объем в байтах
ullong space_all = 0;
ullong space_all = 0;
//! \~english Used space in bytes
//! \~russian Занятый объем в байтах
@@ -72,7 +70,7 @@ public:
//! \~english Is this device is removable
//! \~russian Является ли устройство съёмным
bool removable = false;
bool removable = false;
};
//! \~english Absolute path to "ifconfig" utility
@@ -110,7 +108,7 @@ public:
//! \~english System logical processors count
//! \~russian Количество логических процессоров системы
int processorsCount = 1;
//! \~english Returns all mount points absolute pathes
//! \~russian Возвращает абсолютные пути всех точек монтирования
@@ -127,7 +125,7 @@ public:
//! \~english Returns system unique key hash
//! \~russian Возвращает хэш уникального ключа системы
static uint machineID();
//! \~english Returns singleton of %PISystemInfo
//! \~russian Возвращает синглтон %PISystemInfo
@@ -136,19 +134,17 @@ public:
private:
PISystemInfo() {}
NO_COPY_CLASS(PISystemInfo);
};
//! \relatesalso PICout
//! \~english Output operator to \a PICout
//! \~russian Оператор вывода в \a PICout
inline PICout operator <<(PICout s, const PISystemInfo::MountInfo & v) {
inline PICout operator<<(PICout s, const PISystemInfo::MountInfo & v) {
s.saveAndSetControls(0);
s << "MountInfo(" << v.device << " mounted on \"" << v.mount_point << "\", type " << v.filesystem
<< ", label \"" << v.label << "\", all " << PIString::readableSize(v.space_all)
<< ", used " << PIString::readableSize(v.space_used)
<< ", free " << PIString::readableSize(v.space_free) << ")";
s << "MountInfo(" << v.device << " mounted on \"" << v.mount_point << "\", type " << v.filesystem << ", label \"" << v.label
<< "\", all " << PIString::readableSize(v.space_all) << ", used " << PIString::readableSize(v.space_used) << ", free "
<< PIString::readableSize(v.space_free) << ")";
s.restoreControls();
return s;
}