Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
CAAtom - iPhone Development Wiki

CAAtom

From iPhone Development Wiki
Revision as of 12:36, 15 November 2009 by KennyTM~ (talk | contribs) (Created page with 'CAAtom refers to a string for identification in {{fwlink|QuartzCore}}. As of 3.1, there are over 300 internal atoms. == CAAtomGetString == {{function signature | signature=N…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CAAtom refers to a string for identification in QuartzCore. As of 3.1, there are over 300 internal atoms.

CAAtomGetString

Signature NSString* CAAtomGetString(unsigned atomicValue);
Available in 2.0 –

There is only 1 exported C function for CAAtom, CAAtomGetString(), which converts an integer to its corresponding string value. Most internal code in QuartzCore are identified using atoms. For example, a portion of disassembled code may read:

-[CAGradientLayer setLocations:]:
;
+00000 0008d9cc             stmdb             sp!,{r7,lr}
+00004 0008d9d0             add               r7,sp,#0x0
+00008 0008d9d4             mov               r1,#0xad
+0000c 0008d9d8             bl                CALayer_setter_kCAValueCopiedPointer
+00010 0008d9dc             ldmia             sp!,{r7,pc}                       ; return

here, the magic number 0xAD is in fact an atom, which is unsurprisingly the value "locations":

cy# CAAtomGetString(0xad)
"locations"