Vector BLF

Loading...
Searching...
No Matches
SystemVariable.h
1// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <tobias.lorenz@gmx.net>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Vector/BLF/platform.h>
8
9#include <string>
10#include <vector>
11
12#include <Vector/BLF/AbstractFile.h>
13#include <Vector/BLF/ObjectHeader.h>
14
15#include <Vector/BLF/vector_blf_export.h>
16
17 namespace Vector {
18 namespace BLF {
19
25 struct VECTOR_BLF_EXPORT SystemVariable final : ObjectHeader {
26 SystemVariable();
27
28 void read(AbstractFile & is) override;
29 void write(AbstractFile & os) override;
30 uint32_t calculateObjectSize() const override;
31
33 enum Type : uint32_t {
35 Double = 1,
36
38 Long = 2,
39
41 String = 3,
42
44 DoubleArray = 4,
45
47 LongArray = 5,
48
50 LongLong = 6,
51
53 ByteArray = 7
54 };
55
59 uint32_t type {};
60
64 uint32_t representation {};
65
67 uint64_t reservedSystemVariable1 {};
68
75 uint32_t nameLength {};
76
83 uint32_t dataLength {};
84
86 uint64_t reservedSystemVariable2 {};
87
93 std::string name {};
94
100 std::vector<uint8_t> data {};
101};
102
103}
104}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::SystemVariable::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition SystemVariable.cpp:50
Vector::BLF::SystemVariable::dataLength
uint32_t dataLength
length of variable data in bytes
Definition SystemVariable.h:83
Vector::BLF::SystemVariable::data
std::vector< uint8_t > data
variable data
Definition SystemVariable.h:100
Vector::BLF::SystemVariable::read
void read(AbstractFile &is) override
Definition SystemVariable.cpp:14
Vector::BLF::SystemVariable::representation
uint32_t representation
signed, later perhaps also string codepage
Definition SystemVariable.h:64
Vector::BLF::SystemVariable::reservedSystemVariable2
uint64_t reservedSystemVariable2
Definition SystemVariable.h:86
Vector::BLF::SystemVariable::reservedSystemVariable1
uint64_t reservedSystemVariable1
Definition SystemVariable.h:67
Vector::BLF::SystemVariable::type
uint32_t type
type of system variable
Definition SystemVariable.h:59
Vector::BLF::SystemVariable::Type
Type
Definition SystemVariable.h:33
Vector::BLF::SystemVariable::DoubleArray
@ DoubleArray
Definition SystemVariable.h:44
Vector::BLF::SystemVariable::ByteArray
@ ByteArray
Definition SystemVariable.h:53
Vector::BLF::SystemVariable::LongLong
@ LongLong
Definition SystemVariable.h:50
Vector::BLF::SystemVariable::LongArray
@ LongArray
Definition SystemVariable.h:47
Vector::BLF::SystemVariable::String
@ String
Definition SystemVariable.h:41
Vector::BLF::SystemVariable::Long
@ Long
Definition SystemVariable.h:38
Vector::BLF::SystemVariable::Double
@ Double
Definition SystemVariable.h:35
Vector::BLF::SystemVariable::name
std::string name
variable name in MBCS
Definition SystemVariable.h:93
Vector::BLF::SystemVariable::write
void write(AbstractFile &os) override
Definition SystemVariable.cpp:31
Vector::BLF::SystemVariable::nameLength
uint32_t nameLength
length of variable name in bytes
Definition SystemVariable.h:75