41 #if !defined(__CABool_h__)
49 #include "CADebugMacros.h"
50 #include "CAException.h"
65 CABool() : mValue(-1) {}
66 CABool(
bool inValue) : mValue(inValue ? 1 : 0) {}
67 CABool(
const CABool& inValue) : mValue(inValue.mValue) {}
70 CABool& operator=(
bool inValue) { mValue = inValue;
return *
this; }
71 CABool& operator=(
const CABool& inValue) { mValue = inValue.mValue;
return *
this; }
73 operator bool()
const { ThrowIf(mValue == -1, CAException(
'nope'),
"CABool: uninitialized");
return mValue != 0; }
74 bool IsInitialized()
const {
return mValue != -1; }
75 void Uninitialize() { mValue = -1; }