#include <Bool.hpp>
Public Member Functions | |
| Bool () | |
| Create an Bool object initialized to false. | |
| Bool (bool val) | |
| Create an Bool object initialized to a given boolean value. | |
| Bool (const Bool &arg) | |
| Copy constructor. | |
| Bool & | operator= (const Bool &arg) |
| Assignment operator. | |
| bool | operator== (const bool arg) const |
| Equality operator. | |
| bool | operator== (const Bool &arg) const |
| Equality operator. | |
| bool | operator!= (const bool arg) const |
| Inequality operator. | |
| bool | operator!= (const Bool &arg) const |
| Inequality operator. | |
| operator bool () const | |
| bool | operator! () const |
| Negation operator. | |
| String | toString () const |
| void | writeObject (std::streambuf &ostrm) const |
| Write this object to an output stream. | |
| void | readObject (std::streambuf &istrm) |
| Read this object from an input stream. | |
Private Member Functions | |
| Bool (const void *) | |
| Bool (void *) | |
| Bool (volatile const void *) | |
| Bool (volatile void *) | |
Private Attributes | |
| bool | m_val |
Friends | |
| bool | operator< (const Bool &b1, const Bool &b2) |
| Less than operator (friend function). | |
| bool | operator!= (bool b1, Bool b2) |
| Not equal operator (friend function). | |
It's not meant to be a replacement for bool. Use it if you need a type that supports toString(), readObject(), or writeObject(). It's also useful for preventing implicit conversion of char*->bool. Using it can make overloading functions safer (ie it'll be less likely the compiler will pick the wrong overload.)
Definition at line 56 of file Bool.hpp.
| BLOCXX_NAMESPACE::Bool::Bool | ( | ) | [inline] |
| BLOCXX_NAMESPACE::Bool::Bool | ( | bool | val | ) | [inline] |
| BLOCXX_NAMESPACE::Bool::Bool | ( | const Bool & | arg | ) | [inline] |
| BLOCXX_NAMESPACE::Bool::Bool | ( | const void * | ) | [private] |
| BLOCXX_NAMESPACE::Bool::Bool | ( | void * | ) | [private] |
| BLOCXX_NAMESPACE::Bool::Bool | ( | volatile const void * | ) | [private] |
| BLOCXX_NAMESPACE::Bool::Bool | ( | volatile void * | ) | [private] |
| bool BLOCXX_NAMESPACE::Bool::operator== | ( | const bool | arg | ) | const [inline] |
| bool BLOCXX_NAMESPACE::Bool::operator== | ( | const Bool & | arg | ) | const [inline] |
| bool BLOCXX_NAMESPACE::Bool::operator!= | ( | const bool | arg | ) | const [inline] |
| bool BLOCXX_NAMESPACE::Bool::operator!= | ( | const Bool & | arg | ) | const [inline] |
| BLOCXX_NAMESPACE::Bool::operator bool | ( | ) | const [inline] |
| bool BLOCXX_NAMESPACE::Bool::operator! | ( | ) | const [inline] |
| String BLOCXX_NAMESPACE::Bool::toString | ( | ) | const |
Definition at line 71 of file Bool.cpp.
References m_val.
Referenced by BLOCXX_NAMESPACE::StringBuffer::operator+=().
| void BLOCXX_NAMESPACE::Bool::writeObject | ( | std::streambuf & | ostrm | ) | const |
Write this object to an output stream.
| ostrm | The output stream to write this object to. |
Referenced by BLOCXX_NAMESPACE::BinarySerialization::writeBool().
| void BLOCXX_NAMESPACE::Bool::readObject | ( | std::streambuf & | istrm | ) |
Read this object from an input stream.
| istrm | The input stream to read this object from. |
Referenced by BLOCXX_NAMESPACE::BinarySerialization::readBool().
| bool operator!= | ( | bool | b1, | |
| Bool | b2 | |||
| ) | [friend] |
bool BLOCXX_NAMESPACE::Bool::m_val [private] |
Definition at line 159 of file Bool.hpp.
Referenced by operator!=(), operator=(), operator==(), and toString().
1.5.6