template <class T>
class sbnd::Hierarchy
Types
  • using time_point = hierarchy_node::clock::time_point
  • using hierarchy_node_array = std::vector< hierarchy_node >
  • using resource_array = sbn::resource_array
  • using size_type = typename container_type::size_type
  • using iterator = typename container_type::iterator
  • using const_iterator = typename container_type::const_iterator
  • using container_type = std::unordered_map< sys::socket_address, hierarchy_node >
  • using interface_socket_address_type = sys::interface_socket_address< addr_type >
  • using interface_address_type = sys::interface_address< addr_type >
  • using addr_type = T
Fields
Methods
  • operator=(Hierarchy &&) -> Hierarchy &
  • Hierarchy(Hierarchy &&)
  • operator=(const Hierarchy &) -> Hierarchy &
  • Hierarchy(const Hierarchy &)
  • ~Hierarchy()
  • Hierarchy()
  • read(sbn::kernel_buffer & in) -> void
  • write(sbn::kernel_buffer & out) const -> void
  • num_neighbours() const -> size_type
  • has_superior() const -> bool
  • remove_node(const sys::socket_address & sa, time_point now) -> bool
  • add_subordinate(const hierarchy_node & node, time_point now) -> bool
  • add_superior(const hierarchy_node & node, time_point now) -> bool
  • add_nodes(const hierarchy_node_array & nodes, time_point now) -> bool
  • superior() const -> const hierarchy_node *
  • superior_socket_address() const -> const sys::socket_address &
  • resources(const resource_array & rhs, time_point now) -> bool
  • resources() const -> const resource_array &

    Resources of the current node.

  • this_node() const -> const hierarchy_node &
  • port() const -> sys::port_type
  • netmask() const -> addr_type
  • interface_socket_address() const -> interface_socket_address_type

    Interface address of the current node.

  • socket_address() const -> const sys::socket_address &

    Socket address of the current node.

  • interface_address() const -> interface_address_type

    Interface address of the current node.

  • subordinates() const -> hierarchy_node_array
  • nodes_behind(const sys::socket_address & from) const -> hierarchy_node_array
  • upper_nodes(int depth) const -> hierarchy_node_array
  • lower_nodes(int depth) const -> hierarchy_node_array
  • upper_nodes(const hierarchy_node & from, int depth) const -> hierarchy_node_array
  • lower_nodes(const hierarchy_node & from, int depth) const -> hierarchy_node_array
  • nodes(int radius) const -> hierarchy_node_array
  • nodes() const -> const container_type &
  • Hierarchy(const interface_address_type & ia, sys::port_type port)explicit
Friends
  • template <class X>
    operator<<
template <class T>
operator>>(sbn::kernel_buffer & in, Hierarchy< T > & rhs) -> sbn::kernel_buffer &
template <class X>
operator<<(std::ostream & out, const Hierarchy< X > & rhs) -> std::ostream &
template <class T>
operator<<(sbn::kernel_buffer & out, const Hierarchy< T > & rhs) -> sbn::kernel_buffer &