1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Tom Lint 52ef14a94b Transition from SVN to Git
Added implicit conversion to base types to all primary types (UInt32 et
al)
Added implicit conversion from System::String to const char*
2013-05-05 18:18:41 +02: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_