Dev:CAAtom

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

Converting atoms to and from strings
There are only two exported C functions for CAAtom, CAAtomGetString and CAInternAtom, which convert a CAAtom between an integer and its corresponding string value. Most internal code in QuartzCore is 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":

The CAAtom of 0 always returns &lt;nil&gt;, and that of an undefined atom is &lt;unknown&gt;. Custom atom values are always larger than the built-in ones.