Closed tsaubergine closed 8 years ago
Email from @berkowski
Now, I have gotten this to work w/ the current branches for DCCL and goby using the following line somewhere near the start of initialization:
dccl::DynamicProtobufManager::msg_factory().SetDelegateToGeneratedFactory(true);
void DynamicMessageFactory::SetDelegateToGeneratedFactory(
bool enable)
Call this to tell the DynamicMessageFactory that if it is given a Descriptor d for which:
d->file()->pool() == DescriptorPool::generated_pool()
, then it should delegate to MessageFactory::generated_factory() instead of constructing a dynamic implementation of the message. In theory there is no down side to doing this, so it may become the default in the future.
Example snippet of code that fails (thanks to @berkowski):