Skip to content

Instantly share code, notes, and snippets.

@superwills
Created April 19, 2014 20:20
Show Gist options
  • Save superwills/11096382 to your computer and use it in GitHub Desktop.
Save superwills/11096382 to your computer and use it in GitHub Desktop.
CFTypes
string CFGetType( long typeId )
{
static map<long,string> types = {
{CFArrayGetTypeID(),"CFArray"},
{CFBooleanGetTypeID(),"CFBoolean"},
{CFDataGetTypeID(),"CFData"},
{CFDateGetTypeID(),"CFDate"},
{CFDictionaryGetTypeID(),"CFDictionary"},
{CFNumberGetTypeID(),"CFNumber"},
{CFStringGetTypeID(),"CFString"},
};
return types[typeId];
}
printf( "CFTypes:\n - CFArray %lu\n - CFBoolean %lu\n - CFData %lu\n"
" - CFDate %lu\n - CFDictionary %lu\n - CFNumber %lu\n - CFString %lu\n",
CFArrayGetTypeID(), CFBooleanGetTypeID(), CFDataGetTypeID(), CFDateGetTypeID(),
CFDictionaryGetTypeID(), CFNumberGetTypeID(), CFStringGetTypeID() );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment