Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Tidies up after map enumeration... effectively destroys the enumerator.
Returns the bucket from which the next node in the enumeration will come. Once the next node has been enumerated, you can use the bucket and node to remove the node from the map using the GSIMapRemoveNodeFromMap() function.
Enumerating
Create an return an enumerator
for the specified map.
You must call
GSIMapEndEnumerator()
when you have finished with the enumerator.
WARNING You should not alter a
map while an enumeration is in progress. The
results of doing so are reasonably unpredictable.
Remember, DON'T MESS WITH A MAP WHILE YOU'RE
ENUMERATING IT.
Returns the next node in the map, or a nul pointer if at the end.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Quickly return autoreleased data storage area.
Returns the pointer to the instance variable
structure for the instance variable name
in the specified class. This function searches
the specified class and its superclasses.
It should be safe to use this function in
+load
implementations.
This function should
currently (June 2003) be considered WIP. Please
follow potential changes (Name, parameters,...)
closely until it stabilizes.
Deprecated... use GSObjCFindVariable()
Returns the pointer to the class method
structure for the selector in the specified
class. This function only searches the
specified class and not its
superclasses.
To obtain the
implementation pointer IMP use
returnValue->method_imp which should
be safe across all runtimes.
It should be safe to
use this function in
+load
implementations.
This function should
currently (June 2003) be considered WIP. Please
follow potential changes (Name, parameters,...)
closely until it stabilizes.
Returns the pointer to the instance method structure
for the selector in the specified class. This
function only searches the specified
class and not its superclasses.
To
obtain the implementation pointer IMP use
returnValue->method_imp which should
be safe across all runtimes.
It should be safe to
use this function in
+load
implementations.
This function should
currently (June 2003) be considered WIP. Please
follow potential changes (Name, parameters,...)
closely until it stabilizes.
Deprecated... use GSObjCGetValue()
Deprecated... use GSObjCGetVariable()
Returns a system error message on a variety of systems
A Behavior can be seen as a "Protocol with an implementation" or a "Class without any instance variables". A key feature of behaviors is that they give a degree of multiple inheritance.
Behavior methods, when added to a class, override the class's superclass methods, but not the class's methods.
It's not the case that a class adding behaviors from another class must have "no instance vars". The receiver class just has to have the same layout as the behavior class (optionally with some additional ivars after those of the behavior class).
This function provides Behaviors without adding any new syntax to the Objective C language. Simply define a class with the methods you want to add, then call this function with that class as the behavior argument.
This function should be called in the +initialize method of the receiver.
If you add several behaviors to a class, be aware that the order of the additions is significant.
Description forthcoming.
This function is used to locate information about the
instance variable of obj called
name. It returns YES
if the
variable was found, NO
otherwise. If it
returns YES
, then the values pointed to
by type, size, and offset
will be set (except where they are null pointers).
Returns the pointer to the instance variable
structure for the instance variable name
in the specified class. This function searches
the specified class and its superclasses.
It is not necessarily safe to use this function
in +load
implementations.
This function should
currently (June 2003) be considered WIP. Please
follow potential changes (Name, parameters,...)
closely until it stabilizes.
This is used internally by the key-value coding methods,
to get a value from an object either via an accessor
method (if sel is supplied), or via direct
access (if type, size, and
offset are supplied).
Automatic
conversion between NSNumber and C scalar types is
performed.
If type is null and
can't be determined from the selector, the
[NSObject -handleQueryWithUnboundKey:]
method is called to try to get a value.
Gets the value from an instance variable in
obj
This function performs no
checking... you should use it only where you are
providing information from a call to
GSFindVariable()
and you know that the data area provided is
the correct size.
references:
http://www.macdevcenter.com/pub/a/mac/2002/05/31/runtime_parttwo.html?page=1 http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/9objc_runtime_reference/_Adding_Classes.html http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/9objc_runtime_reference/_Class_Defi__Structures.html ObjcRuntimeUtilities.m by Nicola Pero
Create a Class structure for use by the ObjectiveC runtime and return an NSValue object pointing to it. The class will not be added to the runtime (you must do that later using the GSObjCAddClasses() function).
The iVars dictionary lists the instance variable names and their types.
This method returns an array listing the names of all
the instance methods available to obj, whether
they belong to the class of obj or one of its
superclasses.
If obj is a
class, this returns the class methods.
Returns
nil
if obj is nil
.
This is used internally by the key-value coding methods,
to set a value in an object either via an accessor method
(if sel is supplied), or via direct access (if
type, size, and offset
are supplied).
Automatic conversion between
NSNumber and C scalar types is performed.
If
type is null and can't be determined from
the selector, the
[NSObject -handleTakeValue:forUnboundKey:]
method is called to try to set a value.
Sets the value in an instance variable in obj
This function performs no checking... you
should use it only where you are providing information
from a call to
GSObjCFindVariable()
and you know that the data area provided is
the correct size.
This method returns an array listing the names of all
the instance variables present in the instance
obj, whether they belong to the class of
obj or one of its superclasses.
Returns nil
if obj is
nil
.
Return the zone in which an object belongs, without using the zone method
Prints a message to fptr using the format string provided and any additional arguments. The format string is interpreted as by the NSString formatted initialisers, and understands the '%@' syntax for printing an object.
The data is written to the file pointer in the default CString encoding if possible, as a UTF8 string otherwise.
This function is recommended for printing general log messages. For debug messages use NSDebugLog() and friends. For error logging use NSLog() , and for warnings you might consider NSWarnLog() .
Deprecated... use GSObjCSetValue()
Deprecated... use GSObjCSetVariable()
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Returns the NSStringEncoding that matches the specified character set registry and encoding information. For instance, for the iso8859-5 character set, the registry is iso8859 and the encoding is 5, and the returned NSStringEncoding is NSISOCyrillicStringEncoding. If there is no specific encoding, use @"0". Returns GSUndefinedEncoding if there is no match.
Try to deduce the string encoding from the locale string clocale. This function looks in the Locale.encodings file installed as part of GNUstep Base if the encoding cannot be deduced from the clocale string itself. If clocale isn't set or no match can be found, returns GSUndefinedEncoding.
Description forthcoming.
Function to convert from 16-bit unicode to 8-bit data.
The dst argument is a pointer to a pointer to a buffer in which the converted data is to be stored. If it is a null pointer, this function discards converted data, and is used only to determine the length of the converted data. If the zone argument is non-nul, the function is free to allocate a larger buffer if necessary, and store this new buffer in the dst argument. It will *NOT* deallocate the original buffer!
The size argument is a pointer to the initial size of the destination buffer. If the function changes the buffer size, this value will be altered to the new size. This is measured in bytes.
The src argument is a pointer to the 16-bit unicode string which is to be converted to 8-bit data.
The slen argument is the length of the 16-bit unicode string which is to be converted to 8-bit data. This is measured in 16-bit characters, not bytes.
The enc argument specifies the encoding type of the 8-bit byte sequence which is to be produced from the 16-bit unicode.
The zone argument specifies a memory zone in which the function may allocate a buffer to return data in. If this is nul, the function will fail if the originally supplied buffer is not big enough (unless dst is a null pointer... indicating that converted data is to be discarded).
The options argument controls some special behavior.
On return, the function result is a flag indicating
success (YES
) or failure (
NO
), and on success, the value stored
in size is the number of bytes in the
converted data. The converted data itself is
stored in the location given by dst.
NB. If the value stored in dst has
been changed, it is a pointer to allocated memory
which the caller is responsible for freeing, and the
caller is still responsible for freeing the
original buffer.
Function to convert from 8-bit data to 16-bit unicode characters.
The dst argument is a pointer to a pointer to a buffer in which the converted string is to be stored. If it is a null pointer, this function discards converted data, and is used only to determine the length of the converted string. If the zone argument is non-nul, the function is free to allocate a larger buffer if necessary, and store this new buffer in the dst argument. It will *NOT* deallocate the original buffer!
The size argument is a pointer to the initial size of the destination buffer. If the function changes the buffer size, this value will be altered to the new size. This is measured in 16-bit unicode characters, not bytes.
The src argument is a pointer to the byte sequence which is to be converted to 16-bit unicode.
The slen argument is the length of the byte sequence which is to be converted to 16-bit unicode. This is measured in bytes.
The enc argument specifies the encoding type of the 8-bit byte sequence which is to be converted to 16-bit unicode.
The zone argument specifies a memory zone in which the function may allocate a buffer to return data in. If this is nul, the function will fail if the originally supplied buffer is not big enough (unless dst is a null pointer... indicating that converted data is to be discarded).
The options argument controls some special behavior.
On return, the function result is a flag indicating
success (YES
) or failure (
NO
), and on success, the value stored
in size is the number of characters in the
converted string. The converted string itsself is
stored in the location given by dst.
NB. If the value stored in dst has
been changed, it is a pointer to allocated memory
which the caller is responsible for freeing, and the
caller is still responsible for freeing the
original buffer.
Returns a nul terminated array of the available string encodings.
Return the default encoding
Description forthcoming.
deprecated See GSToUnicode() and GSFromUnicode()
deprecated See GSToUnicode() and GSFromUnicode()
deprecated See GSToUnicode() and GSFromUnicode()
deprecated See GSToUnicode() and GSFromUnicode()
deprecated See GSToUnicode() and GSFromUnicode()
deprecated See GSToUnicode() and GSFromUnicode()
Description forthcoming.
Description forthcoming.
Description forthcoming.
Uses direct access into a two-level table to map cases.
The two-level table method is less space
efficient (but still not bad) than a single table
and a linear search, but it reduces the number of
conditional statements to just one.
Uses direct access into a two-level table to map cases.
The two-level table method is less space
efficient (but still not bad) than a single table
and a linear search, but it reduces the number of
conditional statements to just one.
deprecated See GSToUnicode() and GSFromUnicode()
The number of objects to try to get from varargs into an array on the stack... if there are more than this, use the heap. NB. This MUST be a multiple of 2
This is a macro designed to minimise the use of memory
allocation and deallocation when you need to
work with a vararg list of objects.
The objects
are unpacked from the vararg list into a 'C' array and
then a code fragment you specify is able to
make use of them before that 'C' array is destroyed.
The firstObject argument is the name of the formal parameter in your method or function which precedes the ',...' denoting variable args.
The code argument is a piece of objective-c
code to be executed to make use of the
objects stored in the 'C' array.
When this
code is called the unsigned integer
'__count' will contain the number of objects
unpacked, and the pointer '__objects' will point
to the unpacked objects, ie. firstObject
followed by the vararg arguments up to (but not
including) the first nil
.
This is a macro designed to minimise the use of memory
allocation and deallocation when you need to
work with a vararg list of objects.
The objects
are unpacked from the vararg list into two 'C' arrays
and then a code fragment you specify is able
to make use of them before that 'C' array is destroyed.
The firstObject argument is the name of the formal parameter in your method or function which precedes the ',...' denoting variable args.
The code argument is a piece of objective-c
code to be executed to make use of the
objects stored in the 'C' arrays.
When this
code is called the unsigned integer
'__count' will contain the number of objects
unpacked, the pointer '__objects' will point to
the first object in each pair, and the pointer
'__pairs' will point to an array containing the
second halves of the pairs of objects whose first
halves are in '__objects'.
This lets you pack
a list of the form 'key, value, key, value,...' into an
array of keys and an array of values.