P4C
The P4 Compiler
Loading...
Searching...
No Matches
pseudoheader.h
1
19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_CLOT_PSEUDOHEADER_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_CLOT_PSEUDOHEADER_H_
21
22#include "backends/tofino/bf-p4c/phv/phv_fields.h"
23#include "field_slice_set.h"
24
27class Pseudoheader : public LiftLess<Pseudoheader> {
28 friend class ClotInfo;
29
30 public:
31 const int id;
32
35
37 const std::vector<const PHV::Field *> fields;
38
39 private:
40 static int nextId;
41
42 public:
43 explicit Pseudoheader(const PovBitSet pov_bits, const std::vector<const PHV::Field *> fields)
44 : id(nextId++), pov_bits(pov_bits), fields(fields) {}
45
47 bool operator<(const Pseudoheader &other) const { return id < other.id; }
48};
49
50#endif /* BACKENDS_TOFINO_BF_P4C_PARDE_CLOT_PSEUDOHEADER_H_ */
Definition clot_info.h:41
Implements comparisons correctly.
Definition field_slice_set.h:25
Definition cmp.h:55
Definition pseudoheader.h:27
const PovBitSet pov_bits
The set of all POV bits under which this pseudoheader is emitted.
Definition pseudoheader.h:34
const std::vector< const PHV::Field * > fields
The sequence of fields that constitute this pseudoheader.
Definition pseudoheader.h:37
bool operator<(const Pseudoheader &other) const
Ordering on id.
Definition pseudoheader.h:47