bmv2
Designing your own switch target with bmv2
Loading...
Searching...
No Matches
pipeline.h
Go to the documentation of this file.
1/* Copyright 2013-present Barefoot Networks, Inc.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/*
17 * Antonin Bas (antonin@barefootnetworks.com)
18 *
19 */
20
22
23#ifndef BM_BM_SIM_PIPELINE_H_
24#define BM_BM_SIM_PIPELINE_H_
25
26#include <string>
27
28#include "control_flow.h"
29#include "named_p4object.h"
30
31namespace bm {
32
36class Pipeline : public NamedP4Object {
37 public:
38 Pipeline(const std::string &name, p4object_id_t id,
39 ControlFlowNode *first_node)
40 : NamedP4Object(name, id), first_node(first_node) {}
41
46 void apply(Packet *pkt);
47
49 Pipeline(const Pipeline &other) = delete;
51 Pipeline &operator=(const Pipeline &other) = delete;
52
54 Pipeline(Pipeline &&other) /*noexcept*/ = default;
56 Pipeline &operator=(Pipeline &&other) /*noexcept*/ = default;
57
58 private:
59 ControlFlowNode *first_node;
60};
61
62} // namespace bm
63
64#endif // BM_BM_SIM_PIPELINE_H_
Definition named_p4object.h:39
Definition packet.h:98
Definition pipeline.h:36
Pipeline & operator=(const Pipeline &other)=delete
Deleted copy assignment operator.
void apply(Packet *pkt)
Pipeline & operator=(Pipeline &&other)=default
Default move assignment operator.
Pipeline(const Pipeline &other)=delete
Deleted copy constructor.
Pipeline(Pipeline &&other)=default
Default move constructor.