text: /* Generated SBE (Simple Binary Encoding) message codec */
  #ifndef _OMDD_SBE_MODIFYORDER_H_
  #define _OMDD_SBE_MODIFYORDER_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 "GroupSize8Reverse.h"
  #include "GroupSize8.h"
  
  using namespace sbe;
  
  namespace omdd {
  namespace sbe {
  
  class ModifyOrder
  {
  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 ModifyOrder& 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:
  
      ModifyOrder() : m_buffer(nullptr), m_bufferLength(0), m_offset(0) {}
  
      ModifyOrder(char *buffer, const std::uint64_t bufferLength)
      {
          reset(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion());
      }
  
      ModifyOrder(char *buffer, const std::uint64_t bufferLength, const std::uint64_t actingBlockLength, const std::uint64_t actingVersion)
      {
          reset(buffer, 0, bufferLength, actingBlockLength, actingVersion);
      }
  
      ModifyOrder(const ModifyOrder& codec)
      {
          reset(codec);
      }
  
  #if __cplusplus >= 201103L
      ModifyOrder(ModifyOrder&& codec)
      {
          reset(codec);
      }
  
      ModifyOrder& operator=(ModifyOrder&& codec)
      {
          reset(codec);
          return *this;
      }
  
  #endif
  
      ModifyOrder& operator=(const ModifyOrder& codec)
      {
          reset(codec);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
      {
          return (std::uint16_t)28;
      }
  
      static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
      {
          return (std::uint16_t)331;
      }
  
      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;
      }
  
      ModifyOrder &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
      {
          reset(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion());
          return *this;
      }
  
      ModifyOrder &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 orderbookIDId() SBE_NOEXCEPT
      {
          return 101;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderbookIDSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool orderbookIDInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= orderbookIDSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t orderbookIDEncodingOffset() SBE_NOEXCEPT
      {
           return 0;
      }
  
  
      static const char *orderbookIDMetaAttribute(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 orderbookIDNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT32;
      }
  
      static SBE_CONSTEXPR std::uint32_t orderbookIDMinValue() SBE_NOEXCEPT
      {
          return 0;
      }
  
      static SBE_CONSTEXPR std::uint32_t orderbookIDMaxValue() SBE_NOEXCEPT
      {
          return 4294967294;
      }
  
      static SBE_CONSTEXPR std::size_t orderbookIDEncodingLength() SBE_NOEXCEPT
      {
          return 4;
      }
  
      std::uint32_t orderbookID() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_32(*((std::uint32_t *)(m_buffer + m_offset + 0)));
      }
  
      ModifyOrder &orderbookID(const std::uint32_t value)
      {
          *((std::uint32_t *)(m_buffer + m_offset + 0)) = SBE_LITTLE_ENDIAN_ENCODE_32(value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT
      {
          return 102;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool orderIDInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= orderIDSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT
      {
           return 4;
      }
  
  
      static const char *orderIDMetaAttribute(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::uint64_t orderIDNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT64;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT
      {
          return 0x0L;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT
      {
          return 0xfffffffffffffffeL;
      }
  
      static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      std::uint64_t orderID() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_64(*((std::uint64_t *)(m_buffer + m_offset + 4)));
      }
  
      ModifyOrder &orderID(const std::uint64_t value)
      {
          *((std::uint64_t *)(m_buffer + m_offset + 4)) = SBE_LITTLE_ENDIAN_ENCODE_64(value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t priceId() SBE_NOEXCEPT
      {
          return 103;
      }
  
      static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool priceInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= priceSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT
      {
           return 12;
      }
  
  
      static const char *priceMetaAttribute(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::int32_t priceNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_INT32;
      }
  
      static SBE_CONSTEXPR std::int32_t priceMinValue() SBE_NOEXCEPT
      {
          return -2147483647;
      }
  
      static SBE_CONSTEXPR std::int32_t priceMaxValue() SBE_NOEXCEPT
      {
          return 2147483647;
      }
  
      static SBE_CONSTEXPR std::size_t priceEncodingLength() SBE_NOEXCEPT
      {
          return 4;
      }
  
      std::int32_t price() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_32(*((std::int32_t *)(m_buffer + m_offset + 12)));
      }
  
      ModifyOrder &price(const std::int32_t value)
      {
          *((std::int32_t *)(m_buffer + m_offset + 12)) = SBE_LITTLE_ENDIAN_ENCODE_32(value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t quantityId() SBE_NOEXCEPT
      {
          return 104;
      }
  
      static SBE_CONSTEXPR std::uint64_t quantitySinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool quantityInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= quantitySinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t quantityEncodingOffset() SBE_NOEXCEPT
      {
           return 16;
      }
  
  
      static const char *quantityMetaAttribute(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 quantityNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT32;
      }
  
      static SBE_CONSTEXPR std::uint32_t quantityMinValue() SBE_NOEXCEPT
      {
          return 0;
      }
  
      static SBE_CONSTEXPR std::uint32_t quantityMaxValue() SBE_NOEXCEPT
      {
          return 4294967294;
      }
  
      static SBE_CONSTEXPR std::size_t quantityEncodingLength() SBE_NOEXCEPT
      {
          return 4;
      }
  
      std::uint32_t quantity() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_32(*((std::uint32_t *)(m_buffer + m_offset + 16)));
      }
  
      ModifyOrder &quantity(const std::uint32_t value)
      {
          *((std::uint32_t *)(m_buffer + m_offset + 16)) = SBE_LITTLE_ENDIAN_ENCODE_32(value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT
      {
          return 105;
      }
  
      static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool sideInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= sideSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT
      {
           return 20;
      }
  
  
      static const char *sideMetaAttribute(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::uint8_t sideNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT8;
      }
  
      static SBE_CONSTEXPR std::uint8_t sideMinValue() SBE_NOEXCEPT
      {
          return (std::uint8_t)0;
      }
  
      static SBE_CONSTEXPR std::uint8_t sideMaxValue() SBE_NOEXCEPT
      {
          return (std::uint8_t)254;
      }
  
      static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT
      {
          return 1;
      }
  
      std::uint8_t side() const
      {
          return (*((std::uint8_t *)(m_buffer + m_offset + 20)));
      }
  
      ModifyOrder &side(const std::uint8_t value)
      {
          *((std::uint8_t *)(m_buffer + m_offset + 20)) = (value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t filler1Id() SBE_NOEXCEPT
      {
          return 201;
      }
  
      static SBE_CONSTEXPR std::uint64_t filler1SinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool filler1InActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= filler1SinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t filler1EncodingOffset() SBE_NOEXCEPT
      {
           return 21;
      }
  
  
      static const char *filler1MetaAttribute(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 char filler1NullValue() SBE_NOEXCEPT
      {
          return (char)0;
      }
  
      static SBE_CONSTEXPR char filler1MinValue() SBE_NOEXCEPT
      {
          return (char)32;
      }
  
      static SBE_CONSTEXPR char filler1MaxValue() SBE_NOEXCEPT
      {
          return (char)126;
      }
  
      static SBE_CONSTEXPR std::size_t filler1EncodingLength() SBE_NOEXCEPT
      {
          return 1;
      }
  
      char filler1() const
      {
          return (*((char *)(m_buffer + m_offset + 21)));
      }
  
      ModifyOrder &filler1(const char value)
      {
          *((char *)(m_buffer + m_offset + 21)) = (value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t orderTypeId() SBE_NOEXCEPT
      {
          return 106;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderTypeSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool orderTypeInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= orderTypeSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t orderTypeEncodingOffset() SBE_NOEXCEPT
      {
           return 22;
      }
  
  
      static const char *orderTypeMetaAttribute(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::uint16_t orderTypeNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT16;
      }
  
      static SBE_CONSTEXPR std::uint16_t orderTypeMinValue() SBE_NOEXCEPT
      {
          return (std::uint16_t)0;
      }
  
      static SBE_CONSTEXPR std::uint16_t orderTypeMaxValue() SBE_NOEXCEPT
      {
          return (std::uint16_t)65534;
      }
  
      static SBE_CONSTEXPR std::size_t orderTypeEncodingLength() SBE_NOEXCEPT
      {
          return 2;
      }
  
      std::uint16_t orderType() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_16(*((std::uint16_t *)(m_buffer + m_offset + 22)));
      }
  
      ModifyOrder &orderType(const std::uint16_t value)
      {
          *((std::uint16_t *)(m_buffer + m_offset + 22)) = SBE_LITTLE_ENDIAN_ENCODE_16(value);
          return *this;
      }
  
      static SBE_CONSTEXPR std::uint16_t orderBookPositionId() SBE_NOEXCEPT
      {
          return 107;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderBookPositionSinceVersion() SBE_NOEXCEPT
      {
           return 0;
      }
  
      bool orderBookPositionInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= orderBookPositionSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      static SBE_CONSTEXPR std::size_t orderBookPositionEncodingOffset() SBE_NOEXCEPT
      {
           return 24;
      }
  
  
      static const char *orderBookPositionMetaAttribute(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 orderBookPositionNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT32;
      }
  
      static SBE_CONSTEXPR std::uint32_t orderBookPositionMinValue() SBE_NOEXCEPT
      {
          return 0;
      }
  
      static SBE_CONSTEXPR std::uint32_t orderBookPositionMaxValue() SBE_NOEXCEPT
      {
          return 4294967294;
      }
  
      static SBE_CONSTEXPR std::size_t orderBookPositionEncodingLength() SBE_NOEXCEPT
      {
          return 4;
      }
  
      std::uint32_t orderBookPosition() const
      {
          return SBE_LITTLE_ENDIAN_ENCODE_32(*((std::uint32_t *)(m_buffer + m_offset + 24)));
      }
  
      ModifyOrder &orderBookPosition(const std::uint32_t value)
      {
          *((std::uint32_t *)(m_buffer + m_offset + 24)) = SBE_LITTLE_ENDIAN_ENCODE_32(value);
          return *this;
      }
  };
  }
  }
  #endif
  