Go to the documentation of this file.
39 #ifndef BLOCXX_BOOL_HPP_INCLUDE_GUARD_
40 #define BLOCXX_BOOL_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
56 class BLOCXX_COMMON_API Bool
63 Bool() : m_val(false) {}
68 Bool(
bool val) : m_val(val) {}
73 Bool(
const Bool& arg) : m_val(arg.m_val) {}
79 Bool& operator= (
const Bool& arg) { m_val = arg.m_val;
return *
this; }
86 bool operator== (
const bool arg)
const {
return m_val == arg; }
100 bool operator!= (
const bool arg)
const {
return m_val != arg; }
107 bool operator!= (
const Bool& arg)
const {
return m_val != arg.m_val; }
111 operator bool()
const {
return m_val; }
116 bool operator !()
const {
return !m_val; }
121 String toString()
const;
126 void writeObject(std::streambuf & ostrm)
const;
131 void readObject(std::streambuf & istrm);
138 friend bool operator< (
const Bool& b1,
const Bool& b2)
140 return b1.m_val < b2.m_val;
150 return b1 != b2.
m_val;
157 Bool(
volatile const void*);
158 Bool(
volatile void*);
169 BLOCXX_COMMON_API std::ostream&
operator << (std::ostream& ostrm,
const Bool& arg);
bool operator<(const Array< T > &x, const Array< T > &y)
ostream & operator<<(ostream &ostrm, const Bool &arg)
Insert the string representation of a Bool object into a given stream.
The Bool class is an abstraction for the boolean data type.
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)
bool operator==(const Array< T > &x, const Array< T > &y)
Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.