23#ifndef BM_BM_SIM_NAMED_P4OBJECT_H_
24#define BM_BM_SIM_NAMED_P4OBJECT_H_
33using p4object_id_t = int;
42 : name(name), id(
id) {}
44 std::unique_ptr<SourceInfo> source_info)
45 : name(name), id(
id), source_info(std::move(source_info)) {}
50 const std::string &
get_name()
const {
return name; }
53 p4object_id_t
get_id()
const {
return id; }
65 const SourceInfo *get_source_info()
const {
return source_info.get(); }
70 std::unique_ptr<SourceInfo> source_info;
Definition named_p4object.h:39
NamedP4Object & operator=(NamedP4Object &&other)=default
Default assignment operator.
NamedP4Object(NamedP4Object &&other)=default
Default move constructor.
p4object_id_t get_id() const
Get the compiler-provided id.
Definition named_p4object.h:53
NamedP4Object & operator=(const NamedP4Object &other)=delete
Deleted copy assignment operator.
const std::string & get_name() const
Get the name of the P4 instance.
Definition named_p4object.h:50
NamedP4Object(const NamedP4Object &other)=delete
Deleted copy constructor.