Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
PlFileCoder.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_LOGIC_FILES_PLFILECODER_HPP_
2#define IV_SRC_LOGIC_FILES_PLFILECODER_HPP_
3
7
8namespace iv::logic::files
9{
10
16{
17public:
23 static iv::logic::files::PlFile readPlFile(std::string_view plFilePath);
24 static iv::logic::files::PlFile readPlFileFromXml(std::string_view plFilePath);
25
32 static bool writePlFile(const iv::logic::files::PlFile &plFile, std::string_view plFilePath);
33 static bool writeXmlPlFile(const iv::logic::files::PlFile &plFile, std::string_view xmlPlFilePath);
34
35private:
36 struct Sections
37 {
38 static constexpr std::string_view root {"PlFile"};
39 static constexpr std::string_view general {"General"};
40 static constexpr std::string_view libraries {"Libraries"};
41 static constexpr std::string_view library {"Library"};
42 static constexpr std::string_view parameters {"Parameters"};
43 static constexpr std::string_view parameter {"Parameter"};
44 static constexpr std::string_view parameterValue {"ParameterValue"};
45 };
46 struct Keys
47 {
48 static constexpr std::string_view version {"Version"};
49 static constexpr std::string_view numLibraries {"NumLibraries"};
50 static constexpr std::string_view numParams {"NumParams"};
51
52 struct Library
53 {
54 static constexpr std::string_view tagName {"TagName"};
55 static constexpr std::string_view numParam {"NumParam"};
56 };
57 struct Parameter
58 {
59 static constexpr std::string_view libraryBlockTagName {"LibraryBlockTagName"};
60 static constexpr std::string_view size {"Size"};
61 static constexpr std::string_view type {"Type"};
62 static constexpr std::string_view externalTag {"ExternalTag"};
63 static constexpr std::string_view externalTag2 {"ExternalTag2"};
64 static constexpr std::string_view tag {"Tag"};
65 static constexpr std::string_view value {"Value"};
66 static constexpr std::string_view blockOrder {"BlockOrder"};
67 static constexpr std::string_view orderInBlock {"OrderInBlock"};
68 static constexpr std::string_view orderInLogic {"OrderInLogic"};
69 static constexpr std::string_view redeableValue {"RedeableValue"};
70 static constexpr std::string_view newRedeableValue {"NewRedeableValue"};
71 };
72 };
73};
74
75}// namespace iv::logic::files
76
77#endif//IV_SRC_LOGIC_FILES_PLFILECODER_HPP_
Class to encode and decode PL files.
Definition PlFileCoder.hpp:16
static bool writePlFile(const iv::logic::files::PlFile &plFile, std::string_view plFilePath)
Write a PL file.
Definition PlFileCoder.cpp:146
static iv::logic::files::PlFile readPlFileFromXml(std::string_view plFilePath)
Definition PlFileCoder.cpp:80
static bool writeXmlPlFile(const iv::logic::files::PlFile &plFile, std::string_view xmlPlFilePath)
Definition PlFileCoder.cpp:179
static iv::logic::files::PlFile readPlFile(std::string_view plFilePath)
Read a PL file.
Definition PlFileCoder.cpp:30
Definition LomFileCoder.cpp:13
static constexpr std::string_view numParam
Definition PlFileCoder.hpp:55
static constexpr std::string_view tagName
Definition PlFileCoder.hpp:54
static constexpr std::string_view orderInLogic
Definition PlFileCoder.hpp:68
static constexpr std::string_view orderInBlock
Definition PlFileCoder.hpp:67
static constexpr std::string_view blockOrder
Definition PlFileCoder.hpp:66
static constexpr std::string_view redeableValue
Definition PlFileCoder.hpp:69
static constexpr std::string_view size
Definition PlFileCoder.hpp:60
static constexpr std::string_view externalTag2
Definition PlFileCoder.hpp:63
static constexpr std::string_view libraryBlockTagName
Definition PlFileCoder.hpp:59
static constexpr std::string_view externalTag
Definition PlFileCoder.hpp:62
static constexpr std::string_view newRedeableValue
Definition PlFileCoder.hpp:70
static constexpr std::string_view tag
Definition PlFileCoder.hpp:64
static constexpr std::string_view type
Definition PlFileCoder.hpp:61
static constexpr std::string_view value
Definition PlFileCoder.hpp:65
Definition PlFileCoder.hpp:47
static constexpr std::string_view version
Definition PlFileCoder.hpp:48
static constexpr std::string_view numParams
Definition PlFileCoder.hpp:50
static constexpr std::string_view numLibraries
Definition PlFileCoder.hpp:49
Definition PlFileCoder.hpp:37
static constexpr std::string_view libraries
Definition PlFileCoder.hpp:40
static constexpr std::string_view parameter
Definition PlFileCoder.hpp:43
static constexpr std::string_view general
Definition PlFileCoder.hpp:39
static constexpr std::string_view library
Definition PlFileCoder.hpp:41
static constexpr std::string_view root
Definition PlFileCoder.hpp:38
static constexpr std::string_view parameters
Definition PlFileCoder.hpp:42
static constexpr std::string_view parameterValue
Definition PlFileCoder.hpp:44
Main structure of the PL file. This file contains the online parameters of the logic.
Definition structs.hpp:170