P4C
The P4 Compiler
Loading...
Searching...
No Matches
match_register.h
1
18
19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_MATCH_REGISTER_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_MATCH_REGISTER_H_
21
22#include <iostream>
23
24#include "backends/tofino/bf-p4c/specs/match_register_spec.h"
25#include "lib/cstring.h"
26
27namespace P4 {
28
29class JSONGenerator;
30class JSONLoader;
31
32class MatchRegister : public MatchRegisterSpec {
33 public:
34 MatchRegister() = default;
35 explicit MatchRegister(cstring n) : MatchRegisterSpec(n) {}
36 explicit MatchRegister(const MatchRegisterSpec &spec) : MatchRegisterSpec(spec) {}
37
39 void toJSON(JSONGenerator &json) const;
40 static MatchRegister fromJSON(JSONLoader &json);
41};
42
43} // namespace P4
44
45#endif /* BACKENDS_TOFINO_BF_P4C_PARDE_MATCH_REGISTER_H_ */
Definition json_generator.h:39
Definition json_loader.h:41
void toJSON(JSONGenerator &json) const
JSON serialization/deserialization.
Definition match_register.cpp:28
Definition cstring.h:85
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
Definition bson.cpp:69