#include <libkern/c++/OSBoolean.h>

libkern/c++/OSBoolean.h Kernel.framework

OSBoolean.cpp created by rsulack on Tue Oct 12 1999
2 variables · 1 typedef · 1 class

typedefOSBooleanPtr

typedef OSBoolean* OSBooleanPtr

classOSBoolean

@class OSBoolean @abstract OSBoolean wraps a boolean value in a C++ object for use in Libkern collections. @discussion OSBoolean represents a boolean <code>true</code>/<code>false</code> value as a Libkern C++ object. There are only two instances of OSBoolean, <code>@link kOSBooleanTrue kOSBooleanTrue@/link</code> and <code>@link kOSBooleanFalse kOSBooleanFalse@/link</code>. These are shared globally and returned by the instance-creation function <code>@link withBoolean withBoolean@/link</code>. Thus, you can use pointer comparison to test whether two OSBoolean objects are equal.
: public OSObject
boolvalue
APPLE_KEXT_OVERRIDE
virtual void taggedRelease(const void * tag, const int when) const
virtual protected
@function taggedRelease @abstract Overrides the reference counting mechanism for the shared global instances. @param tag Unused. @param when Unused.
static void initialize()static
__returns_nonnull_osptr
static OSPtr<OSBoolean> withBoolean(bool value)
static
@function withBoolean @abstract Returns one of the global instances of OSBoolean. @param value A boolean value. @result The global instance of OSBoolean with the boolean <code>value</code>. @discussion This function actually returns either <code>@link kOSBooleanTrue kOSBooleanTrue@/link</code> or <code>@link kOSBooleanFalse kOSBooleanFalse@/link</code>, so that you can always use pointer comparison with OSBoolean objects.
APPLE_KEXT_OVERRIDE
virtual void free()
virtual
@function free @abstract Overridden to prevent deallocation of the shared global instances. @discussion This function should never be called.
APPLE_KEXT_OVERRIDE
virtual void taggedRetain(const void * tag) const
virtual
@function taggedRetain @abstract Overrides the reference counting mechanism for the shared global instances. @param tag Unused.
virtual bool isTrue() constvirtual
@function isTrue @abstract Checks whether the OSBoolean object represents a <code>true</code> <code>bool</code> value. @result <code>true</code> if the OSBoolean object is <code>true</code>, <code>false</code> otherwise. @discussion You can also use <code>==</code> against <code>@link kOSBooleanTrue kOSBooleanTrue@/link</code>.
virtual bool isFalse() constvirtual
@function isFalse @abstract Checks whether the OSBoolean object represents a <code>false</code> <code>bool</code> value. @result <code>true</code> if the OSBoolean object is <code>false</code>, <code>true</code> otherwise. @discussion You can also use <code>==</code> against <code>@link kOSBooleanFalse kOSBooleanFalse@/link</code>.
virtual bool getValue() constvirtual
@function getValue @abstract Returns the C++ <code>bool</code> value for the OSBoolean object. @result Returns the C++ <code>bool</code> value of the OSBoolean object.
virtual bool isEqualTo(const OSBoolean * aBoolean) constvirtual
@function isEqualTo @abstract Tests the equality of two OSBoolean objects. @param aBoolean The OSBoolean to be compared against the receiver. @result <code>true</code> if the OSBoolean objects are equal, <code>false</code> if not. @discussion Two OSBoolean objects are considered equal if they are the same exact object (pointer equality).
APPLE_KEXT_OVERRIDE
virtual bool isEqualTo(const OSMetaClassBase * anObject) const
virtual
@function isEqualTo @abstract Tests the equality an OSBoolean to an arbitrary object. @param anObject An object to be compared against the receiver. @result <code>true</code> if the objects are equal, <code>false</code> if not. @discussion An OSBoolean is considered equal to another object if that object is derived from OSBoolean and represents the same C++ <code>bool</code> value.
APPLE_KEXT_OVERRIDE
virtual bool serialize(OSSerialize * serializer) const
virtual
@function serialize @abstract Archives the receiver into the provided @link //apple_ref/doc/class/OSSerialize OSSerialize@/link object. @param serializer The OSSerialize object. @result <code>true</code> if serialization succeeds, <code>false</code> if not.

variablekOSBooleanTrue

@const kOSBooleanTrue @abstract The OSBoolean constant for <code>true</code>. @discussion kOSBooleanTrue is the OSBoolean constant for <code>true</code>. This object does not need to be retained or released (but it can be). Comparisons of the form <code>booleanObject == kOSBooleanTrue</code> are acceptable and are equivalent to <code>booleanObject->getValue() == true</code>.
extern OSBoolean * const & kOSBooleanTrue

variablekOSBooleanFalse

@const kOSBooleanFalse @abstract The OSBoolean constant for <code>false</code>. @discussion kOSBooleanFalse is the OSBoolean constant for <code>false</code>. This object does not need to be retained or released (but it can be). Comparisons of the form <code>booleanObject == kOSBooleanFalse</code> are acceptable and are equivalent to <code>booleanObject->getValue() == false</code>.
extern OSBoolean * const & kOSBooleanFalse