Hex.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/encoding/Hex.hpp"

Hex

Utility class for hex string encoding/decoding .

namespace oatpp { namespace encoding { 
  class Hex {}
}}

Fields

Type Name Summary
v_int32 ERROR_UNKNOWN_SYMBOL Unknown symbol error.

Methods

Return Type Name Summary
void writeWord16 Write value as hex string to buffer.
void writeWord32 Write value as hex string to buffer.
v_int32 readWord16 Parse 4-char hex string to int16.
v_int32 readWord32 Parse 8-char hex string to int32.

Hex::ERROR_UNKNOWN_SYMBOL

Unknown symbol error.

static constexpr v_int32 ERROR_UNKNOWN_SYMBOL = 1

Hex::writeWord16

Write value as hex string to buffer.

  • @param value - value to write.
  • @param buffer - buffer for resultant string.

static void writeWord16(v_word16 value, p_char8 buffer)

Hex::writeWord32

Write value as hex string to buffer.

  • @param value - value to write.
  • @param buffer - buffer for resultant string.

static void writeWord32(v_word32 value, p_char8 buffer)

Hex::readWord16

Parse 4-char hex string to int16.

  • @param buffer - buffer containing string to parse.
  • @param value - out parameter. Resultant value.
  • @return - 0 on success. Negative value on failure.

static v_int32 readWord16(p_char8 buffer, v_word16& value)

Hex::readWord32

Parse 8-char hex string to int32.

  • @param buffer - buffer containing string to parse.
  • @param value - out parameter. Resultant value.
  • @return - 0 on success. Negative value on failure.

static v_int32 readWord32(p_char8 buffer, v_word32& value)