Skip to content

Commit

Permalink
Release v6.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Nov 20, 2023
2 parents 2ca2196 + 2433037 commit 7a79211
Show file tree
Hide file tree
Showing 40 changed files with 142 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ configuration:

environment:
COMMS_BRANCH: v5.2.1
CC_TOOLS_QT_BRANCH: v4.2.1
CC_TOOLS_QT_BRANCH: v4.2.3
matrix:
- CPP_STD: 11
- CPP_STD: 14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

env:
COMMS_BRANCH: v5.2.1
CC_TOOLS_QT_BRANCH: v4.2.1
CC_TOOLS_QT_BRANCH: v4.2.3

jobs:
build_gcc_old_ubuntu_20_04:
Expand Down
15 changes: 5 additions & 10 deletions app/commsdsl2comms/src/CommsBitfieldField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ std::string CommsBitfieldField::commsValueAccessStrImpl(const std::string& accSt
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return strings::unexpectedValueStr();
}
Expand All @@ -218,8 +217,7 @@ std::string CommsBitfieldField::commsSizeAccessStrImpl(const std::string& accStr
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return strings::unexpectedValueStr();
}
Expand All @@ -237,8 +235,7 @@ void CommsBitfieldField::commsCompOptChecksImpl(const std::string& accStr, Strin
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return;
}
Expand All @@ -255,8 +252,7 @@ std::string CommsBitfieldField::commsCompValueCastTypeImpl(const std::string& ac
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return strings::unexpectedValueStr();
}
Expand All @@ -274,8 +270,7 @@ std::string CommsBitfieldField::commsCompPrepValueStrImpl(const std::string& acc
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return value;
}
Expand Down
15 changes: 5 additions & 10 deletions app/commsdsl2comms/src/CommsBundleField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ std::string CommsBundleField::commsValueAccessStrImpl(const std::string& accStr,
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return strings::unexpectedValueStr();
}
Expand All @@ -429,8 +428,7 @@ std::string CommsBundleField::commsSizeAccessStrImpl(const std::string& accStr,
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return strings::unexpectedValueStr();
}
Expand All @@ -448,8 +446,7 @@ void CommsBundleField::commsCompOptChecksImpl(const std::string& accStr, Strings
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return;
}
Expand All @@ -466,8 +463,7 @@ std::string CommsBundleField::commsCompValueCastTypeImpl(const std::string& accS
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return strings::unexpectedValueStr();
}
Expand All @@ -485,8 +481,7 @@ std::string CommsBundleField::commsCompPrepValueStrImpl(const std::string& accSt
auto memInfo = parseMemRefInternal(accStr);

if (memInfo.first == nullptr) {
static const bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static const bool Should_not_happen = false;
assert(Should_not_happen);
return value;
}
Expand Down
6 changes: 2 additions & 4 deletions app/commsdsl2comms/src/CommsChecksumLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ CommsChecksumLayer::IncludesList CommsChecksumLayer::commsDefIncludesImpl() cons

auto idx = static_cast<std::size_t>(obj.alg());
if (ChecksumMapSize <= idx) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
idx = 0U;
}
Expand Down Expand Up @@ -136,8 +135,7 @@ std::string CommsChecksumLayer::commsDefAlgInternal() const
auto idx = static_cast<std::size_t>(alg);

if (ClassMapSize <= idx) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
idx = 0U;
}
Expand Down
25 changes: 25 additions & 0 deletions app/commsdsl2comms/src/CommsCustomLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,29 @@ bool CommsCustomLayer::commsIsCustomizableImpl() const
return true;
}

CommsCustomLayer::StringsList CommsCustomLayer::commsExtraBareMetalDefaultOptionsImpl() const
{
if (commsDefHasInputMessagesImpl()) {
return
StringsList{
"comms::option::app::InPlaceAllocation"
};
}

return CommsBase::commsExtraBareMetalDefaultOptionsImpl();
}

CommsCustomLayer::StringsList CommsCustomLayer::commsExtraMsgFactoryDefaultOptionsImpl() const
{
if (commsDefHasInputMessagesImpl()) {
return
StringsList{
"comms::option::app::MsgFactoryTempl<MsgFactory>"
};
}

return CommsBase::commsExtraMsgFactoryDefaultOptionsImpl();
}


} // namespace commsdsl2comms
2 changes: 2 additions & 0 deletions app/commsdsl2comms/src/CommsCustomLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class CommsCustomLayer final : public commsdsl::gen::CustomLayer, public CommsLa
virtual std::string commsDefBaseTypeImpl(const std::string& prevName) const override;
virtual bool commsDefHasInputMessagesImpl() const override;
virtual bool commsIsCustomizableImpl() const override;
virtual StringsList commsExtraBareMetalDefaultOptionsImpl() const override;
virtual StringsList commsExtraMsgFactoryDefaultOptionsImpl() const override;

private:

Expand Down
6 changes: 2 additions & 4 deletions app/commsdsl2comms/src/CommsDataField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ std::string CommsDataField::commsDefBundledReadPrepareFuncBodyImpl(const CommsFi
});

