mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-23 21:53:51 +00:00
69e8f9c9db
- renamed imp_client/ to clients/ and ditto for servers/ - renamed imp/ to servers/ - renamed stream/input.h to stream/stream.h - renamed Stream::InputStream to Stream::Stream - updated various tests and makefiles - NOT TESTED YET
30 lines
526 B
C++
30 lines
526 B
C++
#ifndef MANGLE_STREAM_IWRAPPER_H
|
|
#define MANGLE_STREAM_IWRAPPER_H
|
|
|
|
#include "../stream.h"
|
|
#include <assert.h>
|
|
|
|
namespace Mangle {
|
|
namespace Stream {
|
|
|
|
/** A generic wrapper class for a Stream::Stream object.
|
|
|
|
This is used by other implementations.
|
|
*/
|
|
class _SWrapper
|
|
{
|
|
private:
|
|
bool autoDel;
|
|
|
|
protected:
|
|
Stream *inp;
|
|
|
|
public:
|
|
_SWrapper(Stream *_inp, bool _autoDel = false)
|
|
: inp(_inp), autoDel(_autoDel) { assert(inp != NULL); }
|
|
|
|
virtual ~_SWrapper() { if(autoDel) delete inp; }
|
|
};
|
|
|
|
}} // namespaces
|
|
#endif
|