aboutsummaryrefslogtreecommitdiff
path: root/src/frontend.pb.h
blob: 5b3ac2694e05f8a019e3b8ad17a9792250a727ee (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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
// This file is autogenerated by generate_proto_header.py, do not edit

#ifndef NINJA_FRONTEND_PB_H
#define NINJA_FRONTEND_PB_H

#include <inttypes.h>

#include <iostream>
#include <string>
#include <vector>

#include "proto.h"

namespace ninja {
struct Status {
  struct TotalEdges {
    uint32_t total_edges_;
    bool has_total_edges_;

    TotalEdges() {
      has_total_edges_ = false;
      total_edges_ = static_cast< uint32_t >(0);
    }

    TotalEdges(const TotalEdges&);
    void operator=(const TotalEdges&);

    void SerializeToOstream(std::ostream* output__) const {
      WriteVarint32(output__, 1, total_edges_);
    }

    size_t ByteSizeLong() const {
      size_t size = 0;
      size += VarintSize32(total_edges_) + 1;
      return size;
    }

    void Clear() {
      total_edges_ = static_cast< uint32_t >(0);
    }

    uint32_t* mutable_total_edges() {
      has_total_edges_ = true;
      return &total_edges_;
    }
    void set_total_edges(const uint32_t& value) {
      has_total_edges_ = true;
      total_edges_ = value;
    }
  };

  struct BuildStarted {
    uint32_t parallelism_;
    bool has_parallelism_;
    bool verbose_;
    bool has_verbose_;

    BuildStarted() {
      has_parallelism_ = false;
      parallelism_ = static_cast< uint32_t >(0);
      has_verbose_ = false;
      verbose_ = static_cast< bool >(0);
    }

    BuildStarted(const BuildStarted&);
    void operator=(const BuildStarted&);

    void SerializeToOstream(std::ostream* output__) const {
      WriteVarint32(output__, 1, parallelism_);
      WriteVarint32(output__, 2, verbose_);
    }

    size_t ByteSizeLong() const {
      size_t size = 0;
      size += VarintSize32(parallelism_) + 1;
      size += VarintSizeBool(verbose_) + 1;
      return size;
    }

    void Clear() {
      parallelism_ = static_cast< uint32_t >(0);
      verbose_ = static_cast< bool >(0);
    }

    uint32_t* mutable_parallelism() {
      has_parallelism_ = true;
      return &parallelism_;
    }
    void set_parallelism(const uint32_t& value) {
      has_parallelism_ = true;
      parallelism_ = value;
    }
    bool* mutable_verbose() {
      has_verbose_ = true;
      return &verbose_;
    }
    void set_verbose(const bool& value) {
      has_verbose_ = true;
      verbose_ = value;
    }
  };

  struct BuildFinished {
    BuildFinished() {
    }

    BuildFinished(const BuildFinished&);
    void operator=(const BuildFinished&);

    void SerializeToOstream(std::ostream* output__) const {
    }

    size_t ByteSizeLong() const {
      size_t size = 0;
      return size;
    }

    void Clear() {
    }

  };

  struct EdgeStarted {
    uint32_t id_;
    bool has_id_;
    uint32_t start_time_;
    bool has_start_time_;
    std::vector< std::string > inputs_;
    bool has_inputs_;
    std::vector< std::string > outputs_;
    bool has_outputs_;
    std::string desc_;
    bool has_desc_;
    std::string command_;
    bool has_command_;
    bool console_;
    bool has_console_;

    EdgeStarted() {
      has_id_ = false;
      id_ = static_cast< uint32_t >(0);
      has_start_time_ = false;
      start_time_ = static_cast< uint32_t >(0);
      has_inputs_ = false;
      has_outputs_ = false;
      has_desc_ = false;
      has_command_ = false;
      has_console_ = false;
      console_ = static_cast< bool >(0);
    }

    EdgeStarted(const EdgeStarted&);
    void operator=(const EdgeStarted&);

    void SerializeToOstream(std::ostream* output__) const {
      WriteVarint32(output__, 1, id_);
      WriteVarint32(output__, 2, start_time_);
      for (std::vector< std::string >::const_iterator it_ = inputs_.begin();
          it_ != inputs_.end(); it_++) {
        WriteString(output__, 3, *it_);
      }
      for (std::vector< std::string >::const_iterator it_ = outputs_.begin();
          it_ != outputs_.end(); it_++) {
        WriteString(output__, 4, *it_);
      }
      WriteString(output__, 5, desc_);
      WriteString(output__, 6, command_);
      WriteVarint32(output__, 7, console_);
    }

    size_t ByteSizeLong() const {
      size_t size = 0;
      size += VarintSize32(id_) + 1;
      size += VarintSize32(start_time_) + 1;
      for (std::vector< std::string >::const_iterator it_ = inputs_.begin();
          it_ != inputs_.end(); it_++) {
        size += StringSize(*it_) + 1;
      }
      for (std::vector< std::string >::const_iterator it_ = outputs_.begin();
          it_ != outputs_.end(); it_++) {
        size += StringSize(*it_) + 1;
      }
      size += StringSize(desc_) + 1;
      size += StringSize(command_) + 1;
      size += VarintSizeBool(console_) + 1;
      return size;
    }

    void Clear() {
      id_ = static_cast< uint32_t >(0);
      start_time_ = static_cast< uint32_t >(0);
      inputs_.clear();
      outputs_.clear();
      desc_.clear();
      command_.clear();
      console_ = static_cast< bool >(0);
    }

    uint32_t* mutable_id() {
      has_id_ = true;
      return &id_;
    }
    void set_id(const uint32_t& value) {
      has_id_ = true;
      id_ = value;
    }
    uint32_t* mutable_start_time() {
      has_start_time_ = true;
      return &start_time_;
    }
    void set_start_time(const uint32_t& value) {
      has_start_time_ = true;
      start_time_ = value;
    }
    std::vector< std::string >* mutable_inputs() {
      has_inputs_ = true;
      return &inputs_;
    }
    void add_inputs(const std::string& value) {
      has_inputs_ = true;
      inputs_.push_back(value);
    }
    void set_inputs(const std::vector< std::string >& value) {
      has_inputs_ = true;
      inputs_ = value;
    }
    std::vector< std::string >* mutable_outputs() {
      has_outputs_ = true;
      return &outputs_;
    }
    void add_outputs(const std::string& value) {
      has_outputs_ = true;
      outputs_.push_back(value);
    }
    void set_outputs(const std::vector< std::string >& value) {
      has_outputs_ = true;
      outputs_ = value;
    }
    std::string* mutable_desc() {
      has_desc_ = true;
      return &desc_;
    }
    void set_desc(const std::string& value) {
      has_desc_ = true;
      desc_ = value;
    }
    std::string* mutable_command() {
      has_command_ = true;
      return &command_;
    }
    void set_command(const std::string& value) {
      has_command_ = true;
      command_ = value;
    }
    bool* mutable_console() {
      has_console_ = true;
      return &console_;
    }
    void set_console(const bool& value) {
      has_console_ = true;
      console_ = value;
    }
  };

  struct EdgeFinished {
    uint32_t id_;
    bool has_id_;
    uint32_t end_time_;
    bool has_end_time_;
    int32_t status_;
    bool has_status_;
    std::string output_;
    bool has_output_;
    uint32_t user_time_;
    bool has_user_time_;
    uint32_t system_time_;
    bool has_system_time_;
    uint64_t max_rss_kb_;
    bool has_max_rss_kb_;
    uint64_t minor_page_faults_;
    bool has_minor_page_faults_;
    uint64_t major_page_faults_;
    bool has_major_page_faults_;
    uint64_t io_input_kb_;
    bool has_io_input_kb_;
    uint64_t io_output_kb_;
    bool has_io_output_kb_;
    uint64_t voluntary_context_switches_;
    bool has_voluntary_context_switches_;
    uint64_t involuntary_context_switches_;
    bool has_involuntary_context_switches_;

    EdgeFinished() {
      has_id_ = false;
      id_ = static_cast< uint32_t >(0);
      has_end_time_ = false;
      end_time_ = static_cast< uint32_t >(0);
      has_status_ = false;
      status_ = static_cast< int32_t >(0);
      has_output_ = false;
      has_user_time_ = false;
      user_time_ = static_cast< uint32_t >(0);
      has_system_time_ = false;
      system_time_ = static_cast< uint32_t >(0);
      has_max_rss_kb_ = false;
      max_rss_kb_ = static_cast< uint64_t >(0);
      has_minor_page_faults_ = false;
      minor_page_faults_ = static_cast< uint64_t >(0);
      has_major_page_faults_ = false;
      major_page_faults_ = static_cast< uint64_t >(0);
      has_io_input_kb_ = false;
      io_input_kb_ = static_cast< uint64_t >(0);
      has_io_output_kb_ = false;
      io_output_kb_ = static_cast< uint64_t >(0);
      has_voluntary_context_switches_ = false;
      voluntary_context_switches_ = static_cast< uint64_t >(0);
      has_involuntary_context_switches_ = false;
      involuntary_context_switches_ = static_cast< uint64_t >(0);
    }

    EdgeFinished(const EdgeFinished&);
    void operator=(const EdgeFinished&);

    void SerializeToOstream(std::ostream* output__) const {
      WriteVarint32(output__, 1, id_);
      WriteVarint32(output__, 2, end_time_);
      WriteVarint32(output__, 3, ZigZagEncode32(status_));
      WriteString(output__, 4, output_);
      WriteVarint32(output__, 5, user_time_);
      WriteVarint32(output__, 6, system_time_);
      WriteVarint64(output__, 7, max_rss_kb_);
      WriteVarint64(output__, 8, minor_page_faults_);
      WriteVarint64(output__, 9, major_page_faults_);
      WriteVarint64(output__, 10, io_input_kb_);
      WriteVarint64(output__, 11, io_output_kb_);
      WriteVarint64(output__, 12, voluntary_context_switches_);
      WriteVarint64(output__, 13, involuntary_context_switches_);
    }

    size_t ByteSizeLong() const {
      size_t size = 0;
      size += VarintSize32(id_) + 1;
      size += VarintSize32(end_time_) + 1;
      size += VarintSize32(ZigZagEncode32(status_)) + 1;
      size += StringSize(output_) + 1;
      size += VarintSize32(user_time_) + 1;
      size += VarintSize32(system_time_) + 1;
      size += VarintSize64(max_rss_kb_) + 1;
      size += VarintSize64(minor_page_faults_) + 1;
      size += VarintSize64(major_page_faults_) + 1;
      size += VarintSize64(io_input_kb_) + 1;
      size += VarintSize64(io_output_kb_) + 1;
      size += VarintSize64(voluntary_context_switches_) + 1;
      size += VarintSize64(involuntary_context_switches_) + 1;
      return size;
    }

    void Clear() {
      id_ = static_cast< uint32_t >(0);
      end_time_ = static_cast< uint32_t >(0);
      status_ = static_cast< int32_t >(0);
      output_.clear();
      user_time_ = static_cast< uint32_t >(0);
      system_time_ = static_cast< uint32_t >(0);
      max_rss_kb_ = static_cast< uint64_t >(0);
      minor_page_faults_ = static_cast< uint64_t >(0);
      major_page_faults_ = static_cast< uint64_t >(0);
      io_input_kb_ = static_cast< uint64_t >(0);
      io_output_kb_ = static_cast< uint64_t >(0);
      voluntary_context_switches_ = static_cast< uint64_t >(0);
      involuntary_context_switches_ = static_cast< uint64_t >(0);
    }

    uint32_t* mutable_id() {
      has_id_ = true;
      return &id_;
    }
    void set_id(const uint32_t& value) {
      has_id_ = true;
      id_ = value;
    }
    uint32_t* mutable_end_time() {
      has_end_time_ = true;
      return &end_time_;
    }
    void set_end_time(const uint32_t& value) {
      has_end_time_ = true;
      end_time_ = value;
    }
    int32_t* mutable_status() {
      has_status_ = true;
      return &status_;
    }
    void set_status(const int32_t& value) {
      has_status_ = true;
      status_ = value;
    }
    std::string* mutable_output() {
      has_output_ = true;
      return &output_;
    }
    void set_output(const std::string& value) {
      has_output_ = true;
      output_ = value;
    }
    uint32_t* mutable_user_time() {
      has_user_time_ = true;
      return &user_time_;
    }
    void set_user_time(const uint32_t& value) {
      has_user_time_ = true;
      user_time_ = value;
    }
    uint32_t* mutable_system_time() {
      has_system_time_ = true;
      return &system_time_;
    }
    void set_system_time(const uint32_t& value) {
      has_system_time_ = true;
      system_time_ = value;
    }
    uint64_t* mutable_max_rss_kb() {
      has_max_rss_kb_ = true;
      return &max_rss_kb_;
    }
    void set_max_rss_kb(const uint64_t& value) {
      has_max_rss_kb_ = true;
      max_rss_kb_ = value;
    }
    uint64_t* mutable_minor_page_faults() {
      has_minor_page_faults_ = true;
      return &minor_page_faults_;
    }
    void set_minor_page_faults(const uint64_t& value) {
      has_minor_page_faults_ = true;
      minor_page_faults_ = value;
    }
    uint64_t* mutable_major_page_faults() {
      has_major_page_faults_ = true;
      return &major_page_faults_;
    }
    void set_major_page_faults(const uint64_t& value) {
      has_major_page_faults_ = true;
      major_page_faults_ = value;
    }
    uint64_t* mutable_io_input_kb() {
      has_io_input_kb_ = true;
      return &io_input_kb_;
    }
    void set_io_input_kb(const uint64_t& value) {
      has_io_input_kb_ = true;
      io_input_kb_ = value;
    }
    uint64_t* mutable_io_output_kb() {
      has_io_output_kb_ = true;
      return &io_output_kb_;
    }
    void set_io_output_kb(const uint64_t& value) {
      has_io_output_kb_ = true;
      io_output_kb_ = value;
    }
    uint64_t* mutable_voluntary_context_switches() {
      has_voluntary_context_switches_ = true;
      return &voluntary_context_switches_;
    }
    void set_voluntary_context_switches(const uint64_t& value) {
      has_voluntary_context_switches_ = true;
      voluntary_context_switches_ = value;
    }
    uint64_t* mutable_involuntary_context_switches() {
      has_involuntary_context_switches_ = true;
      return &involuntary_context_switches_;
    }
    void set_involuntary_context_switches(const uint64_t& value) {
      has_involuntary_context_switches_ = true;
      involuntary_context_switches_ = value;
    }
  };

  struct Message {
    enum Level {
      INFO = 0,
      WARNING = 1,
      ERROR = 2,
      DEBUG = 3,
    };

    ::ninja::Status::Message::Level level_;
    bool has_level_;
    std::string message_;
    bool has_message_;

    Message() {
      has_level_ = false;
      level_ = static_cast< ::ninja::Status::Message::Level >(0);
      has_message_ = false;
    }

    Message(const Message&);
    void operator=(const Message&);

    void SerializeToOstream(std::ostream* output__) const {
      WriteVarint32SignExtended(output__, 1, static_cast<int32_t>(level_));
      WriteString(output__, 2, message_);
    }

    size_t ByteSizeLong() const {
      size_t size = 0;
      size += VarintSize32SignExtended(static_cast<int32_t>(level_)) + 1;
      size += StringSize(message_) + 1;
      return size;
    }

    void Clear() {
      level_ = static_cast< ::ninja::Status::Message::Level >(0);
      message_.clear();
    }

    ::ninja::Status::Message::Level* mutable_level() {
      has_level_ = true;
      return &level_;
    }
    void set_level(const ::ninja::Status::Message::Level& value) {
      has_level_ = true;
      level_ = value;
    }
    std::string* mutable_message() {
      has_message_ = true;
      return &message_;
    }
    void set_message(const std::string& value) {
      has_message_ = true;
      message_ = value;
    }
  };

  ::ninja::Status::TotalEdges total_edges_;
  bool has_total_edges_;
  ::ninja::Status::BuildStarted build_started_;
  bool has_build_started_;
  ::ninja::Status::BuildFinished build_finished_;
  bool has_build_finished_;
  ::ninja::Status::EdgeStarted edge_started_;
  bool has_edge_started_;
  ::ninja::Status::EdgeFinished edge_finished_;
  bool has_edge_finished_;
  ::ninja::Status::Message message_;
  bool has_message_;

  Status() {
    has_total_edges_ = false;
    has_build_started_ = false;
    has_build_finished_ = false;
    has_edge_started_ = false;
    has_edge_finished_ = false;
    has_message_ = false;
  }

  Status(const Status&);
  void operator=(const Status&);

  void SerializeToOstream(std::ostream* output__) const {
    if (has_total_edges_) {
      WriteLengthDelimited(output__, 1,
                           total_edges_.ByteSizeLong());
      total_edges_.SerializeToOstream(output__);
    }
    if (has_build_started_) {
      WriteLengthDelimited(output__, 2,
                           build_started_.ByteSizeLong());
      build_started_.SerializeToOstream(output__);
    }
    if (has_build_finished_) {
      WriteLengthDelimited(output__, 3,
                           build_finished_.ByteSizeLong());
      build_finished_.SerializeToOstream(output__);
    }
    if (has_edge_started_) {
      WriteLengthDelimited(output__, 4,
                           edge_started_.ByteSizeLong());
      edge_started_.SerializeToOstream(output__);
    }
    if (has_edge_finished_) {
      WriteLengthDelimited(output__, 5,
                           edge_finished_.ByteSizeLong());
      edge_finished_.SerializeToOstream(output__);
    }
    if (has_message_) {
      WriteLengthDelimited(output__, 6,
                           message_.ByteSizeLong());
      message_.SerializeToOstream(output__);
    }
  }

  size_t ByteSizeLong() const {
    size_t size = 0;
    if (has_total_edges_) {
      size += 1 + VarintSize32(total_edges_.ByteSizeLong());
      size += total_edges_.ByteSizeLong();
    }
    if (has_build_started_) {
      size += 1 + VarintSize32(build_started_.ByteSizeLong());
      size += build_started_.ByteSizeLong();
    }
    if (has_build_finished_) {
      size += 1 + VarintSize32(build_finished_.ByteSizeLong());
      size += build_finished_.ByteSizeLong();
    }
    if (has_edge_started_) {
      size += 1 + VarintSize32(edge_started_.ByteSizeLong());
      size += edge_started_.ByteSizeLong();
    }
    if (has_edge_finished_) {
      size += 1 + VarintSize32(edge_finished_.ByteSizeLong());
      size += edge_finished_.ByteSizeLong();
    }
    if (has_message_) {
      size += 1 + VarintSize32(message_.ByteSizeLong());
      size += message_.ByteSizeLong();
    }
    return size;
  }

  void Clear() {
    if (has_total_edges_) {
      total_edges_.Clear();
      has_total_edges_ = false;
    }
    if (has_build_started_) {
      build_started_.Clear();
      has_build_started_ = false;
    }
    if (has_build_finished_) {
      build_finished_.Clear();
      has_build_finished_ = false;
    }
    if (has_edge_started_) {
      edge_started_.Clear();
      has_edge_started_ = false;
    }
    if (has_edge_finished_) {
      edge_finished_.Clear();
      has_edge_finished_ = false;
    }
    if (has_message_) {
      message_.Clear();
      has_message_ = false;
    }
  }

  ::ninja::Status::TotalEdges* mutable_total_edges() {
    has_total_edges_ = true;
    return &total_edges_;
  }
  ::ninja::Status::BuildStarted* mutable_build_started() {
    has_build_started_ = true;
    return &build_started_;
  }
  ::ninja::Status::BuildFinished* mutable_build_finished() {
    has_build_finished_ = true;
    return &build_finished_;
  }
  ::ninja::Status::EdgeStarted* mutable_edge_started() {
    has_edge_started_ = true;
    return &edge_started_;
  }
  ::ninja::Status::EdgeFinished* mutable_edge_finished() {
    has_edge_finished_ = true;
    return &edge_finished_;
  }
  ::ninja::Status::Message* mutable_message() {
    has_message_ = true;
    return &message_;
  }
};

}
#endif // NINJA_FRONTEND_PB_H