-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
570 additions
and
203 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Github Actions Build | |
on: [push] | ||
|
||
env: | ||
COMMS_TAG: v5.2.3 | ||
COMMS_TAG: v5.2.4 | ||
|
||
jobs: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
// | ||
// Copyright 2015 - 2018 (C). Alex Robenko. All rights reserved. | ||
// | ||
|
||
// This file is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#include <cassert> | ||
|
||
#include "Bundles.h" | ||
|
||
namespace cc = cc_tools_qt; | ||
|
||
namespace demo | ||
{ | ||
|
||
namespace cc_plugin | ||
{ | ||
|
||
namespace message | ||
{ | ||
|
||
namespace | ||
{ | ||
|
||
using BundlesFields = demo::message::BundlesFields<>; | ||
|
||
QVariantMap createProps_field1_mem1() | ||
{ | ||
using Field = BundlesFields::field1_mem1; | ||
auto props = | ||
cc::property::field::ForField<Field>() | ||
.name("length"); | ||
return props.asMap(); | ||
} | ||
|
||
QVariantMap createProps_field1_mem2() | ||
{ | ||
using Field = BundlesFields::field1_mem2; | ||
auto props = | ||
cc::property::field::ForField<Field>() | ||
.name("str"); | ||
return props.asMap(); | ||
} | ||
|
||
QVariantMap createProps_field1() | ||
{ | ||
using Field = BundlesFields::field1; | ||
auto props = | ||
cc::property::field::ForField<Field>() | ||
.name("field1") | ||
.serialisedHidden() | ||
.add(createProps_field1_mem1()) | ||
.add(createProps_field1_mem2()); | ||
assert(props.members().size() == Field::FieldIdx_numOfValues); | ||
return props.asMap(); | ||
} | ||
|
||
QVariantMap createProps_field2_mem1() | ||
{ | ||
using Field = BundlesFields::field2_mem1; | ||
auto props = | ||
cc::property::field::ForField<Field>() | ||
.name("length"); | ||
return props.asMap(); | ||
} | ||
|
||
QVariantMap createProps_field2_mem2() | ||
{ | ||
using Field = BundlesFields::field2_mem2; | ||
auto props = | ||
cc::property::field::ForField<Field>() | ||
.name("data"); | ||
return props.asMap(); | ||
} | ||
|
||
QVariantMap createProps_field2() | ||
{ | ||
using Field = BundlesFields::field2; | ||
auto props = | ||
cc::property::field::ForField<Field>() | ||
.name("field2") | ||
.serialisedHidden() | ||
.add(createProps_field2_mem1()) | ||
.add(createProps_field2_mem2()); | ||
assert(props.members().size() == Field::FieldIdx_numOfValues); | ||
return props.asMap(); | ||
} | ||
|
||
QVariantList createFieldsProperties() | ||
{ | ||
QVariantList props; | ||
props.append(createProps_field1()); | ||
props.append(createProps_field2()); | ||
|
||
assert(props.size() == Bundles::FieldIdx_numOfValues); | ||
return props; | ||
} | ||
|
||
} // namespace | ||
|
||
Bundles::Bundles() = default; | ||
Bundles::~Bundles() noexcept = default; | ||
|
||
Bundles& Bundles::operator=(const Bundles&) = default; | ||
Bundles& Bundles::operator=(Bundles&&) = default; | ||
|
||
const QVariantList& Bundles::fieldsPropertiesImpl() const | ||
{ | ||
static const auto Props = createFieldsProperties(); | ||
return Props; | ||
} | ||
|
||
} // namespace message | ||
|
||
} // namespace cc_plugin | ||
|
||
} // namespace demo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// Copyright 2015 - 2018 (C). Alex Robenko. All rights reserved. | ||
// | ||
|
||
// This file is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
#pragma once | ||
|
||
#include "cc_tools_qt/cc_tools_qt.h" | ||
#include "demo/message/Bundles.h" | ||
#include "cc_plugin/DemoMessage.h" | ||
|
||
namespace demo | ||
{ | ||
|
||
namespace cc_plugin | ||
{ | ||
|
||
namespace message | ||
{ | ||
|
||
class Bundles : public | ||
cc_tools_qt::ProtocolMessageBase< | ||
demo::message::Bundles<demo::cc_plugin::DemoMessage>, | ||
Bundles> | ||
{ | ||
public: | ||
Bundles(); | ||
Bundles(const Bundles&) = delete; | ||
Bundles(Bundles&&) = delete; | ||
virtual ~Bundles() noexcept; | ||
|
||
Bundles& operator=(const Bundles&); | ||
Bundles& operator=(Bundles&&); | ||
|
||
protected: | ||
virtual const QVariantList& fieldsPropertiesImpl() const override; | ||
}; | ||
|
||
} // namespace message | ||
|
||
} // namespace cc_plugin | ||
|
||
} // namespace demo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.