Hi Chriss,
I too am looking at wrapping cdb_get_values() in an API. However I am taking the approach of a wrapper class that takes the form of a transaction. We have lots of cases where C_ENUM_HASH is actually stored in a 'C' structure as a char value because we know the enumerated list is short (<255). However cdb_get_values will return a C_ENUM_HASH as an int. Worse, CONFD_SET_TAG_PTR is not typesafe as it casts the pointer passed in to a void*.
The use case would look something like this:
ElementQuery q;
ElementFactory f;
unsigned char value;
<more values>
q->setPath("path to container");
q->addElement(f->makeEnum("leaf name", &value));
<add more elements to the query>
q->execute();
ElementFactory contains a bunch of overloaded make functions for all the various combinations of C_types and destination types. The magic of how the value returned from confd is stored in the destination is known by the store method in the concrete Element classes.
-Dennis-