Skip to content

Conversation

nahidfgh
Copy link
Contributor

@nahidfgh nahidfgh commented Nov 20, 2024

Providing wrapper for privacy concern metadata provider. This needs to be fed to initialization configuration.

@nahidfgh nahidfgh requested a review from a team as a code owner November 20, 2024 19:42
@nahidfgh nahidfgh marked this pull request as draft November 20, 2024 19:42
if ([initConfigObject metadataProvider] != nill)
{
config.metadataProvider = [[]]
}
Copy link
Contributor

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

@EnD

// mm file
@implementation MyCPPWrapper

  • (NSString *)getDatabaseNameForRecord:(id)record;
    {
    if (cppObject)
    cppObject->GetDatabaseName(id);
    }

@EnD
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants