Skip to content

Commit 97a26fe

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents d85faef + b9c4443 commit 97a26fe

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp/CppGenerator.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,24 @@ private static CharSequence generateGroupProperty(
362362
indent + " {\n" +
363363
indent + " m_%2$s.wrapForEncode(m_buffer, count, m_positionPtr, m_actingVersion, m_bufferLength);\n" +
364364
indent + " return m_%2$s;\n" +
365-
indent + " }\n",
365+
indent + " }\n\n",
366366
className,
367367
propertyName,
368368
cppTypeForNumInGroup
369369
));
370370

371+
sb.append(String.format(
372+
indent + " static SBE_CONSTEXPR const std::uint64_t %1$sSinceVersion(void)\n" +
373+
indent + " {\n" +
374+
indent + " return %2$d;\n" +
375+
indent + " }\n\n" +
376+
indent + " bool %1$sInActingVersion(void)\n" +
377+
indent + " {\n" +
378+
indent + " return m_actingVersion >= %1$sSinceVersion();\n" +
379+
indent + " }\n",
380+
propertyName,
381+
(long)token.version()));
382+
371383
return sb;
372384
}
373385

0 commit comments

Comments
 (0)