STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions | Variables
runtime.h File Reference
#include "objc.h"
#include "objc-decls.h"

Go to the source code of this file.

Classes

struct  objc_method_description
 
struct  objc_struct_layout
 

Macros

#define _C_ID   '@'
 
#define _C_CLASS   '#'
 
#define _C_SEL   ':'
 
#define _C_CHR   'c'
 
#define _C_UCHR   'C'
 
#define _C_SHT   's'
 
#define _C_USHT   'S'
 
#define _C_INT   'i'
 
#define _C_UINT   'I'
 
#define _C_LNG   'l'
 
#define _C_ULNG   'L'
 
#define _C_LNG_LNG   'q'
 
#define _C_ULNG_LNG   'Q'
 
#define _C_FLT   'f'
 
#define _C_DBL   'd'
 
#define _C_LNG_DBL   'D'
 
#define _C_BFLD   'b'
 
#define _C_BOOL   'B'
 
#define _C_VOID   'v'
 
#define _C_UNDEF   '?'
 
#define _C_PTR   '^'
 
#define _C_CHARPTR   '*'
 
#define _C_ARY_B   '['
 
#define _C_ARY_E   ']'
 
#define _C_UNION_B   '('
 
#define _C_UNION_E   ')'
 
#define _C_STRUCT_B   '{'
 
#define _C_STRUCT_E   '}'
 
#define _C_VECTOR   '!'
 
#define _C_COMPLEX   'j'
 
#define _C_ATOM   '%'
 
#define _C_CONST   'r'
 
#define _C_IN   'n'
 
#define _C_INOUT   'N'
 
#define _C_OUT   'o'
 
#define _C_BYCOPY   'O'
 
#define _C_BYREF   'R'
 
#define _C_ONEWAY   'V'
 
#define _C_GCINVISIBLE   '|'
 
#define _F_CONST   0x01
 
#define _F_IN   0x01
 
#define _F_OUT   0x02
 
#define _F_INOUT   0x03
 
#define _F_BYCOPY   0x04
 
#define _F_BYREF   0x08
 
#define _F_ONEWAY   0x10
 
#define _F_GCINVISIBLE   0x20
 

Typedefs

typedef struct objc_ivar * Ivar
 
typedef struct objc_property * Property
 
typedef struct objc_property * objc_property_t
 
typedef struct objc_method * Method
 
typedef struct objc_category * Category
 
typedef Class(* objc_get_unknown_class_handler )(const char *class_name)
 

Functions

static Class object_getClass (id object)
 
objc_EXPORT const char * sel_getName (SEL selector)
 
objc_EXPORT const char * sel_getTypeEncoding (SEL selector)
 
objc_EXPORT SEL sel_getUid (const char *name)
 
objc_EXPORT SEL sel_registerName (const char *name)
 
objc_EXPORT SEL sel_registerTypedName (const char *name, const char *type)
 
objc_EXPORT BOOL sel_isEqual (SEL first_selector, SEL second_selector)
 
objc_EXPORT SELsel_copyTypedSelectorList (const char *name, unsigned int *numberOfReturnedSelectors)
 
objc_EXPORT SEL sel_getTypedSelector (const char *name)
 
objc_EXPORT id class_createInstance (Class class_, size_t extraBytes)
 
objc_EXPORT id object_copy (id object, size_t extraBytes)
 
objc_EXPORT id object_dispose (id object)
 
objc_EXPORT const char * object_getClassName (id object)
 
objc_EXPORT Class object_setClass (id object, Class class_)
 
objc_EXPORT Ivar class_getInstanceVariable (Class class_, const char *name)
 
objc_EXPORT Ivar class_getClassVariable (Class class_, const char *name)
 
objc_EXPORT void * object_getIndexedIvars (id object)
 
objc_EXPORT Ivar object_getInstanceVariable (id object, const char *name, void **returnValue)
 
objc_EXPORT Ivar object_setInstanceVariable (id object, const char *name, void *newValue)
 
objc_EXPORT id object_getIvar (id object, Ivar variable)
 
