27 , m_parent(parent.singular())
40 , m_parent(parent.singular())
53 , m_parent(o.m_parent)
61 return (interface::operator==(s) && (m_parent->key() == s.m_parent->key()) &&
62 (m_vlan == s.m_vlan));
66 sub_interface::mk_name(
const interface& parent, vlan_id_t vlan)
68 return (parent.
name() +
"." + std::to_string(vlan));
72 sub_interface::mk_create_cmd(std::queue<cmd*>& q)
74 q.push(
new sub_interface_cmds::create_cmd(
m_hdl,
name(), m_parent->handle(),
81 sub_interface::mk_delete_cmd(std::queue<cmd*>& q)
83 q.push(
new sub_interface_cmds::delete_cmd(
m_hdl));
88 std::shared_ptr<sub_interface>
91 return std::dynamic_pointer_cast<sub_interface>(singular_i());
94 std::shared_ptr<interface>
95 sub_interface::singular_i()
const
97 return m_db.find_or_add(
key(), *
this);
100 std::shared_ptr<sub_interface>
103 return std::dynamic_pointer_cast<sub_interface>(
m_db.find(k));