mirror of
https://github.com/tribes2/engine.git
synced 2026-01-20 11:44:46 +00:00
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
//-----------------------------------------------------------------------------
|
|
// V12 Engine
|
|
//
|
|
// Copyright (c) 2001 GarageGames.Com
|
|
// Portions Copyright (c) 2001 by Sierra Online, Inc.
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef _RESIZESTREAM_H_
|
|
#define _RESIZESTREAM_H_
|
|
|
|
//Includes
|
|
#ifndef _PLATFORM_H_
|
|
#include "Platform/platform.h"
|
|
#endif
|
|
#ifndef _FILTERSTREAM_H_
|
|
#include "Core/filterStream.h"
|
|
#endif
|
|
|
|
class ResizeFilterStream : public FilterStream
|
|
{
|
|
typedef FilterStream Parent;
|
|
|
|
Stream* m_pStream;
|
|
U32 m_startOffset;
|
|
U32 m_streamLen;
|
|
U32 m_currOffset;
|
|
|
|
public:
|
|
ResizeFilterStream();
|
|
~ResizeFilterStream();
|
|
|
|
bool attachStream(Stream* io_pSlaveStream);
|
|
void detachStream();
|
|
Stream* getStream();
|
|
|
|
bool setStreamOffset(const U32 in_startOffset,
|
|
const U32 in_streamLen);
|
|
|
|
// Mandatory overrides.
|
|
protected:
|
|
bool _read(const U32 in_numBytes, void* out_pBuffer);
|
|
public:
|
|
U32 getPosition() const;
|
|
bool setPosition(const U32 in_newPosition);
|
|
|
|
U32 getStreamSize();
|
|
};
|
|
|
|
#endif //_RESIZESTREAM_H_
|