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-03-29 22:02:43 +00:00
|
|
|
// Represents a Boolean value.
|
2011-11-07 01:29:50 +00:00
|
|
|
struct Boolean : public IComparable<Boolean>, public 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);
|
2011-05-02 17:33:24 +00:00
|
|
|
Boolean(const bool &obj); // Copy constructor
|
|
|
|
|
|
|
|
static const char* True;
|
|
|
|
static const char* False;
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
int CompareTo(const Boolean other) const;
|
|
|
|
bool Equals(const Boolean other) const;
|
2011-11-07 01:29:50 +00:00
|
|
|
bool Parse(char* 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!=(bool right) const;
|
|
|
|
bool operator!=(const Boolean right) const;
|
|
|
|
bool operator==(bool right) const;
|
|
|
|
bool operator==(const Boolean right) const;
|
2011-05-02 17:33:24 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_BOOLEAN_
|