-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
PROBLEM
- Our project contains quite a lot of XPCF components subject to have gRPC files being generated by xpcf_grpc_gen.
- We want to generate those files only for a subset of these classes
- We must use XPCF_IGNORE macro for a majority of component and keep XPCF_CLIENTUUID/XPCF_SERVERUUID only for a handful of classes, because, IIUC, unannotated class uses generated UUIDs :
ProxyGenerator.cpp
xpcf::uuids::uuid proxyUUID = c->getClientUUID();
if (proxyUUID.is_nil()) {
proxyUUID = c->createClientUUID();
m_serviceUuidMap[m_className] = xpcf::uuids::to_string(proxyUUID);
}
- => this can be tedious and hard to check we haven't forgotten to add an XPCF_IGNORE somewhere as it will likely generate files we do not use, and only increase compilation time to our project that uses those generated files.
SUGGESTED SOLUTION
- Invert the default, and consider an unannotated class to be ignored, and explicitely add annotation for generation.
For example:
- set both UUIDs
class XPCF_CLIENTUUID("...") XPCF_SERVERUUID("...") MyClass:
virtual public org::bcom::xpcf::IComponentIntrospect {
- set only one UUID, let the other one be generated (error if not both are set?)
class XPCF_CLIENTUUID("...") XPCF_SERVERUUID_AUTO MyClass:
virtual public org::bcom::xpcf::IComponentIntrospect {
- no annotation -> ignored
class MyClass:
virtual public org::bcom::xpcf::IComponentIntrospect {
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels