P4C
The P4 Compiler
Loading...
Searching...
No Matches
extern_info.h
1/*
2 * SPDX-FileCopyrightText: 2024 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_EXTERN_INFO_H_
8#define BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_EXTERN_INFO_H_
9
10#include <sys/types.h>
11
12#include "ir/id.h"
13#include "ir/ir.h"
14#include "ir/vector.h"
15
16namespace P4::P4Tools::P4Testgen {
17
20class ExternInfo {
21 public:
23 const IR::MethodCallExpression &originalCall;
25 const IR::PathExpression &externObjectRef;
30
31 ExternInfo(const IR::MethodCallExpression &originalCall,
32 const IR::PathExpression &externObjectRef, const IR::ID &methodName,
38
40 ExternInfo &operator=(const ExternInfo &) = delete;
41 ExternInfo &operator=(ExternInfo &&) = delete;
42};
43
44} // namespace P4::P4Tools::P4Testgen
45
46#endif /* BACKENDS_P4TOOLS_MODULES_TESTGEN_CORE_EXTERN_INFO_H_ */
Definition ir/vector.h:59
const IR::Vector< IR::Argument > & externArguments
Arguments to the extern method.
Definition extern_info.h:29
const IR::MethodCallExpression & originalCall
Reference to the original P4 extern call.
Definition extern_info.h:23
const IR::ID & methodName
Name of the extern method.
Definition extern_info.h:27
ExternInfo & operator=(const ExternInfo &)=delete
Do not accidentally copy-assign the extern info. It is only passed as reference.
const IR::PathExpression & externObjectRef
Name of the extern object the call was a member of, if any.
Definition extern_info.h:25
Definition id.h:28