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

@@ -3,24 +3,24 @@
* \brief
* \~english STD convertions for PIString
* \~russian Преобразования в/из STD для строки
*/
*/
/*
PIP - Platform Independent Primitives
STD for PIString
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
PIP - Platform Independent Primitives
STD for PIString
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@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 PISTRING_STD_H
#define PISTRING_STD_H
@@ -28,7 +28,7 @@
#include <string>
#ifdef QNX
typedef std::basic_string<wchar_t> wstring;
typedef std::basic_string<wchar_t> wstring;
#endif
#include "pistringlist.h"
@@ -76,16 +76,15 @@ inline PIString StdWString2PIString(const std::wstring & v) {
#endif
//! \relatesalso PIChar \brief Output operator to \c std::ostream
inline std::ostream & operator <<(std::ostream & s, const PIChar & v) {
inline std::ostream & operator<<(std::ostream & s, const PIChar & v) {
s << v.toCharPtr();
return s;
}
//! \relatesalso PIString \brief Return concatenated string
inline PIString operator +(const PIString & f, const std::string & str) {
inline PIString operator+(const PIString & f, const std::string & str) {
PIString s(f);
s += StdString2PIString(str);
return s;
@@ -93,13 +92,13 @@ inline PIString operator +(const PIString & f, const std::string & str) {
//! \relatesalso PIString \brief Return concatenated string
inline PIString operator +(const std::string & str, const PIString & f) {
inline PIString operator+(const std::string & str, const PIString & f) {
return StdString2PIString(str) + f;
}
//! \relatesalso PIString \brief Output operator to std::ostream (cout)
inline std::ostream & operator <<(std::ostream & s, const PIString & v) {
inline std::ostream & operator<<(std::ostream & s, const PIString & v) {
for (int i = 0; i < v.length(); ++i) {
s << v[i];
}
@@ -108,7 +107,7 @@ inline std::ostream & operator <<(std::ostream & s, const PIString & v) {
//! \relatesalso PIString \brief Input operator from std::istream (cin)
inline std::istream & operator >>(std::istream & s, PIString & v) {
inline std::istream & operator>>(std::istream & s, PIString & v) {
std::string ss;
s >> ss;
v = StdString2PIString(ss);
@@ -117,7 +116,7 @@ inline std::istream & operator >>(std::istream & s, PIString & v) {
//! \relatesalso PIStringList \brief Output operator to std::ostream (cout)
inline std::ostream & operator <<(std::ostream & s, const PIStringList & v) {
inline std::ostream & operator<<(std::ostream & s, const PIStringList & v) {
s << PIChar("{");
for (uint i = 0; i < v.size(); ++i) {
s << PIChar("\"") << v[i] << PIChar("\"");