Public API method naming for NSString * / const char * parameters
Public API method naming for NSString * / const char * parameters
- Subject: Public API method naming for NSString * / const char * parameters
- From: "email@hidden" <email@hidden>
- Date: Mon, 03 Mar 2014 14:37:44 +0000
I am pondering the following framework public API method signatures.
The API requires a mixture of const char* and NSString * parameters.
The question is whether to precede const char * parameter names with UTF8 e.g.:
+ (MonoClass *)monoClassWithName:(char *)className fromAssemblyName:(const char *)assemblyName;
becomes
+ (MonoClass *)monoClassWithUTF8Name:(char *)className fromAssemblyUTF8Name:(const char *)assemblyName;
I have doubts in case that NSString * convenience variants become desirable in the future.
Just wondering how others have approached this.
===
+ (MonoClass *)monoClassWithName:(char *)className fromAssemblyName:(const char *)assemblyName;
- (MonoClass *)monoClassWithName:(char *)className fromAssemblyName:(const char *)name;
+ (MonoClass *)monoClassWithName:(char *)className fromAssembly:(MonoAssembly *)assembly;
+ (MonoClass *)corlibMonoClassWithName:(char *)className;
+ (MonoClass *)dubrovnikMonoClassWithName:(char *)className;
+ (MonoMethod *)dubrovnikMonoMethodWithName:(char *)methodName className:(char *)className argCount:(int)argCount;
- (MonoAssembly *)loadedAssemblyWithName:(const char *)name;
- (MonoAssembly *)loadedAssembly:(NSString *)name;
- (MonoAssembly *)openAssemblyWithName:(const char *)name;
- (MonoAssembly *)openAssemblyWithPath:(NSString *)assemblyPath;
- (MonoAssembly *)openAssembly:(NSString *)name path:(NSString *)assemblyPath;
- (MonoAssembly *)openAssemblyWithName:(const char *)name path:(NSString *)path;
Jonathan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden