radio/lib/wType/boolean.h
2018-08-05 00:48:17 +03:00

50 lines
1.2 KiB
C++

#ifndef BOOLEAN_H
#define BOOLEAN_H
#include "object.h"
namespace W
{
class Boolean:
public Object
{
public:
Boolean();
explicit Boolean(bool value);
Boolean(const Boolean& original);
~Boolean();
Boolean& operator=(const Boolean& original);
Boolean& operator=(bool original);
StdStr toString() const override;
Object* copy() const override;
size_type length() const override;
size_type size() const override;
objectType getType() const override;
bool operator==(const W::Object & other) const override;
bool operator<(const Boolean& other) const;
bool operator>(const Boolean& other) const;
bool operator<=(const Boolean& other) const;
bool operator>=(const Boolean& other) const;
bool operator==(const Boolean& other) const;
bool operator!=(const Boolean& other) const;
static const objectType type = boolean;
void serialize(ByteArray& out) const override;
void deserialize(ByteArray& in) override;
operator bool() const;
private:
bool data;
};
}
#endif // BOOLEAN_H