Echo Writes Code

header.hpp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef CRUCIBLE_BOBA_HEADER_HPP
#define CRUCIBLE_BOBA_HEADER_HPP

#include <cstddef>
#include <cstdint>

namespace crucible::boba::header {
  struct HeaderMetadata final {
    std::uint32_t signature { 0x00000000 };

    std::uint32_t data_size { 0x00000000 };

    std::size_t data_offset { 0 };
  };

  class Header final {
  public:
    explicit Header(HeaderMetadata const &metadata);

    auto get_signature() const -> std::uint32_t;

    auto get_data_size() const -> std::uint32_t;

    auto get_data_offset() const -> std::size_t;

  private:
    HeaderMetadata my_metadata {};
  };
}

#endif // CRUCIBLE_BOBA_HEADER_HPP