OSNumber
OSNumber wraps an integer value in a C++ object for use in Libkern collections.
Declaration
class OSNumber : OSObjectOverview
OSNumber represents an integer of 8, 16, 32, or 64 bits as a Libkern C++ object. OSNumber objects are mutable: you can add to or set their values.
Use Restrictions
With very few exceptions in the I/O Kit, all Libkern-based C++ classes, functions, and macros are unsafe to use in a primary interrupt context. Consult the I/O Kit documentation related to primary interrupts for more information.
OSNumber provides no concurrency protection; it's up to the usage context to provide any protection necessary. Some portions of the I/O Kit, such as IORegistryEntry, handle synchronization via defined member functions for setting properties.
Topics
Miscellaneous
addValuefreeinit(const char *, unsigned int)init(unsigned long long, unsigned int)isEqualTo(const OSMetaClassBase *)isEqualTo(const OSNumber *)numberOfBitsnumberOfBytesserializesetValueunsigned16BitValueunsigned32BitValueunsigned64BitValueunsigned8BitValuewithNumber(const char *, unsigned int)withNumber(unsigned long long, unsigned int)
Instance Methods
addValuefreegetMetaClassinitinitisEqualToisEqualTonumberOfBitsnumberOfBytesserializesetValueunsigned16BitValueunsigned32BitValueunsigned64BitValueunsigned8BitValue