objc_EXPORT void object_setIvar (id object, Ivar variable, id value)
 
objc_EXPORT const char * ivar_getName (Ivar variable)
 
objc_EXPORT ptrdiff_t ivar_getOffset (Ivar variable)
 
objc_EXPORT const char * ivar_getTypeEncoding (Ivar variable)
 
objc_EXPORT Ivarclass_copyIvarList (Class class_, unsigned int *numberOfReturnedIvars)
 
objc_EXPORT BOOL class_addIvar (Class class_, const char *ivar_name, size_t size, unsigned char log_2_of_alignment, const char *type)
 
objc_EXPORT const char * property_getName (Property property)
 
objc_EXPORT const char * property_getAttributes (Property property)
 
objc_EXPORT Property class_getProperty (Class class_, const char *propertyName)
 
objc_EXPORT Propertyclass_copyPropertyList (Class class_, unsigned int *numberOfReturnedProperties)
 
objc_EXPORT const char * class_getIvarLayout (Class class_)
 
objc_EXPORT const char * class_getWeakIvarLayout (Class class_)
 
objc_EXPORT void class_setIvarLayout (Class class_, const char *layout)
 
objc_EXPORT void class_setWeakIvarLayout (Class class_, const char *layout)
 
objc_EXPORT
objc_get_unknown_class_handler 
objc_setGetUnknownClassHandler (objc_get_unknown_class_handler new_handler)
 
objc_EXPORT Class objc_getClass (const char *name)
 
objc_EXPORT Class objc_lookUpClass (const char *name)
 
objc_EXPORT Class objc_getMetaClass (const char *name)
 
objc_EXPORT Class objc_getRequiredClass (const char *name)
 
objc_EXPORT int objc_getClassList (Class *returnValue, int maxNumberOfClassesToReturn)
 
objc_EXPORT const char * class_getName (Class class_)
 
objc_EXPORT BOOL class_isMetaClass (Class class_)
 
objc_EXPORT Class class_getSuperclass (Class class_)
 
objc_EXPORT int class_getVersion (Class class_)
 
objc_EXPORT void class_setVersion (Class class_, int version)
 
objc_EXPORT size_t class_getInstanceSize (Class class_)
 
objc_EXPORT IMP method_setImplementation (Method method, IMP implementation)
 
objc_EXPORT void method_exchangeImplementations (Method method_a, Method method_b)
 
objc_EXPORT Class objc_allocateClassPair (Class super_class, const char *class_name, size_t extraBytes)
 
objc_EXPORT void objc_registerClassPair (Class class_)
 
objc_EXPORT void objc_disposeClassPair (Class class_)
 
objc_EXPORT Method class_getInstanceMethod (Class class_, SEL selector)
 
objc_EXPORT Method class_getClassMethod (Class class_, SEL selector)
 
objc_EXPORT IMP class_getMethodImplementation (Class class_, SEL selector)
 
objc_EXPORT BOOL class_respondsToSelector (Class class_, SEL selector)
 
objc_EXPORT BOOL class_addMethod (Class class_, SEL selector, IMP implementation, const char *method_types)
 
objc_EXPORT IMP class_replaceMethod (Class class_, SEL selector, IMP implementation, const char *method_types)
 
objc_EXPORT SEL method_getName (Method method)
 
objc_EXPORT IMP method_getImplementation (Method method)
 
objc_EXPORT const char * method_getTypeEncoding (Method method)
 
objc_EXPORT struct
objc_method_description
method_getDescription (Method method)
 
objc_EXPORT Methodclass_copyMethodList (Class class_, unsigned int *numberOfReturnedMethods)
 
objc_EXPORT unsigned int method_getNumberOfArguments (Method method)
 
objc_EXPORT char * method_copyReturnType (Method method)
 
objc_EXPORT char * method_copyArgumentType (Method method, unsigned int argumentNumber)
 
objc_EXPORT void method_getReturnType (Method method, char *returnValue, size_t returnValueSize)
 
