Skip to content

Commit

Permalink
fixed CSVVisitor to consider selection mask for nested messages
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berger <[email protected]>
  • Loading branch information
chrberger committed Feb 4, 2021
1 parent 058bcad commit ab83b6d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions libcluon/include/cluon/ToCSVVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,16 @@ class LIBCLUON_API ToCSVVisitor {
void visit(uint32_t &id, std::string &&typeName, std::string &&name, T &value) noexcept {
(void)id;
(void)typeName;
constexpr bool IS_NESTED{true};
ToCSVVisitor csvVisitor(name, m_delimiter, m_withHeader, IS_NESTED);
value.accept(csvVisitor);

if (m_fillHeader) {
m_bufferHeader << csvVisitor.m_bufferHeader.str();
if ((0 == m_mask.count(id)) || m_mask[id]) {
constexpr bool IS_NESTED{true};
ToCSVVisitor csvVisitor(name, m_delimiter, m_withHeader, IS_NESTED);
value.accept(csvVisitor);

if (m_fillHeader) {
m_bufferHeader << csvVisitor.m_bufferHeader.str();
}
m_bufferValues << csvVisitor.m_bufferValues.str();
}
m_bufferValues << csvVisitor.m_bufferValues.str();
}

private:
Expand Down

0 comments on commit ab83b6d

Please sign in to comment.