Comment énumérer CFProperyList / CFDictionary clés

Je voudrais parcourir un CFDictionary (CFPropertyList) et obtenir toutes les valeurs sur un niveau spécifique.

Ce serait mon dictionnaire /bien-liste:


 root
 
  A
  
   foo
   0
   bar
   0
  
  B
  
   foo
   10
   bar
   100
  
  C
  
   foo
   20
   bar
   500
  
 

À l'aide de ObjC il ressemblerait à quelque chose comme ceci:

//dict is loaded with the dictionary below "root"
NSDictionary *dict = [...];
NSEnumerator *enumerator = [dict keyEnumerator];
NSString *key;
while (key = [enumerator nextObject]) 
{
    NSLog(key);
};

Et il affiche la liste des touches de la console comme ceci:

Un 
B 
C 

Comment obtenir ce résultat lors de l'utilisation de C/C++ sur le CoreFoundation niveau?

OriginalL'auteur Till | 2010-02-17