|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: Kernel Device Drivers Kernel Framework Reference
|
OSBoolean |
| Inherits from: | |
| Declared In: |
OSBoolean wraps a boolean value in a C++ object for use in Libkern collections.
OSBoolean represents a boolean true/false value
as a Libkern C++ object.
There are only two instances of OSBoolean,
kOSBooleanTrue
and kOSBooleanFalse.
These are shared globally and returned by the instance-creation function
withBoolean.
Thus, you can use pointer comparison
to test whether two OSBoolean objects are equal.
Overridden to prevent deallocation of the shared global instances.
Returns the C++ bool value for the OSBoolean object.
Tests the equality of two OSBoolean objects.
Tests the equality an OSBoolean to an arbitrary object.
Checks whether the OSBoolean object
represents a false bool value.
Checks whether the OSBoolean object
represents a true bool value.
Archives the receiver into the provided OSSerialize object.
Overrides the reference counting mechanism for the shared global instances.
Overrides the reference counting mechanism for the shared global instances.
Returns one of the global instances of OSBoolean.
free |
Overridden to prevent deallocation of the shared global instances.
public
virtual void free();
This function should never be called.
getValue |
Returns the C++ bool value for the OSBoolean object.
public
virtual bool getValue() const;
Returns the C++ bool value of the OSBoolean object.
isEqualTo(const OSBoolean *) |
Tests the equality of two OSBoolean objects.
public
virtual bool isEqualTo( const OSBoolean * aBoolean) const;
aBooleanThe OSBoolean to be compared against the receiver.
true if the OSBoolean objects are equal,
false if not.
Two OSBoolean objects are considered equal if they are the same exact object (pointer equality).
isEqualTo(const OSMetaClassBase *) |
Tests the equality an OSBoolean to an arbitrary object.
public
virtual bool isEqualTo( const OSMetaClassBase * anObject) const;
anObjectAn object to be compared against the receiver.
true if the objects are equal, false if not.
An OSBoolean is considered equal to another object
if that object is derived from OSBoolean
and represents the same C++ bool value.
isFalse |
Checks whether the OSBoolean object
represents a false bool value.
public
virtual bool isFalse() const;
true if the OSBoolean object is false,
true otherwise.
You can also use == against
kOSBooleanFalse.
isTrue |
Checks whether the OSBoolean object
represents a true bool value.
public
virtual bool isTrue() const;
true if the OSBoolean object is true,
false otherwise.
You can also use == against
kOSBooleanTrue.
serialize |
Archives the receiver into the provided OSSerialize object.
public
virtual bool serialize( OSSerialize *serializer) const;
serializerThe OSSerialize object.
true if serialization succeeds, false if not.
taggedRelease |
Overrides the reference counting mechanism for the shared global instances.
protected
virtual void taggedRelease( const void * tag, const int when) const;
tagUnused.
whenUnused.
taggedRetain |
Overrides the reference counting mechanism for the shared global instances.
public
virtual void taggedRetain( const void * tag) const;
tagUnused.
withBoolean |
Returns one of the global instances of OSBoolean.
public
static OSBoolean * withBoolean( bool value);
valueA boolean value.
The global instance of OSBoolean with the boolean value.
This function actually returns either
kOSBooleanTrue or
kOSBooleanFalse,
so that you can always use pointer comparison with OSBoolean objects.
Last Updated: 2009-10-14