mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-03-04 19:27:29 +01:00
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
58 lines
862 B
C++
58 lines
862 B
C++
//
|
|
// MemoryStream.cpp
|
|
//
|
|
// Library: Foundation
|
|
// Package: Streams
|
|
// Module: MemoryStream
|
|
//
|
|
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/MemoryStream.h"
|
|
|
|
|
|
namespace Poco {
|
|
|
|
|
|
MemoryIOS::MemoryIOS(char* pBuffer, std::streamsize bufferSize):
|
|
_buf(pBuffer, bufferSize)
|
|
{
|
|
poco_ios_init(&_buf);
|
|
}
|
|
|
|
|
|
MemoryIOS::~MemoryIOS()
|
|
{
|
|
}
|
|
|
|
|
|
MemoryInputStream::MemoryInputStream(const char* pBuffer, std::streamsize bufferSize):
|
|
MemoryIOS(const_cast<char*>(pBuffer), bufferSize),
|
|
std::istream(&_buf)
|
|
{
|
|
}
|
|
|
|
|
|
MemoryInputStream::~MemoryInputStream()
|
|
{
|
|
}
|
|
|
|
|
|
MemoryOutputStream::MemoryOutputStream(char* pBuffer, std::streamsize bufferSize):
|
|
MemoryIOS(pBuffer, bufferSize),
|
|
std::ostream(&_buf)
|
|
{
|
|
}
|
|
|
|
|
|
MemoryOutputStream::~MemoryOutputStream()
|
|
{
|
|
}
|
|
|
|
|
|
} // namespace Poco
|