ProvidesLocationPath.swift 920 B

12345678910111213141516171819202122
  1. // Sources/SwiftProtobufPluginLibrary/ProvidesLocationPath.swift - Proto Field numbers
  2. //
  3. // Copyright (c) 2014 - 2017 Apple Inc. and the project authors
  4. // Licensed under Apache License v2.0 with Runtime Library Exception
  5. //
  6. // See LICENSE.txt for license information:
  7. // https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
  8. //
  9. // -----------------------------------------------------------------------------
  10. import Foundation
  11. /// Protocol that all the Descriptors conform to for original .proto file
  12. /// location lookup.
  13. public protocol ProvidesLocationPath {
  14. /// Updates `path` to the source location of the complete extent of
  15. /// the object conforming to this protocol. This is a replacement for
  16. /// `GetSourceLocation()` in the C++ Descriptor apis.
  17. func getLocationPath(path: inout IndexPath)
  18. /// Returns the File this conforming object is in.
  19. var file: FileDescriptor! { get }
  20. }