-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Privacy Concern Event wrapper #1310
base: main
Are you sure you want to change the base?
Conversation
if ([initConfigObject metadataProvider] != nill) | ||
{ | ||
config.metadataProvider = [[]] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.