Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
LomFileCoder.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_LOGIC_FILES_LOMFILECODER_HPP_
2#define IV_SRC_LOGIC_FILES_LOMFILECODER_HPP_
3
7
8namespace iv::logic::files
9{
10
16{
17public:
23 static iv::logic::files::LomFile readLomFile(std::string_view lomFilePath);
24
31 static bool writeLomFile(const iv::logic::files::LomFile &mainLomFile, std::string_view lomFilePath);
32 static bool writeLomFileToXml(const iv::logic::files::LomFile &mainLomFile, std::string_view xmlFilePath);
33
34private:
35 static void readProperties(const std::shared_ptr<iv::streams::IInputStream> &input, PropertiesLom &propertiesOut);
36 static void readBlocks(const std::shared_ptr<iv::streams::IInputStream> &input, BlocksLom &blocksOut);
37 static void readGraphicInfo(const std::shared_ptr<iv::streams::IInputStream> &input,
38 GraphicsInfoLom &graphicsInfoOut);
39 static void readBlocksEndingProperties(const std::shared_ptr<iv::streams::IInputStream> &input,
40 BlocksLom &blocksOut);
41
42 static void writeProperties(const std::shared_ptr<iv::streams::IOutputStream> &output,
43 const PropertiesLom &properties);
44 static void writeBlocks(const std::shared_ptr<iv::streams::IOutputStream> &output, const BlocksLom &blocks);
45 static void writeGraphicInfo(const std::shared_ptr<iv::streams::IOutputStream> &output,
46 const GraphicsInfoLom &graphicsInfo);
47 static void writeBlocksEndingProperties(const std::shared_ptr<iv::streams::IOutputStream> &output,
48 const BlocksLom &blocks);
49
50 struct Sections
51 {
52 static constexpr std::string_view root {"PlFile"};
53 static constexpr std::string_view properties {"Properties"};
54 static constexpr std::string_view property {"Property"};
55 static constexpr std::string_view blocks {"Blocks"};
56 static constexpr std::string_view block {"Block"};
57 static constexpr std::string_view blockParams {"BlockParams"};
58 static constexpr std::string_view blockParam {"BlockParam"};
59 static constexpr std::string_view parameters {"Parameters"};
60 static constexpr std::string_view parameter {"Parameter"};
61 static constexpr std::string_view graphicInfos {"GraphicInfos"};
62 static constexpr std::string_view graphicInfo {"GraphicInfo"};
63 static constexpr std::string_view graphicToChannels {"GraphicToChannels"};
64 static constexpr std::string_view graphicToChannel {"GraphicToChannel"};
65 };
66 struct Keys
67 {
68 static constexpr std::string_view version {"Version"};
69
70 static constexpr std::string_view numProperties {"NumProperties"};
71 static constexpr std::string_view numBlocks {"NumBlocks"};
72 static constexpr std::string_view numGraphicInfo {"NumGraphicInfo"};
73
74 struct Property
75 {
76 static constexpr std::string_view title {"Title"};
77 static constexpr std::string_view value {"Value"};
78 };
79 struct Block
80 {
81 static constexpr std::string_view size {"Size"};
82 static constexpr std::string_view subtype {"Subtype"};
83 static constexpr std::string_view type {"Type"};
84 static constexpr std::string_view extraSize {"ExtraSize"};
85 static constexpr std::string_view numParams {"NumParams"};
86 static constexpr std::string_view name {"Name"};
87 static constexpr std::string_view order {"Order"};
88 struct Param
89 {
90 static constexpr std::string_view size {"Size"};
91 static constexpr std::string_view type {"Type"};
92 static constexpr std::string_view description {"Description"};
93 static constexpr std::string_view tag {"Tag"};
94 static constexpr std::string_view globalIdOrValue {"GlobalIdOrValue"};
95 static constexpr std::string_view sParamValue {"SParamValue"};
96 };
97 };
99 {
100 static constexpr std::string_view libraryName {"LibraryName"};
101 static constexpr std::string_view numGraphicsInfo {"NumGraphicsInfo"};
103 {
104 static constexpr std::string_view graphicToChannel {"Graphic"};
105 static constexpr std::string_view channel {"Channel"};
106 };
107 };
108 };
109};
110
111}// namespace iv::logic::files
112
113#endif//IV_SRC_LOGIC_FILES_LOMFILECODER_HPP_
Class to encode and decode LOM files.
Definition LomFileCoder.hpp:16
static void readGraphicInfo(const std::shared_ptr< iv::streams::IInputStream > &input, GraphicsInfoLom &graphicsInfoOut)
Definition LomFileCoder.cpp:259
static void writeProperties(const std::shared_ptr< iv::streams::IOutputStream > &output, const PropertiesLom &properties)
Definition LomFileCoder.cpp:297
static void readBlocksEndingProperties(const std::shared_ptr< iv::streams::IInputStream > &input, BlocksLom &blocksOut)
Definition LomFileCoder.cpp:285
static iv::logic::files::LomFile readLomFile(std::string_view lomFilePath)
Read a LOM file.
Definition LomFileCoder.cpp:34
static void writeBlocks(const std::shared_ptr< iv::streams::IOutputStream > &output, const BlocksLom &blocks)
Definition LomFileCoder.cpp:327
static bool writeLomFile(const iv::logic::files::LomFile &mainLomFile, std::string_view lomFilePath)
Write a LOM file.
Definition LomFileCoder.cpp:60
static void writeBlocksEndingProperties(const std::shared_ptr< iv::streams::IOutputStream > &output, const BlocksLom &blocks)
Definition LomFileCoder.cpp:376
static void writeGraphicInfo(const std::shared_ptr< iv::streams::IOutputStream > &output, const GraphicsInfoLom &graphicsInfo)
Definition LomFileCoder.cpp:357
static void readProperties(const std::shared_ptr< iv::streams::IInputStream > &input, PropertiesLom &propertiesOut)
Definition LomFileCoder.cpp:172
static bool writeLomFileToXml(const iv::logic::files::LomFile &mainLomFile, std::string_view xmlFilePath)
Definition LomFileCoder.cpp:85
static void readBlocks(const std::shared_ptr< iv::streams::IInputStream > &input, BlocksLom &blocksOut)
Definition LomFileCoder.cpp:223
Definition LomFileCoder.cpp:13
Definition structs.hpp:77
Definition structs.hpp:96
static constexpr std::string_view sParamValue
Definition LomFileCoder.hpp:95
static constexpr std::string_view description
Definition LomFileCoder.hpp:92
static constexpr std::string_view type
Definition LomFileCoder.hpp:91
static constexpr std::string_view size
Definition LomFileCoder.hpp:90
static constexpr std::string_view globalIdOrValue
Definition LomFileCoder.hpp:94
static constexpr std::string_view tag
Definition LomFileCoder.hpp:93
Definition LomFileCoder.hpp:80
static constexpr std::string_view size
Definition LomFileCoder.hpp:81
static constexpr std::string_view subtype
Definition LomFileCoder.hpp:82
static constexpr std::string_view extraSize
Definition LomFileCoder.hpp:84
static constexpr std::string_view name
Definition LomFileCoder.hpp:86
static constexpr std::string_view numParams
Definition LomFileCoder.hpp:85
static constexpr std::string_view type
Definition LomFileCoder.hpp:83
static constexpr std::string_view order
Definition LomFileCoder.hpp:87
static constexpr std::string_view channel
Definition LomFileCoder.hpp:105
static constexpr std::string_view graphicToChannel
Definition LomFileCoder.hpp:104
static constexpr std::string_view numGraphicsInfo
Definition LomFileCoder.hpp:101
static constexpr std::string_view libraryName
Definition LomFileCoder.hpp:100
static constexpr std::string_view title
Definition LomFileCoder.hpp:76
static constexpr std::string_view value
Definition LomFileCoder.hpp:77
Definition LomFileCoder.hpp:67
static constexpr std::string_view numBlocks
Definition LomFileCoder.hpp:71
static constexpr std::string_view numGraphicInfo
Definition LomFileCoder.hpp:72
static constexpr std::string_view version
Definition LomFileCoder.hpp:68
static constexpr std::string_view numProperties
Definition LomFileCoder.hpp:70
Definition LomFileCoder.hpp:51
static constexpr std::string_view root
Definition LomFileCoder.hpp:52
static constexpr std::string_view blocks
Definition LomFileCoder.hpp:55
static constexpr std::string_view graphicInfos
Definition LomFileCoder.hpp:61
static constexpr std::string_view blockParams
Definition LomFileCoder.hpp:57
static constexpr std::string_view graphicToChannel
Definition LomFileCoder.hpp:64
static constexpr std::string_view block
Definition LomFileCoder.hpp:56
static constexpr std::string_view graphicToChannels
Definition LomFileCoder.hpp:63
static constexpr std::string_view graphicInfo
Definition LomFileCoder.hpp:62
static constexpr std::string_view parameter
Definition LomFileCoder.hpp:60
static constexpr std::string_view parameters
Definition LomFileCoder.hpp:59
static constexpr std::string_view blockParam
Definition LomFileCoder.hpp:58
static constexpr std::string_view properties
Definition LomFileCoder.hpp:53
Main structure of the LOM File. This file contains the structure to write LOM files for modules.
Definition structs.hpp:116
Definition structs.hpp:23