• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_EDITION_H__
2 #define GOOGLE_PROTOBUF_DESCRIPTOR_EDITION_H__
3 
4 #include "google/protobuf/descriptor.h"
5 #include "google/protobuf/descriptor.pb.h"
6 
7 namespace google {
8 namespace protobuf {
9 
10 // TODO Remove this deprecated API entirely.
11 class FileDescriptorLegacy {
12  public:
FileDescriptorLegacy(const FileDescriptor * file)13   explicit FileDescriptorLegacy(const FileDescriptor* file) : file_(file) {}
14 
15   // Edition shouldn't be depended on unless dealing with raw unbuilt
16   // descriptors, which will expose it via FileDescriptorProto.edition.
edition()17   Edition edition() const { return file_->edition(); }
18 
19  private:
20   const FileDescriptor* file_;
21 };
22 }  // namespace protobuf
23 }  // namespace google
24 
25 #endif  // GOOGLE_PROTOBUF_DESCRIPTOR_EDITION_H__
26