1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Halofreak1990 e7a47c8ed9 Revamped the List class so that it can (properly) handle pointers as well
Added 'ValueTypes' Single and Double
Added some components in the new System::Net namespace
Added the Console class, which can be used to output text to the screen
Updated a bunch of structs to include the IComparable and IEquatable interfaces, and inheritance from Object to allow better interoperability between container classes and other types
Replaced all exception handling code with a report to stdout.txt - this will, I hope, eventually be reversed, but as of yet, there is no support for exceptions.

BEWARE! Even though all libraries correctly compile, you cannot use any class/structure that inherits from a template class, because stupid G++ wants to include exception handling for each template.
2011-11-07 01:29:50 +00:00

62 lines
1.7 KiB
C++

/********************************************************
* Stream.h *
* *
* XFX Stream definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _SYSTEM_IO_STREAM_
#define _SYSTEM_IO_STREAM_
#include <System/Types.h>
#include "Enums.h"
#include <System/Delegates.h>
#include <System/Interfaces.h>
namespace System
{
class WaitHandle;
namespace IO
{
// Provides a generic view of a sequence of bytes.
class Stream : public IDisposable, virtual Object
{
private:
int _asyncActiveCount;
protected:
virtual void Dispose(bool disposing);
public:
virtual bool CanRead();
virtual bool CanSeek();
virtual bool CanTimeOut();
virtual bool CanWrite();
virtual Int64 Length();
Int64 Position;
int ReadTimeOut;
int WriteTimeOut;
static const Stream* Null;
Stream();
virtual ~Stream();
virtual IAsyncResult* BeginRead(byte buffer[], int offset, int count, AsyncCallback callback, Object* state);
virtual IAsyncResult* BeginWrite(byte buffer[], int offset, int count, AsyncCallback callback, Object* state);
virtual void Close();
void Dispose();
virtual int EndRead(IAsyncResult* asyncResult);
virtual void EndWrite(IAsyncResult* asyncResult);
virtual void Flush();
virtual int Read(byte buffer[], int offset, int count);
virtual int ReadByte();
virtual Int64 Seek(Int64 offset, SeekOrigin_t origin);
virtual void SetLength(Int64 value);
virtual void Write(byte buffer[], int offset, int count);
virtual void WriteByte(byte value);
};
}
}
#endif //_SYSTEM_IO_STREAM_