2011-11-07 01:29:50 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* Byte.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX Byte structure definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _SYSTEM_BYTE_
|
|
|
|
|
#define _SYSTEM_BYTE_
|
2011-05-02 17:33:24 +00:00
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
#include "Interfaces.h"
|
2012-09-28 20:36:02 +00:00
|
|
|
|
#include "String.h"
|
2011-11-07 01:29:50 +00:00
|
|
|
|
#include "Object.h"
|
2011-05-02 17:33:24 +00:00
|
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
|
{
|
2011-11-07 01:29:50 +00:00
|
|
|
|
// Represents an 8-bit unsigned integer.
|
2012-09-28 20:36:02 +00:00
|
|
|
|
struct Byte : IComparable<Byte>, IEquatable<Byte>, Object
|
2011-05-02 17:33:24 +00:00
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
byte value;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
static const byte MaxValue;
|
|
|
|
|
static const byte MinValue;
|
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
byte getValue() const;
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
Byte(const Byte &obj);
|
|
|
|
|
Byte(const byte &obj);
|
2011-05-02 17:33:24 +00:00
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
int CompareTo(const Byte other) const;
|
|
|
|
|
bool Equals(const Byte other) const;
|
2012-09-28 20:36:02 +00:00
|
|
|
|
int GetType() const;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
const char* ToString() const;
|
|
|
|
|
static const char* ToString(byte value);
|
2012-09-28 20:36:02 +00:00
|
|
|
|
static bool TryParse(const String& str, out byte result);
|
2011-05-02 17:33:24 +00:00
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
bool operator!=(const Byte right) const;
|
|
|
|
|
bool operator==(const Byte right) const;
|
2011-05-02 17:33:24 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
#endif //_SYSTEM_BYTE_
|