File: pb_vector.proto

package info (click to toggle)
swi-prolog 9.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,408 kB
  • sloc: ansic: 387,503; perl: 359,326; cpp: 6,613; lisp: 6,247; java: 5,540; sh: 3,147; javascript: 2,668; python: 1,900; ruby: 1,594; yacc: 845; makefile: 428; xml: 317; sed: 12; sql: 6
file content (72 lines) | stat: -rw-r--r-- 1,555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Example protobuf definition for testing
// See Makefile for how to use it

syntax = "proto2";

enum VectorType {
  DOUBLE    = 2;
  FLOAT     = 3;
  INTEGER   = 4;
  INTEGER64 = 5;
  INTEGER32 = 6;
  UNSIGNED  = 7;
  BYTES     = 8;
  ATOM      = 9;
  STRING    = 10;
}

message Vector {
  repeated double  double_values    = 2;
  repeated float   float_values     = 3;
  repeated sint32  integer_values   = 4;
  repeated fixed64 integer64_values = 5;
  repeated fixed32 integer32_values = 6;
  repeated uint32  unsigned_values  = 7;
  repeated bytes   bytes_values     = 8;
  repeated string  atom_values      = 9;
  repeated string  string_values    = 10;
}
//

message compound_protobuf {
  optional group Complex = 12 {
    required double real = 1;
    required double img = 2;
  };
  optional group Fraction = 15 {
    required sint64 num = 1;
    required sint64 den = 2;
  };
  optional float float = 13;
  optional double double = 14;
  optional sint32 integer = 16;
}

message protobuf_bag {
  repeated compound_protobuf bag = 1;
}


// messages used in section "Example: A Simple XML Like Structure"

message kv_pair {
  required string key = 30;
  optional sint64  int_value = 31;
  optional double float_value  = 32;
  optional string atom_value = 33;
}

message aux_xml_element {
  optional string atom = 43;
  optional xml_element element = 40;
}

message xml_element {
  required string name = 21;
  repeated kv_pair attributes = 22;
  repeated aux_xml_element contents = 23;
}

message XMLFile {
  repeated xml_element elements = 20;
}