Conversation
| if ([initConfigObject metadataProvider] != nill) | ||
| { | ||
| config.metadataProvider = [[]] | ||
| } |
There was a problem hiding this comment.
config.metadataProvider should be config.MetadataProvider defined here. However, current implementation does not assign metadata provider to underlying data structure in PG C++. This is because in PG C++, Metadata provider is defined as
const std::shared_ptr<PrivacyConcernMetadataProvider> MetadataProvider;, so you will need to convert your ODWPrivacyConcernMetadataProvider to this type. Unfortunately, there is no direct conversion between Obj-C and C++ class implementations. One way I found to achieve this is to use composition. In this link, it talks about how to do this.
I think this is what you need
`
// h file
@interface ODWPrivacyConcernMetadataProvider: NSObject
{
@public
PrivacyConcernMetadataProvider *cppObject;
}
- (NSString *)getDatabaseNameForRecord:(id)record;
- // rest of interface functions
// mm file
@implementation MyCPPWrapper
- (NSString *)getDatabaseNameForRecord:(id)record;
{
if (cppObject)
cppObject->GetDatabaseName(id);
}
@EnD
`
Providing wrapper for privacy concern metadata provider. This needs to be fed to initialization configuration.