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

41 lines
1.6 KiB
C++

/********************************************************
* Decoder.h *
* *
* XFX Decoder class definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _TEXT_DECODER_
#define _TEXT_DECODER_
#include "../Types.h"
namespace System
{
namespace Text
{
// Converts a sequence of encoded bytes into a set of characters.
class Decoder
{
private:
void CheckArguments(char chars[], int charIndex);
void CheckArguments(byte bytes[], int byteIndex, int byteCount);
void CheckArguments(char* chars, int charCount, byte* bytes, int byteCount);
public:
Decoder();
virtual void Convert(byte* bytes, int byteCount, char* chars, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed);
virtual void Convert(byte bytes[], int byteIndex, int byteCount, char chars[], int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed);
virtual int GetCharCount(byte* bytes, int count, bool flush);
virtual int GetCharCount(byte bytes[], int index, int count);
virtual int GetCharCount(byte bytes[], int index, int count, bool flush);
virtual int GetChars(byte* bytes, int byteCount, char* chars, int charCount, bool flush);
virtual int GetChars(byte bytes[], int byteIndex, int byteCount, char chars[], int charIndex);
virtual int GetChars(byte bytes[], int byteIndex, int byteCount, char chars[], int charIndex, bool flush);
virtual void Reset();
};
}
}
#endif //_TEXT_DECODER_