P4C
The P4 Compiler
Loading...
Searching...
No Matches
test_object.h
1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_LIB_TEST_OBJECT_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_LIB_TEST_OBJECT_H_
3#include <map>
4
5#include "backends/p4tools/common/lib/model.h"
6#include "lib/castable.h"
7#include "lib/cstring.h"
8
9namespace P4::P4Tools::P4Testgen {
10
11/* =========================================================================================
12 * Abstract Test Object Class
13 * ========================================================================================= */
14
15class TestObject : public ICastable {
16 public:
17 TestObject() = default;
18 ~TestObject() override = default;
19 TestObject(const TestObject &) = default;
20 TestObject(TestObject &&) = default;
21 TestObject &operator=(const TestObject &) = default;
22 TestObject &operator=(TestObject &&) = default;
23
25 [[nodiscard]] virtual cstring getObjectName() const = 0;
26
29 [[nodiscard]] virtual const TestObject *evaluate(const Model &model, bool doComplete) const = 0;
30
31 DECLARE_TYPEINFO(TestObject);
32};
33
36
37} // namespace P4::P4Tools::P4Testgen
38
39#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_LIB_TEST_OBJECT_H_ */
Definition castable.h:36
Definition backends/p4tools/common/lib/model.h:18
Definition test_object.h:15
virtual cstring getObjectName() const =0
virtual const TestObject * evaluate(const Model &model, bool doComplete) const =0
Definition cstring.h:85