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 Функциональность PIBinaryStream для PIIODevice
*/
/*
PIP - Platform Independent Primitives
PIBinaryStream functionality for PIIODevice
Ivan Pelipenko peri4ko@yandex.ru
PIP - Platform Independent Primitives
PIBinaryStream functionality for PIIODevice
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 PIIOSTREAM_H
@@ -38,14 +38,13 @@
//! \~russian Подробнее \ref iostream
class PIP_EXPORT PIIOBinaryStream: public PIBinaryStream<PIIOBinaryStream> {
public:
//! \~english Contructs %PIIOBinaryStream for "device" device
//! \~russian Создает %PIIOBinaryStream для устройства "device"
PIIOBinaryStream(PIIODevice * device = nullptr): dev(device) {}
//! \~english Assign "device" device
//! \~russian Назначает устройство "device"
void setDevice(PIIODevice * device) {dev = device;}
void setDevice(PIIODevice * device) { dev = device; }
bool binaryStreamAppendImp(const void * d, size_t s) {
if (!dev) return false;
@@ -64,7 +63,6 @@ public:
private:
PIIODevice * dev;
};
@@ -74,7 +72,6 @@ private:
//! \~russian Функциональность PITextStream для PIIODevice.
class PIP_EXPORT PIIOTextStream: public PITextStream<PIIOBinaryStream> {
public:
//! \~english Contructs %PIIOTextStream for "device" device
//! \~russian Создает %PIIOTextStream для устройства "device"
PIIOTextStream(PIIODevice * device): PITextStream<PIIOBinaryStream>(&bin_stream), bin_stream(device) {}
@@ -87,8 +84,7 @@ public:
}
~PIIOTextStream() {
if (io_string)
delete io_string;
if (io_string) delete io_string;
}
void setDevice(PIIODevice * device) {
@@ -99,7 +95,6 @@ public:
private:
PIIOString * io_string = nullptr;
PIIOBinaryStream bin_stream;
};