class DescriptorDatabase

Defined at line 50 of file ../../third_party/protobuf/src/google/protobuf/descriptor_database.h

Abstract interface for a database of descriptors.

This is useful if you want to create a DescriptorPool which loads

descriptors on-demand from some sort of large database. If the database

is large, it may be inefficient to enumerate every .proto file inside it

calling DescriptorPool::BuildFile() for each one. Instead, a DescriptorPool

can be created which wraps a DescriptorDatabase and only builds particular

descriptors when they are needed.

Public Methods

void DescriptorDatabase ()

Defined at line 52 of file ../../third_party/protobuf/src/google/protobuf/descriptor_database.h

void DescriptorDatabase (const DescriptorDatabase & )

Defined at line 53 of file ../../third_party/protobuf/src/google/protobuf/descriptor_database.h

DescriptorDatabase & operator= (const DescriptorDatabase & )

Defined at line 54 of file ../../third_party/protobuf/src/google/protobuf/descriptor_database.h

bool FindAllExtensionNumbers (const std::string & , std::vector<int> * )

Finds the tag numbers used by all known extensions of

extendee_type, and appends them to output in an undefined

order. This method is best-effort: it's not guaranteed that the

database will find all extensions, and it's not guaranteed that

FindFileContainingExtension will return true on all of the found

numbers. Returns true if the search was successful, otherwise

returns false and leaves output unchanged.

This method has a default implementation that always returns

false.

Defined at line 86 of file ../../third_party/protobuf/src/google/protobuf/descriptor_database.h

bool FindAllFileNames (std::vector<std::string> * )

Finds the file names and appends them to the output in an

undefined order. This method is best-effort: it's not guaranteed that the

database will find all files. Returns true if the database supports

searching all file names, otherwise returns false and leaves output

unchanged.

This method has a default implementation that always returns

false.

Defined at line 100 of file ../../third_party/protobuf/src/google/protobuf/descriptor_database.h

void ~DescriptorDatabase ()
bool FindFileByName (const std::string & filename, FileDescriptorProto * output)

Find a file by file name. Fills in in *output and returns true if found.

Otherwise, returns false, leaving the contents of *output undefined.

bool FindFileContainingSymbol (const std::string & symbol_name, FileDescriptorProto * output)

Find the file that declares the given fully-qualified symbol name.

If found, fills in *output and returns true, otherwise returns false

and leaves *output undefined.

bool FindFileContainingExtension (const std::string & containing_type, int field_number, FileDescriptorProto * output)

Find the file which defines an extension extending the given message type

with the given field number. If found, fills in *output and returns true,

otherwise returns false and leaves *output undefined. containing_type

must be a fully-qualified type name.

bool FindAllPackageNames (std::vector<std::string> * output)

Finds the package names and appends them to the output in an

undefined order. This method is best-effort: it's not guaranteed that the

database will find all packages. Returns true if the database supports

searching all package names, otherwise returns false and leaves output

unchanged.

bool FindAllMessageNames (std::vector<std::string> * output)

Finds the message names and appends them to the output in an

undefined order. This method is best-effort: it's not guaranteed that the

database will find all messages. Returns true if the database supports

searching all message names, otherwise returns false and leaves output

unchanged.