cyclic.proto 534 B

123456789101112131415161718192021222324252627
  1. // Test structures with cyclic references.
  2. // These can only be handled in pointer/callback mode,
  3. // see associated .options files.
  4. syntax = "proto2";
  5. message TreeNode
  6. {
  7. optional int32 leaf = 1;
  8. optional TreeNode left = 2;
  9. optional TreeNode right = 3;
  10. }
  11. message Dictionary
  12. {
  13. repeated KeyValuePair dictItem = 1;
  14. }
  15. message KeyValuePair
  16. {
  17. required string key = 1;
  18. optional string stringValue = 2;
  19. optional int32 intValue = 3;
  20. optional Dictionary dictValue = 4;
  21. optional TreeNode treeValue = 5;
  22. }