objc_EXPORT void method_getArgumentType (Method method, unsigned int argumentNumber, char *returnValue, size_t returnValueSize)
 
objc_EXPORT Protocolobjc_getProtocol (const char *name)
 
objc_EXPORT Protocol ** objc_copyProtocolList (unsigned int *numberOfReturnedProtocols)
 
objc_EXPORT BOOL class_addProtocol (Class class_, Protocol *protocol)
 
objc_EXPORT BOOL class_conformsToProtocol (Class class_, Protocol *protocol)
 
objc_EXPORT Protocol ** class_copyProtocolList (Class class_, unsigned int *numberOfReturnedProtocols)
 
objc_EXPORT BOOL protocol_conformsToProtocol (Protocol *protocol, Protocol *anotherProtocol)
 
objc_EXPORT BOOL protocol_isEqual (Protocol *protocol, Protocol *anotherProtocol)
 
objc_EXPORT const char * protocol_getName (Protocol *protocol)
 
objc_EXPORT struct
objc_method_description 
protocol_getMethodDescription (Protocol *protocol, SEL selector, BOOL requiredMethod, BOOL instanceMethod)
 
objc_EXPORT struct
objc_method_description
protocol_copyMethodDescriptionList (Protocol *protocol, BOOL requiredMethod, BOOL instanceMethod, unsigned int *numberOfReturnedMethods)
 
objc_EXPORT Property protocol_getProperty (Protocol *protocol, const char *propertyName, BOOL requiredProperty, BOOL instanceProperty)
 
objc_EXPORT Propertyprotocol_copyPropertyList (Protocol *protocol, unsigned int *numberOfReturnedProperties)
 
objc_EXPORT Protocol ** protocol_copyProtocolList (Protocol *protocol, unsigned int *numberOfReturnedProtocols)
 
objc_EXPORT void objc_enumerationMutation (id collection)
 
objc_EXPORT void objc_setEnumerationMutationHandler (void(*handler)(id))
 
objc_EXPORT void * objc_malloc (size_t size)
 
objc_EXPORT void * objc_atomic_malloc (size_t size)
 
objc_EXPORT void * objc_realloc (void *mem, size_t size)
 
objc_EXPORT void * objc_calloc (size_t nelem, size_t size)
 
objc_EXPORT void objc_free (void *mem)
 
objc_EXPORT void class_ivar_set_gcinvisible (Class _class, const char *ivarname, BOOL gcInvisible)
 
objc_EXPORT int objc_sizeof_type (const char *type)
 
objc_EXPORT int objc_alignof_type (const char *type)
 
objc_EXPORT int objc_aligned_size (const char *type)
 
objc_EXPORT int objc_promoted_size (const char *type)
 
objc_EXPORT const char * objc_skip_type_qualifiers (const char *type)
 
objc_EXPORT const char * objc_skip_typespec (const char *type)
 
objc_EXPORT const char * objc_skip_offset (const char *type)
 
objc_EXPORT const char * objc_skip_argspec (const char *type)
 
objc_EXPORT unsigned objc_get_type_qualifiers (const char *type)
 
objc_EXPORT void objc_layout_structure (const char *type, struct objc_struct_layout *layout)
 
objc_EXPORT BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout)
 
objc_EXPORT void objc_layout_finish_structure (struct objc_struct_layout *layout, unsigned int *size, unsigned int *align)
 
objc_EXPORT void objc_layout_structure_get_info (struct objc_struct_layout *layout, unsigned int *offset, unsigned int *align, const char **type)
 

Variables

objc_EXPORT void(* _objc_load_callback )(Class _class, struct objc_category *category)
 

Macro Definition Documentation

