PIValueTreeConversions text, options

PIVariant fixes
This commit is contained in:
2022-12-04 18:27:54 +03:00
parent 5bb9477b5b
commit b25ecf42fb
8 changed files with 199 additions and 51 deletions

View File

@@ -33,12 +33,24 @@ class PIJSON;
class PIIODevice;
namespace PIValueTreeConversions {
enum Option {
WithAttributes = 0x1,
WithComment = 0x2,
WithType = 0x4,
WithAll = 0xFFFFFF,
Default = WithAll
};
typedef PIFlags<Option> Options;
PIP_EXPORT PIValueTree fromPropertyStorage(const PIPropertyStorage & ps);
PIP_EXPORT PIValueTree fromVariantMap(const PIVariantMap & vm);
PIP_EXPORT PIValueTree fromJSON(const PIJSON & json);
PIP_EXPORT PIValueTree fromText(PIIODevice * device);
PIP_EXPORT PIJSON toJSON(const PIValueTree & root);
PIP_EXPORT PIString toText(const PIValueTree & root);
PIP_EXPORT PIValueTree fromText(const PIString & str);
PIP_EXPORT PIJSON toJSON(const PIValueTree & root, Options options = Default);
PIP_EXPORT PIString toText(const PIValueTree & root, Options options = Default);
}
#endif