Get list of all message names

134 views
Skip to first unread message

Ryan Herbert

unread,
May 23, 2022, 9:45:41 AM5/23/22
to Protocol Buffers
I've been trying to figure out how to get a list of all message names in the generated pool with the C++ API. It looks like I can use FindAllMessageNames if I have a pointer to the DescriptorDatabase, but I can't find a way to get access to that. The documentation describes DescriptorPool::internal_generated_database() (which I probably shouldn't use anyway), but that doesn't appear to exist in my 3.12.4 version.

Is there a way to get this list? If not in C++, is there a way in Python?

Deanna Garcia

unread,
Aug 1, 2022, 2:20:10 PM8/1/22
to Protocol Buffers
In order to use FindAllMessageNames you should be working directly with a DescriptorDatabase.

What context are you trying to get all message names? How have you added them to the generated pool?

Reply all
Reply to author
Forward
0 new messages