Clean project structure.
This commit is contained in:
parent
78a4fa99ff
commit
947bf937fd
496 changed files with 206 additions and 137 deletions
35
src/base/core/streams/InputBitStream.cpp
Normal file
35
src/base/core/streams/InputBitStream.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "InputBitStream.h"
|
||||
|
||||
InputBitStream::InputBitStream(std::basic_istream<unsigned char>* stream)
|
||||
: BitStream(),
|
||||
mStream(stream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool InputBitStream::isFinished() const
|
||||
{
|
||||
return mStream->good();
|
||||
}
|
||||
|
||||
std::vector<unsigned char> InputBitStream::peekNextNBytes(unsigned) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::optional<unsigned char> InputBitStream::readNextByte()
|
||||
{
|
||||
if (mStream->good())
|
||||
{
|
||||
return static_cast<unsigned char>(mStream->get());
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
void InputBitStream::writeByte(unsigned char, bool)
|
||||
{
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue