ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
OSSymbol |
Inherits from: | |
Declared In: |
A container class whose instances represent unique string values.
An OSSymbol object represents a unique string value. When creating an OSSymbol, a string is given and an OSSymbol representing this string is created if none already exist for this string. If an OSSymbol for this string already exists, then a reference to the existing OSSymbol is returned.
Synchronizes with the symbol pool (overridden super class release method).
Tests the equality between an OSSymbol object and an arbitrary OSObject-derived object.
Tests the equality between an OSSymbol object and a simple C string.
Tests the equality between two OSSymbol objects.
Releases a tag.
Synchronizes with the symbol pool (overridden super class release method).
Creates an OSSymbol instance from a simple C string or returns an existing OSSymbol object based on the string given.
Creates an OSSymbol instance from a simple C string, but does not copy the string to the container.
Creates an OSSymbol instance from an OSString object or returns an existing OSSymbol object based on the OSString object given.
free |
Synchronizes with the symbol pool (overridden super class release method).
protected
virtual void free();
When we release an OSSymbol, we need to synchronize the destruction of the object with any potential searches that may be occurring through the family factor methods. See OSObject::free.
isEqualTo |
Tests the equality between an OSSymbol object and an arbitrary OSObject-derived object.
public
virtual bool isEqualTo( const OSMetaClassBase *obj) const;
obj
The OSObject-derived object to be compared against the receiver.
Returns true if the OSSymbol and the OSObject objects are equivalent.
isEqualTo(const char *) |
Tests the equality between an OSSymbol object and a simple C string.
public
virtual bool isEqualTo( const char *aCString) const;
aCString
The C string to be compared against the receiver.
Returns true if the OSSymbol's internal string representation is equivalent to the C string it is being compared against, false otherwise.
isEqualTo(const OSSymbol *) |
Tests the equality between two OSSymbol objects.
public
virtual bool isEqualTo( const OSSymbol *aSymbol) const;
aSymbol
The OSSymbol object to be compared against the receiver.
Returns true if the two objects are equivalent, false otherwise.
Note that two OSSymbol objects are only equivalent when their references are identical.
taggedRelease(const void *) |
Releases a tag.
public
virtual void taggedRelease( const void *tag) const;
It was necessary to override this method even though it was implemented as { super::taggedRelease(tag) }. It seems that C++ is confused about the appearance of the protected taggedRelease with 2 args and refuses to only inherit one function. See OSObject::taggedRelease.
taggedRelease(const void *, const int) |
Synchronizes with the symbol pool (overridden super class release method).
protected
virtual void taggedRelease( const void *tag, const int when) const;
When we release an OSSymbol, we need to synchronize the destruction of the object with any potential searches that may be occurring through the family factor methods. See OSObject::taggedRelease.
withCString |
Creates an OSSymbol instance from a simple C string or returns an existing OSSymbol object based on the string given.
public
static const OSSymbol *withCString(const char *cString);
cString
A C string.
Returns a unique OSSymbol object for the string given.
withCStringNoCopy |
Creates an OSSymbol instance from a simple C string, but does not copy the string to the container.
public
static const OSSymbol *withCStringNoCopy(const char *cString);
cString
A C string.
Returns a unique OSSymbol object for the string given.
withString |
Creates an OSSymbol instance from an OSString object or returns an existing OSSymbol object based on the OSString object given.
public
static const OSSymbol *withString(const OSString *aString);
aString
An OSString object.
Returns a unique OSSymbol object for the string given.
reserved |
private
ExpansionData *reserved;
Reserved for future use. (Internal use only)
|
Last Updated: 2008-12-19