Welcome to mirror list, hosted at ThFree Co, Russian Federation.

message.proto « cxx_descriptor « tests - github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf074e80da782f68d8c6362018e1566867392edc (plain)
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
/* Test CPP descriptor generation */

syntax = "proto2";

import "nanopb.proto";

message MyEmptyMessage {
}

message MyNonEmptyMessage {
    optional uint32 field = 1;
}

message MyMessageWithMsgid {
    option (nanopb_msgopt).msgid = 42;
    optional uint32 field = 1;
}

message MyMessageWithoutMsgid {
    optional uint32 field = 1;
}

// This message is not used in the tests but is rather a sentry message that
// will trigger a build failure if the generator decides to create a size
// variable for fields which are not size bound. Note that this only works as
// long as the C++ interface for sizing wraps the C interface.
message MyMessageWithoutSize {
    repeated uint32 field = 1;
}

message MyMessageWithSizeBoundRepeatedFields {
    option (nanopb_msgopt).max_count = 100;
    repeated uint32 field = 1;
}