2013-06-02 14:32:43 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* UInt16.h *
|
|
|
|
* *
|
|
|
|
* XFX System::UInt16 definition file *
|
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _SYSTEM_UINT16_
|
|
|
|
#define _SYSTEM_UINT16_
|
|
|
|
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
class String;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Represents an unsigned, 16-bit integer.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct UInt16 : IComparable<UInt16>, IEquatable<UInt16>, Object
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
ushort value;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static const ushort MaxValue;
|
|
|
|
static const ushort MinValue;
|
|
|
|
|
|
|
|
UInt16();
|
|
|
|
UInt16(const UInt16 &obj);
|
|
|
|
UInt16(const ushort &obj);
|
|
|
|
|
|
|
|
int CompareTo(const UInt16 other) const;
|
2013-05-31 15:58:00 +02:00
|
|
|
bool Equals(Object const * const obj) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
bool Equals(const UInt16 other) const;
|
|
|
|
int GetHashCode() const;
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
|
|
|
const String ToString() const;
|
|
|
|
static const String ToString(const ushort value);
|
2013-05-05 18:18:41 +02:00
|
|
|
static bool TryParse(const String& str, out ushort* result);
|
|
|
|
|
|
|
|
operator ushort() const;
|
|
|
|
bool operator==(const UInt16& right) const;
|
|
|
|
bool operator!=(const UInt16& right) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_SYSTEM_UINT16_
|