mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-22 09:05:44 +00:00
25 lines
716 B
C++
25 lines
716 B
C++
#pragma once
|
|
|
|
#include <ostream>
|
|
|
|
class AbstractRawDumper
|
|
{
|
|
protected:
|
|
explicit AbstractRawDumper(std::ostream& stream);
|
|
|
|
public:
|
|
virtual ~AbstractRawDumper() = default;
|
|
AbstractRawDumper(const AbstractRawDumper& other) = default;
|
|
AbstractRawDumper(AbstractRawDumper&& other) noexcept = default;
|
|
AbstractRawDumper& operator=(const AbstractRawDumper& other) = delete;
|
|
AbstractRawDumper& operator=(AbstractRawDumper&& other) noexcept = delete;
|
|
|
|
protected:
|
|
size_t OffsetAdd(size_t len);
|
|
size_t OffsetAdd(const std::string& str);
|
|
void Write(const void* ptr, size_t size) const;
|
|
void Write(const std::string& str) const;
|
|
|
|
std::ostream& m_stream;
|
|
size_t m_current_offset;
|
|
}; |