- Declared in:
- Macros.h
- Declared in:
- Macros.h
Shortcut macro to create a NSArray. Same as +[NSArray dictionaryWithObjects:].
Shortcut macro to create a NSDictionary. Same as +[NSDictionary dictionaryWithObjectsAndKeys:].
Macro for creating dealloc methods.
Basic assertion macro that just reports the tested condition when it fails. It is similar to NSParameterAssert but not limited to checking the arguments.
Assertion macro to mark code portion that should never be reached. e.g. the default case in a switch statement.
Macro providing a foreach statement on collections, with IMP caching.
@param type An element type such as 'NSString *' to typecheck the messages sent to the elements in the code block.
Macro providing a foreach statement on collections, with IMP caching.
@param collection Can be nil
, this argument is ignored. @param type An
element type such as 'NSString *' to
typecheck the messages sent to the elements in
the code block. @param enumerator A custom
enumerator object to use to
iterate over the collection.
Macro providing a foreach statement on collections, with IMP caching.
You should rather use FOREACH that provides basic typechecking.
Shortcut macro to create a NSIndexSet.
Exception macro to check whether the given
argument respects a condition.
When the condition evaluates to
NO
, an NSInvalidArgumentException is
raised.
Create a temporary autorelease pool that is destroyed when the scope exits.
Macro that sends a -lock message to the argument immediately, and then an -unlock message when the variable goes out of scope (including if an exception causes this stack frame to be unwound).
Exception macro to check the given argument is
not nil
, otherwise an
NSInvalidArgumentException is
raised.
Shortcut macro to create a NSSet. Same as +[NSSet setWithObjects:].
Deprecated. You should use the designated initializer rule. Simple macro for safely initialising the current class.
Simple macro for safely initialising the superclass.
Cleanup function that releases a lock.
Cleanup function that releases a lock.