if (iter == siblings.end()) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return strings::emptyString();
}
Expand Down Expand Up @@ -273,8 +272,7 @@ std::string CommsDataField::commsDefBundledRefreshFuncBodyImpl(const CommsFields
});

if (iter == siblings.end()) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return strings::emptyString();
}
Expand Down
12 changes: 4 additions & 8 deletions app/commsdsl2comms/src/CommsEnumField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ commsdsl::gen::util::StringsList CommsEnumField::commsEnumValues() const
for (auto& v : revValues) {
auto iter = values.find(*v.second);
if (iter == values.end()) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
continue;
}
Expand Down Expand Up @@ -513,16 +512,14 @@ std::string CommsEnumField::commsCompPrepValueStrImpl(const std::string& accStr,

auto lastDot = value.find_last_of(".");
if (lastDot == std::string::npos) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return CommsBase::commsCompPrepValueStrImpl(accStr, value);
}

auto* otherEnum = generator().findField(std::string(value, 0, lastDot));
if ((otherEnum == nullptr) || (otherEnum->dslObj().kind() != commsdsl::parse::Field::Kind::Enum)) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return CommsBase::commsCompPrepValueStrImpl(accStr, value);
}
Expand All @@ -531,8 +528,7 @@ std::string CommsEnumField::commsCompPrepValueStrImpl(const std::string& accStr,
auto& otherValues = castedOtherEnum.enumDslObj().values();
auto otherIter = otherValues.find(std::string(value, lastDot + 1));
if (otherIter == otherValues.end()) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return CommsBase::commsCompPrepValueStrImpl(accStr, value);
}
Expand Down
38 changes: 19 additions & 19 deletions app/commsdsl2comms/src/CommsField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,25 @@ const CommsField* CommsField::commsFindSibling(const std::string& name) const
return nullptr;
}

bool CommsField::commsIsFieldCustomizable() const
{
auto& generator = static_cast<CommsGenerator&>(m_field.generator());
auto level = generator.commsGetCustomizationLevel();
if (level == CommsGenerator::CustomizationLevel::Full) {
return true;
}

if (m_field.dslObj().isCustomizable()) {
return true;
}

if (level == CommsGenerator::CustomizationLevel::None) {
return false;
}

return commsIsLimitedCustomizableImpl();
}

CommsField::IncludesList CommsField::commsCommonIncludesImpl() const
{
return IncludesList();
Expand Down Expand Up @@ -808,25 +827,6 @@ void CommsField::commsAddFieldTypeOption(commsdsl::gen::util::StringsList& opts)
util::addToStrList(util::processTemplate(Templ, repl), opts);
}

bool CommsField::commsIsFieldCustomizable() const
{
auto& generator = static_cast<CommsGenerator&>(m_field.generator());
auto level = generator.commsGetCustomizationLevel();
if (level == CommsGenerator::CustomizationLevel::Full) {
return true;
}

if (m_field.dslObj().isCustomizable()) {
return true;
}

if (level == CommsGenerator::CustomizationLevel::None) {
return false;
}

return commsIsLimitedCustomizableImpl();
}

bool CommsField::commsIsExtended() const
{
return !m_customCode.m_extend.empty();
Expand Down
3 changes: 2 additions & 1 deletion app/commsdsl2comms/src/CommsField.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ class CommsField
bool commsHasCustomLength(bool deepCheck = true) const;
const CommsField* commsFindSibling(const std::string& name) const;

bool commsIsFieldCustomizable() const;

protected:
virtual IncludesList commsCommonIncludesImpl() const;
virtual std::string commsCommonCodeBaseClassImpl() const;
Expand Down Expand Up @@ -138,7 +140,6 @@ class CommsField
std::string commsFieldBaseParams(commsdsl::parse::Endian endian) const;
void commsAddFieldDefOptions(commsdsl::gen::util::StringsList& opts) const;
void commsAddFieldTypeOption(commsdsl::gen::util::StringsList& opts) const;
bool commsIsFieldCustomizable() const;
bool commsIsExtended() const;

private:
Expand Down
3 changes: 1 addition & 2 deletions app/commsdsl2comms/src/CommsIntField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,7 @@ void CommsIntField::commsAddScalingOptInternal(StringsList& opts) const
}

if ((num == 0) || (denom == 0)) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return;
}
Expand Down
6 changes: 2 additions & 4 deletions app/commsdsl2comms/src/CommsListField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ std::string CommsListField::commsDefBundledReadPrepareFuncBodyImpl(const CommsFi
});

if (iter == siblings.end()) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return;
}
Expand Down Expand Up @@ -355,8 +354,7 @@ std::string CommsListField::commsDefBundledRefreshFuncBodyImpl(const CommsFields
});

if (iter == siblings.end()) {
static constexpr bool Should_not_happen = false;
static_cast<void>(Should_not_happen);
[[maybe_unused]] static constexpr bool Should_not_happen = false;
assert(Should_not_happen);
return;
}
Expand Down
Loading

0 comments on commit 7a79211

Please sign in to comment.