mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +00:00
Refactor ScitForecastDataPacket to ScitDataPacket
This commit is contained in:
parent
3b110516ed
commit
d92c1e50f2
6 changed files with 128 additions and 137 deletions
43
wxdata/include/scwx/wsr88d/rpg/scit_data_packet.hpp
Normal file
43
wxdata/include/scwx/wsr88d/rpg/scit_data_packet.hpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/wsr88d/rpg/special_graphic_symbol_packet.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace wsr88d
|
||||
{
|
||||
namespace rpg
|
||||
{
|
||||
|
||||
class ScitDataPacket : public SpecialGraphicSymbolPacket
|
||||
{
|
||||
public:
|
||||
explicit ScitDataPacket();
|
||||
~ScitDataPacket();
|
||||
|
||||
ScitDataPacket(const ScitDataPacket&) = delete;
|
||||
ScitDataPacket& operator=(const ScitDataPacket&) = delete;
|
||||
|
||||
ScitDataPacket(ScitDataPacket&&) noexcept;
|
||||
ScitDataPacket& operator=(ScitDataPacket&&) noexcept;
|
||||
|
||||
const std::vector<std::uint8_t>& data() const;
|
||||
|
||||
std::size_t RecordCount() const override;
|
||||
|
||||
static std::shared_ptr<ScitDataPacket> Create(std::istream& is);
|
||||
|
||||
protected:
|
||||
bool ParseData(std::istream& is) override;
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace rpg
|
||||
} // namespace wsr88d
|
||||
} // namespace scwx
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/wsr88d/rpg/special_graphic_symbol_packet.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace wsr88d
|
||||
{
|
||||
namespace rpg
|
||||
{
|
||||
|
||||
class ScitForecastDataPacketImpl;
|
||||
|
||||
class ScitForecastDataPacket : public SpecialGraphicSymbolPacket
|
||||
{
|
||||
public:
|
||||
explicit ScitForecastDataPacket();
|
||||
~ScitForecastDataPacket();
|
||||
|
||||
ScitForecastDataPacket(const ScitForecastDataPacket&) = delete;
|
||||
ScitForecastDataPacket& operator=(const ScitForecastDataPacket&) = delete;
|
||||
|
||||
ScitForecastDataPacket(ScitForecastDataPacket&&) noexcept;
|
||||
ScitForecastDataPacket& operator=(ScitForecastDataPacket&&) noexcept;
|
||||
|
||||
const std::vector<uint8_t>& data() const;
|
||||
|
||||
size_t RecordCount() const override;
|
||||
|
||||
static std::shared_ptr<ScitForecastDataPacket> Create(std::istream& is);
|
||||
|
||||
protected:
|
||||
bool ParseData(std::istream& is) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<ScitForecastDataPacketImpl> p;
|
||||
};
|
||||
|
||||
} // namespace rpg
|
||||
} // namespace wsr88d
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue