more ai generated doc with human review
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
/*! \file pivaluetree_conversions.h
|
||||
* \ingroup Serialization
|
||||
* \addtogroup Serialization
|
||||
* \brief
|
||||
* \~english PIValueTree conversions
|
||||
* \~russian Преобразования PIValueTree
|
||||
* \~english PIValueTree conversion functions
|
||||
* \~russian Функции преобразования PIValueTree
|
||||
* \details
|
||||
* \~english This file provides functions for converting PIValueTree to and from
|
||||
* various formats (JSON, text, property storage).
|
||||
* \~russian Этот файл предоставляет функции для преобразования PIValueTree в различные
|
||||
* форматы (JSON, текст, хранилище свойств) и из них.
|
||||
*/
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
@@ -32,31 +37,65 @@ class PIPropertyStorage;
|
||||
class PIJSON;
|
||||
class PIIODevice;
|
||||
|
||||
//! \~english PIValueTree conversion namespace.
|
||||
//! \~russian Пространство имён преобразований PIValueTree.
|
||||
namespace PIValueTreeConversions {
|
||||
|
||||
//! \~english Conversion options. \~russian Параметры преобразования.
|
||||
enum Option {
|
||||
WithAttributes = 0x1,
|
||||
WithComment = 0x2,
|
||||
WithType = 0x4,
|
||||
WithAll = 0xFFF,
|
||||
IncludeRoot = 0x1000,
|
||||
Default = WithAll
|
||||
WithAttributes = 0x1, //!< \~english Include attributes \~russian Включить атрибуты
|
||||
WithComment = 0x2, //!< \~english Include comments \~russian Включить комментарии
|
||||
WithType = 0x4, //!< \~english Include type information \~russian Включить информацию о типе
|
||||
WithAll = 0xFFF, //!< \~english Include everything \~russian Включить всё
|
||||
IncludeRoot = 0x1000, //!< \~english Include root node \~russian Включить корневой узел
|
||||
Default = WithAll //!< \~english Default options \~russian Параметры по умолчанию
|
||||
};
|
||||
//! \~english Options flags type.
|
||||
//! \~russian Тип флагов параметров.
|
||||
typedef PIFlags<Option> Options;
|
||||
|
||||
//! \~english Convert PIPropertyStorage to PIValueTree.
|
||||
//! \~russian Преобразование PIPropertyStorage в PIValueTree.
|
||||
PIP_EXPORT PIValueTree fromPropertyStorage(const PIPropertyStorage & ps);
|
||||
|
||||
//! \~english Convert PIVariantMap to PIValueTree.
|
||||
//! \~russian Преобразование PIVariantMap в PIValueTree.
|
||||
PIP_EXPORT PIValueTree fromVariantMap(const PIVariantMap & vm);
|
||||
|
||||
//! \~english Convert PIJSON to PIValueTree.
|
||||
//! \~russian Преобразование PIJSON в PIValueTree.
|
||||
PIP_EXPORT PIValueTree fromJSON(const PIJSON & json);
|
||||
|
||||
//! \~english Read PIValueTree from IODevice as text.
|
||||
//! \~russian Чтение PIValueTree из IODevice как текст.
|
||||
PIP_EXPORT PIValueTree fromText(PIIODevice * device);
|
||||
|
||||
//! \~english Parse PIValueTree from text string.
|
||||
//! \~russian Разбор PIValueTree из текстовой строки.
|
||||
PIP_EXPORT PIValueTree fromText(const PIString & str);
|
||||
|
||||
//! \~english Load PIValueTree from JSON file.
|
||||
//! \~russian Загрузка PIValueTree из JSON файла.
|
||||
PIP_EXPORT PIValueTree fromJSONFile(const PIString & path);
|
||||
|
||||
//! \~english Load PIValueTree from text file.
|
||||
//! \~russian Загрузка PIValueTree из текстового файла.
|
||||
PIP_EXPORT PIValueTree fromTextFile(const PIString & path);
|
||||
|
||||
//! \~english Convert PIValueTree to JSON.
|
||||
//! \~russian Преобразование PIValueTree в JSON.
|
||||
PIP_EXPORT PIJSON toJSON(const PIValueTree & root, Options options = Default);
|
||||
|
||||
//! \~english Convert PIValueTree to text.
|
||||
//! \~russian Преобразование PIValueTree в текст.
|
||||
PIP_EXPORT PIString toText(const PIValueTree & root, Options options = Default);
|
||||
|
||||
//! \~english Save PIValueTree to JSON file.
|
||||
//! \~russian Сохранение PIValueTree в JSON файл.
|
||||
PIP_EXPORT bool toJSONFile(const PIString & path, const PIValueTree & root, Options options = Default);
|
||||
|
||||
//! \~english Save PIValueTree to text file.
|
||||
//! \~russian Сохранение PIValueTree в текстовый файл.
|
||||
PIP_EXPORT bool toTextFile(const PIString & path, const PIValueTree & root, Options options = Default);
|
||||
|
||||
} // namespace PIValueTreeConversions
|
||||
|
||||
Reference in New Issue
Block a user