#ifndef ALREADY_INCLUDED_2006_LIBD__BOOLEAN_HH
#define ALREADY_INCLUDED_2006_LIBD__BOOLEAN_HH
#include "libd.hh"
namespace dmp
{
class Boolean : private Single
{
public:
bool v;
rtti_same(Boolean);
private:
Boolean(bool v) : Single(DCODE_BOOLEAN)
{
this->v = v;
}
public:
static ptr<Boolean> ctor()
{
return new Boolean(false);
}
static ptr<Boolean> ctor(bool v)
{
return new Boolean(v);
}
private:
template <class T> friend class ptr;
~Boolean()
{
}
#ifdef DAVINS_IO_ONLINE
friend dmp::Writer& operator << (dmp::Writer& w, Boolean& ba)
{
w << ba.v;
return w;
}
#endif
private:
Boolean(const Boolean&);
Boolean& operator = (const Boolean&);
friend bool operator == (const Boolean& b1, const Boolean& b2)
{
return b1.v == b2.v;
}
friend bool operator != (const Boolean& b1, const Boolean& b2)
{
return b1.v != b2.v;
}
};
}
#endif