text: /* Generated SBE (Simple Binary Encoding) message codec */
  #ifndef _OMDC_SBE_SEQUENCERESET_H_
  #define _OMDC_SBE_SEQUENCERESET_H_
  
  #if defined(SBE_HAVE_CMATH)
  /* cmath needed for std::numeric_limits<double>::quiet_NaN() */
  #  include <cmath>
  #  define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
  #  define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
  #else
  /* math.h needed for NAN */
  #  include <math.h>
  #  define SBE_FLOAT_NAN NAN
  #  define SBE_DOUBLE_NAN NAN
  #endif
  
  #if __cplusplus >= 201103L
  #  include <cstdint>
  #  include <string>
  #  include <cstring>
  #endif
  
  #if __cplusplus >= 201103L
  #  define SBE_CONSTEXPR constexpr
  #  define SBE_NOEXCEPT noexcept
  #else
  #  define SBE_CONSTEXPR
  #  define SBE_NOEXCEPT
  #endif
  
  #include <sbe/sbe.h>
  
  #include "MessageHeader.h"
  #include "GroupSize16Reverse.h"
  #include "GroupSize8.h"
  #include "BrokerQueueItem.h"
  #include "GroupSize16.h"
  
  using namespace sbe;
  
  namespace omdc {
  namespace sbe {
  
  class SequenceReset
  {
  private:
      char *m_buffer;
      std::uint64_t m_bufferLength;
      std::uint64_t *m_positionPtr;
      std::uint64_t m_offset;
      std::uint64_t m_position;
      std::uint64_t m_actingBlockLength;
      std::uint64_t m_actingVersion;
  
      inline void reset(
          char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength,
          const std::uint64_t actingBlockLength, const std::uint64_t actingVersion)
      {
          m_buffer = buffer;
          m_offset = offset;
          m_bufferLength = bufferLength;
          m_actingBlockLength = actingBlockLength;
          m_actingVersion = actingVersion;
          m_positionPtr = &m_position;
          position(offset + m_actingBlockLength);
      }
  
      inline void reset(const SequenceReset& codec)
      {
          m_buffer = codec.m_buffer;
          m_offset = codec.m_offset;
          m_bufferLength = codec.m_bufferLength;
          m_actingBlockLength = codec.m_actingBlockLength;
          m_actingVersion = codec.m_actingVersion;
          m_positionPtr = &m_position;
          m_position = codec.m_position;
      }
  
  public:
  
      SequenceReset() : m_buffer(nullptr), m_bufferLength(0), m_offset(0) {}
  
      SequenceReset(char *buffer, const std::uint64_t bufferLength)
      {
          reset(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion());
      }
  
      SequenceReset(char *buffer, const std::uint64_t bufferLength, const std::uint64_t actingBlockLength, const std::uint64_t actingVersion)
      {
          reset(buffer, 0, bufferLength, actingBlockLength, actingVersion);
      }
  
      SequenceReset(const SequenceReset& codec)
      {
          reset(codec);
      }
  
  #if __cplusplus >= 201103L
      SequenceReset(SequenceReset&& codec)
      {
          reset(codec);
      }
  
      SequenceReset& operator=(SequenceReset&& codec)
      {
          reset(codec);
          return *this;
      }
  
  #endif
  
      SequenceReset& operator=(const SequenceReset& codec)
      {
          reset(codec);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
      {
          return (std::uint16_t)4;
      }
  
      static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
      {
          return (std::uint16_t)100;
      }
  
      static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
      {
          return (std::uint16_t)1;
      }
  
      static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
      {
          return (std::uint16_t)1;
      }
  
      static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
      {
          return "4";
      }
  
      std::uint64_t offset() const SBE_NOEXCEPT
      {
          return m_offset;
      }
  
      SequenceReset &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
      {
          reset(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion());
          return *this;
      }
  
      SequenceReset &wrapForDecode(
           char *buffer, const std::uint64_t offset, const std::uint64_t actingBlockLength,
           const std::uint64_t actingVersion, const std::uint64_t bufferLength)
      {
          reset(buffer, offset, bufferLength, actingBlockLength, actingVersion);
          return *this;
      }
  
      std::uint64_t position() const SBE_NOEXCEPT
      {
          return m_position;
      }
  
      void position(const std::uint64_t position)
      {
          if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false))
          {
              throw std::runtime_error("buffer too short [E100]");
          }
          m_position = position;
      }
  
      std::uint64_t encodedLength() const SBE_NOEXCEPT
      {
          return position() - m_offset;
      }
  
      char *buffer() SBE_NOEXCEPT
      {
          return m_buffer;
      }
  
      std::uint64_t bufferLength() const SBE_NOEXCEPT
      {
          return m_bufferLength;
      }
  
      std::uint64_t actingVersion() const SBE_NOEXCEPT
      {
          return m_actingVersion;
      }
  
      static SBE_CONSTEXPR std::uint16_t newSeqNoId() SBE_NOEXCEPT
      {
          return 101;
      }
  
      static SBE_CONSTEXPR std::uint64_t newSeqNoSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool newSeqNoInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= newSeqNoSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t newSeqNoEncodingOffset() SBE_NOEXCEPT
      {
           return 0;
      }
  
  
      static const char *newSeqNoMetaAttribute(const MetaAttribute::Attribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::EPOCH: return "unix";
              case MetaAttribute::TIME_UNIT: return "nanosecond";
              case MetaAttribute::SEMANTIC_TYPE: return "";
              case MetaAttribute::PRESENCE: return "required";
          }
  
          return "";
      }
  
      static SBE_CONSTEXPR std::uint32_t newSeqNoNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT32;
      }
  
      static SBE_CONSTEXPR std::uint32_t newSeqNoMinValue() SBE_NOEXCEPT
      {
          return 0;
      }
  
      static SBE_CONSTEXPR std::uint32_t newSeqNoMaxValue() SBE_NOEXCEPT
      {
          return 4294967294;
      }
  
      static SBE_CONSTEXPR std::size_t newSeqNoEncodingLength() SBE_NOEXCEPT
      {
          return 4;
      }
  
      std::uint32_t newSeqNo() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_32(*((std::uint32_t *)(m_buffer + m_offset + 0)));
      }
  
      SequenceReset &newSeqNo(const std::uint32_t value)
      {
          *((std::uint32_t *)(m_buffer + m_offset + 0)) = SBE_LITTLE_ENDIAN_ENCODE_32(value);
          return *this;
      }
  };
  }
  }
  #endif
  