P4C
The P4 Compiler
Loading...
Searching...
No Matches
declaration.h
1/*
2 * Copyright 2017 VMware, Inc.
3 * SPDX-FileCopyrightText: 2017 VMware, Inc.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef IR_DECLARATION_H_
9#define IR_DECLARATION_H_
10
11#include "ir/id.h"
12#include "ir/node.h"
13
14namespace P4::IR {
15
17class IDeclaration : public virtual INode {
18 public:
20 virtual ID getName() const = 0;
21
28 virtual cstring externalName(cstring replace = cstring()) const;
29
38 cstring controlPlaneName(cstring replace = cstring()) const;
39
40 virtual ~IDeclaration() {}
41
42 DECLARE_TYPEINFO_WITH_TYPEID(IDeclaration, NodeKind::IDeclaration, INode);
43};
44
45} // namespace P4::IR
46
47#endif /* IR_DECLARATION_H_ */
The Declaration interface, representing objects with names.
Definition declaration.h:17
virtual ID getName() const =0
Definition inode.h:42
Definition cstring.h:85
Definition constantParsing.h:22
Definition id.h:28