#define _C_ARY_B   '['
#define _C_ARY_E   ']'
#define _C_ATOM   '%'
#define _C_BFLD   'b'
#define _C_BOOL   'B'
#define _C_BYCOPY   'O'
#define _C_BYREF   'R'
#define _C_CHARPTR   '*'
#define _C_CHR   'c'
#define _C_CLASS   '#'
#define _C_COMPLEX   'j'
#define _C_CONST   'r'
#define _C_DBL   'd'
#define _C_FLT   'f'
#define _C_GCINVISIBLE   '|'
#define _C_ID   '@'
#define _C_IN   'n'
#define _C_INOUT   'N'
#define _C_INT   'i'
#define _C_LNG   'l'
#define _C_LNG_DBL   'D'
#define _C_LNG_LNG   'q'
#define _C_ONEWAY   'V'
#define _C_OUT   'o'
#define _C_PTR   '^'
#define _C_SEL   ':'
#define _C_SHT   's'
#define _C_STRUCT_B   '{'
#define _C_STRUCT_E   '}'
#define _C_UCHR   'C'
#define _C_UINT   'I'
#define _C_ULNG   'L'
#define _C_ULNG_LNG   'Q'
#define _C_UNDEF   '?'
#define _C_UNION_B   '('
#define _C_UNION_E   ')'
#define _C_USHT   'S'
#define _C_VECTOR   '!'
#define _C_VOID   'v'
#define _F_BYCOPY   0x04
#define _F_BYREF   0x08
#define _F_CONST   0x01
#define _F_GCINVISIBLE   0x20
#define _F_IN   0x01
#define _F_INOUT   0x03
#define _F_ONEWAY   0x10
#define _F_OUT   0x02

Typedef Documentation

typedef struct objc_category* Category
typedef struct objc_ivar* Ivar
typedef struct objc_method* Method
typedef Class(* objc_get_unknown_class_handler)(const char *class_name)

Implementation: the following functions are in class.c.

typedef struct objc_property* objc_property_t
typedef struct objc_property* Property

Function Documentation

objc_EXPORT BOOL class_addIvar ( Class  class_,
const char *  ivar_name,
size_t  size,
unsigned char  log_2_of_alignment,
const char *  type 
)
objc_EXPORT BOOL class_addMethod ( Class  class_,
SEL  selector,
IMP  implementation,
const char *  method_types 
)
objc_EXPORT BOOL class_addProtocol ( Class  class_,
Protocol protocol 
)
objc_EXPORT BOOL class_conformsToProtocol ( Class  class_,
Protocol protocol 
)
objc_EXPORT Ivar* class_copyIvarList ( Class  class_,
unsigned int *  numberOfReturnedIvars 
)
objc_EXPORT Method* class_copyMethodList ( Class  class_,
unsigned int *  numberOfReturnedMethods 
)
objc_EXPORT Property* class_copyPropertyList ( Class  class_,
unsigned int *  numberOfReturnedProperties 
)
objc_EXPORT Protocol** class_copyProtocolList ( Class  class_,
unsigned int *  numberOfReturnedProtocols 
)
objc_EXPORT id class_createInstance ( Class  class_,
size_t  extraBytes 
)

Implementation: the following functions are in objects.c.

objc_EXPORT Method class_getClassMethod ( Class  class_,
SEL  selector 
)
objc_EXPORT Ivar class_getClassVariable ( Class  class_,
const char *  name 
)
objc_EXPORT Method class_getInstanceMethod ( Class  class_,
SEL  selector 
)

Implementation: the following functions are in sendmsg.c.

objc_EXPORT size_t class_getInstanceSize ( Class  class_)
objc_EXPORT Ivar class_getInstanceVariable ( Class  class_,
const char *  name 
)

Implementation: the following functions are in ivars.c.

objc_EXPORT const char* class_getIvarLayout ( Class  class_)
objc_EXPORT IMP class_getMethodImplementation ( Class  class_,
SEL  selector 
)
objc_EXPORT const char* class_getName ( Class  class_)
objc_EXPORT Property class_getProperty ( Class  class_,
const char *  propertyName 
)
objc_EXPORT Class class_getSuperclass ( Class  class_)
objc_EXPORT int class_getVersion ( Class  class_)
objc_EXPORT const char* class_getWeakIvarLayout ( Class  class_)
objc_EXPORT BOOL class_isMetaClass ( Class  class_)
objc_EXPORT void class_ivar_set_gcinvisible ( Class  _class,
const char *  ivarname,
BOOL  gcInvisible 
)

