Vector BLF

Loading...
Searching...
No Matches
DistributedObjectMember.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 <vector>
10
11#include <Vector/BLF/AbstractFile.h>
12#include <Vector/BLF/ObjectHeader.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16 namespace Vector {
17 namespace BLF {
18
20 struct VECTOR_BLF_EXPORT DistributedObjectMember final : ObjectHeader {
21 DistributedObjectMember();
22
23 void read(AbstractFile & is) override;
24 void write(AbstractFile & os) override;
25 uint32_t calculateObjectSize() const override;
26
28 enum MemberType : uint32_t {
29 MemberTypeInvalid = 0,
30 MemberTypeData = 1,
31 MemberTypeMethod = 2,
32 MemberTypeField = 3,
33 MemberTypeEvent = 4,
34 MemberTypeRefMember = 5,
35 MemberTypeRefObject = 6,
36 MemberTypeBindingError = 7
37 };
38
40 enum DetailType : uint32_t {
41 DetailTypeInvalid = 0,
42 DetailTypeValue = 1,
43 DetailTypeFunctionCall = 2,
44 DetailTypeFunctionReturn = 3,
45 DetailTypeFunctionDefaults = 4,
46 DetailTypeSubscriptionState = 5,
47 DetailTypeAnnouncementState = 6,
48 DetailTypeReferencePath = 7,
49 DetailTypeBindingError = 8
50 };
51
52 /* static */
53
55 uint32_t memberType {MemberType::MemberTypeInvalid};
56
58 uint32_t detailType {DetailType::DetailTypeInvalid};
59
61 uint32_t pathLength;
62
64 uint32_t dataLength;
65
66 /* dynamic */
67
69 std::string path;
70
72 std::vector<uint8_t> data;
73};
74
75}
76}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::DistributedObjectMember::read
void read(AbstractFile &is) override
Definition DistributedObjectMember.cpp:14
Vector::BLF::DistributedObjectMember::memberType
uint32_t memberType
type of the distributed object member
Definition DistributedObjectMember.h:55
Vector::BLF::DistributedObjectMember::write
void write(AbstractFile &os) override
Definition DistributedObjectMember.cpp:26
Vector::BLF::DistributedObjectMember::pathLength
uint32_t pathLength
length of variable name in bytes
Definition DistributedObjectMember.h:61
Vector::BLF::DistributedObjectMember::MemberType
MemberType
type of the distributed object member
Definition DistributedObjectMember.h:28
Vector::BLF::DistributedObjectMember::MemberTypeRefMember
@ MemberTypeRefMember
Definition DistributedObjectMember.h:34
Vector::BLF::DistributedObjectMember::MemberTypeData
@ MemberTypeData
Definition DistributedObjectMember.h:30
Vector::BLF::DistributedObjectMember::MemberTypeEvent
@ MemberTypeEvent
Definition DistributedObjectMember.h:33
Vector::BLF::DistributedObjectMember::MemberTypeBindingError
@ MemberTypeBindingError
Definition DistributedObjectMember.h:36
Vector::BLF::DistributedObjectMember::MemberTypeMethod
@ MemberTypeMethod
Definition DistributedObjectMember.h:31
Vector::BLF::DistributedObjectMember::MemberTypeRefObject
@ MemberTypeRefObject
Definition DistributedObjectMember.h:35
Vector::BLF::DistributedObjectMember::MemberTypeField
@ MemberTypeField
Definition DistributedObjectMember.h:32
Vector::BLF::DistributedObjectMember::MemberTypeInvalid
@ MemberTypeInvalid
Definition DistributedObjectMember.h:29
Vector::BLF::DistributedObjectMember::detailType
uint32_t detailType
detail type of the distributed object
Definition DistributedObjectMember.h:58
Vector::BLF::DistributedObjectMember::path
std::string path
path of the distributed object member
Definition DistributedObjectMember.h:69
Vector::BLF::DistributedObjectMember::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition DistributedObjectMember.cpp:40
Vector::BLF::DistributedObjectMember::data
std::vector< uint8_t > data
variable data
Definition DistributedObjectMember.h:72
Vector::BLF::DistributedObjectMember::DetailType
DetailType
detail type of the distributed object
Definition DistributedObjectMember.h:40
Vector::BLF::DistributedObjectMember::DetailTypeSubscriptionState
@ DetailTypeSubscriptionState
Definition DistributedObjectMember.h:46
Vector::BLF::DistributedObjectMember::DetailTypeInvalid
@ DetailTypeInvalid
Definition DistributedObjectMember.h:41
Vector::BLF::DistributedObjectMember::DetailTypeAnnouncementState
@ DetailTypeAnnouncementState
Definition DistributedObjectMember.h:47
Vector::BLF::DistributedObjectMember::DetailTypeValue
@ DetailTypeValue
Definition DistributedObjectMember.h:42
Vector::BLF::DistributedObjectMember::DetailTypeFunctionCall
@ DetailTypeFunctionCall
Definition DistributedObjectMember.h:43
Vector::BLF::DistributedObjectMember::DetailTypeReferencePath
@ DetailTypeReferencePath
Definition DistributedObjectMember.h:48
Vector::BLF::DistributedObjectMember::DetailTypeFunctionDefaults
@ DetailTypeFunctionDefaults
Definition DistributedObjectMember.h:45
Vector::BLF::DistributedObjectMember::DetailTypeBindingError
@ DetailTypeBindingError
Definition DistributedObjectMember.h:49
Vector::BLF::DistributedObjectMember::DetailTypeFunctionReturn
@ DetailTypeFunctionReturn
Definition DistributedObjectMember.h:44
Vector::BLF::DistributedObjectMember::dataLength
uint32_t dataLength
length of variable data in bytes
Definition DistributedObjectMember.h:64