I know that no one answered this question, but I would like to tell people about how they approach the situation.
I am writing an Objective-C wrapper to the C library. My goals are:
1) The shell uses Objective-C objects. For example, if the C API defines a parameter such as char *, the Objective-C API should use the name: (NSString *).
2) A client using the Objective-C wrapper does not need to know knowledge about the internal operation of the C library.
Speed ββis not really a problem.
It is easy with simple parameters. Of course, there is no problem to take NSString and convert it to a C string to pass it to the C library.
My indecision arises when complex structures are involved.
Say you have:
struct flow
{
long direction;
long speed;
long disruption;
long start;
long stop;
} flow_t;
And then your C API call is:
void setFlows(flow_t inFlows[4]);
, :
1) flow_t API Objective-C
2) NSArray NSDiction,
3) NSArray "Flow", ,
:
1: .
2: - , " w485". , NSDictionary NSNumber. , , .
3: - , . , # 2, , ( , ), .
, , ? , ? , , ?