Implementation: the following functions are in gc.c.

objc_EXPORT IMP class_replaceMethod ( Class  class_,
SEL  selector,
IMP  implementation,
const char *  method_types 
)
objc_EXPORT BOOL class_respondsToSelector ( Class  class_,
SEL  selector 
)
objc_EXPORT void class_setIvarLayout ( Class  class_,
const char *  layout 
)
objc_EXPORT void class_setVersion ( Class  class_,
int  version 
)
objc_EXPORT void class_setWeakIvarLayout ( Class  class_,
const char *  layout 
)
objc_EXPORT const char* ivar_getName ( Ivar  variable)
objc_EXPORT ptrdiff_t ivar_getOffset ( Ivar  variable)
objc_EXPORT const char* ivar_getTypeEncoding ( Ivar  variable)
objc_EXPORT char* method_copyArgumentType ( Method  method,
unsigned int  argumentNumber 
)
objc_EXPORT char* method_copyReturnType ( Method  method)
objc_EXPORT void method_exchangeImplementations ( Method  method_a,
Method  method_b 
)
objc_EXPORT void method_getArgumentType ( Method  method,
unsigned int  argumentNumber,
char *  returnValue,
size_t  returnValueSize 
)
objc_EXPORT struct objc_method_description* method_getDescription ( Method  method)
objc_EXPORT IMP method_getImplementation ( Method  method)
objc_EXPORT SEL method_getName ( Method  method)

Implementation: the following functions are in methods.c.

objc_EXPORT unsigned int method_getNumberOfArguments ( Method  method)

Implementation: the following functions are in encoding.c.

objc_EXPORT void method_getReturnType ( Method  method,
char *  returnValue,
size_t  returnValueSize 
)
objc_EXPORT const char* method_getTypeEncoding ( Method  method)
objc_EXPORT IMP method_setImplementation ( Method  method,
IMP  implementation 
)
objc_EXPORT int objc_aligned_size ( const char *  type)
objc_EXPORT int objc_alignof_type ( const char *  type)
objc_EXPORT Class objc_allocateClassPair ( Class  super_class,
const char *  class_name,
size_t  extraBytes 
)
objc_EXPORT void* objc_atomic_malloc ( size_t  size)
objc_EXPORT void* objc_calloc ( size_t  nelem,
size_t  size 
)
objc_EXPORT Protocol** objc_copyProtocolList ( unsigned int *  numberOfReturnedProtocols)
objc_EXPORT void objc_disposeClassPair ( Class  class_)
objc_EXPORT void objc_enumerationMutation ( id  collection)

Implementation: the following functions are in objc-foreach.c.

objc_EXPORT void objc_free ( void *  mem)
objc_EXPORT unsigned objc_get_type_qualifiers ( const char *  type)
objc_EXPORT Class objc_getClass ( const char *  name)
objc_EXPORT int objc_getClassList ( Class returnValue,
int  maxNumberOfClassesToReturn 
)
objc_EXPORT Class objc_getMetaClass ( const char *  name)
objc_EXPORT Protocol* objc_getProtocol ( const char *  name)

Implementation: the following functions are in protocols.c.

objc_EXPORT Class objc_getRequiredClass ( const char *  name)
objc_EXPORT void objc_layout_finish_structure ( struct objc_struct_layout layout,
unsigned int *  size,
unsigned int *  align 
)
objc_EXPORT void objc_layout_structure ( const char *  type,
struct objc_struct_layout layout 
)
objc_EXPORT void objc_layout_structure_get_info ( struct objc_struct_layout layout,
unsigned int *  offset,
unsigned int *  align,
const char **  type 
)
objc_EXPORT BOOL objc_layout_structure_next_member ( struct objc_struct_layout layout)
objc_EXPORT Class objc_lookUpClass ( const char *  name)
objc_EXPORT void* objc_malloc ( size_t  size)

Implementation: the following functions are in memory.c.

