2011-11-07 01:29:50 +00:00
|
|
|
#ifndef _SYSTEM_BOOLEAN_
|
|
|
|
#define _SYSTEM_BOOLEAN_
|
|
|
|
|
|
|
|
#include "Interfaces.h"
|
2011-05-02 17:33:24 +00:00
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
2012-09-28 20:36:02 +00:00
|
|
|
class String;
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
// Represents a Boolean value.
|
2012-09-28 20:36:02 +00:00
|
|
|
struct Boolean : IComparable<Boolean>, IEquatable<Boolean>, virtual Object
|
2011-05-02 17:33:24 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool value;
|
|
|
|
|
|
|
|
public:
|
2012-03-29 22:02:43 +00:00
|
|
|
Boolean(const Boolean &obj);
|
2012-09-28 20:36:02 +00:00
|
|
|
Boolean(const bool &obj);
|
2011-05-02 17:33:24 +00:00
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
static const char* TrueString;
|
|
|
|
static const char* FalseString;
|
2011-05-02 17:33:24 +00:00
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
int CompareTo(const Boolean other) const;
|
|
|
|
bool Equals(const Boolean other) const;
|
2012-09-28 20:36:02 +00:00
|
|
|
int GetType() const;
|
|
|
|
static bool Parse(const String& str);
|
2012-03-29 22:02:43 +00:00
|
|
|
const char* ToString() const;
|
|
|
|
static const char* ToString(bool value);
|
2011-05-02 17:33:24 +00:00
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
bool operator!=(const Boolean right) const;
|
|
|
|
bool operator==(const Boolean right) const;
|
2011-05-02 17:33:24 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_BOOLEAN_
|