objc_EXPORT int objc_promoted_size ( const char *  type)
objc_EXPORT void* objc_realloc ( void *  mem,
size_t  size 
)
objc_EXPORT void objc_registerClassPair ( Class  class_)
objc_EXPORT void objc_setEnumerationMutationHandler ( void(*)(id handler)
objc_EXPORT objc_get_unknown_class_handler objc_setGetUnknownClassHandler ( objc_get_unknown_class_handler  new_handler)
objc_EXPORT int objc_sizeof_type ( const char *  type)

Implementation: the following functions are in encoding.c.

objc_EXPORT const char* objc_skip_argspec ( const char *  type)
objc_EXPORT const char* objc_skip_offset ( const char *  type)
objc_EXPORT const char* objc_skip_type_qualifiers ( const char *  type)
objc_EXPORT const char* objc_skip_typespec ( const char *  type)
objc_EXPORT id object_copy ( id  object,
size_t  extraBytes 
)
objc_EXPORT id object_dispose ( id  object)
static Class object_getClass ( id  object)
inlinestatic

Implementation: the following functions are defined inline.

154 {
155  if (object != nil)
156  return object->class_pointer;
157  else
158  return Nil;
159 }
#define Nil
Definition: objc.h:117
#define nil
Definition: objc.h:110
objc_EXPORT const char* object_getClassName ( id  object)
objc_EXPORT void* object_getIndexedIvars ( id  object)
objc_EXPORT Ivar object_getInstanceVariable ( id  object,
const char *  name,
void **  returnValue 
)
objc_EXPORT id object_getIvar ( id  object,
Ivar  variable 
)
objc_EXPORT Class object_setClass ( id  object,
Class  class_ 
)
objc_EXPORT Ivar object_setInstanceVariable ( id  object,
const char *  name,
void *  newValue 
)
objc_EXPORT void object_setIvar ( id  object,
Ivar  variable,
id  value 
)
objc_EXPORT const char* property_getAttributes ( Property  property)
objc_EXPORT const char* property_getName ( Property  property)
objc_EXPORT BOOL protocol_conformsToProtocol ( Protocol protocol,
Protocol anotherProtocol 
)
objc_EXPORT struct objc_method_description* protocol_copyMethodDescriptionList ( Protocol protocol,
BOOL  requiredMethod,
BOOL  instanceMethod,
unsigned int *  numberOfReturnedMethods 
)
objc_EXPORT Property* protocol_copyPropertyList ( Protocol protocol,
unsigned int *  numberOfReturnedProperties 
)
objc_EXPORT Protocol** protocol_copyProtocolList ( Protocol protocol,
unsigned int *  numberOfReturnedProtocols 
)
objc_EXPORT struct objc_method_description protocol_getMethodDescription ( Protocol protocol,
SEL  selector,
BOOL  requiredMethod,
BOOL  instanceMethod 
)
objc_EXPORT const char* protocol_getName ( Protocol protocol)
objc_EXPORT Property protocol_getProperty ( Protocol protocol,
const char *  propertyName,
BOOL  requiredProperty,
BOOL  instanceProperty 
)
objc_EXPORT BOOL protocol_isEqual ( Protocol protocol,
Protocol anotherProtocol 
)
objc_EXPORT SEL* sel_copyTypedSelectorList ( const char *  name,
unsigned int *  numberOfReturnedSelectors 
)
objc_EXPORT const char* sel_getName ( SEL  selector)

Implementation: the following functions are in selector.c.

objc_EXPORT SEL sel_getTypedSelector ( const char *  name)
objc_EXPORT const char* sel_getTypeEncoding ( SEL  selector)
objc_EXPORT SEL sel_getUid ( const char *  name)
objc_EXPORT BOOL sel_isEqual ( SEL  first_selector,
SEL  second_selector 
)
objc_EXPORT SEL sel_registerName ( const char *  name)
objc_EXPORT SEL sel_registerTypedName ( const char *  name,
const char *  type 
)

Variable Documentation

objc_EXPORT void(* _objc_load_callback)(Class _class, struct objc_category *category)

Implementation: the following hook is in init.c.