BloombergLP::bdlb::TopologicalSortUtilEdgeTraits

This struct represents a customization point allowing clients to supply input iterators to sort having a value_types other than a bsl::pair. Clients may specialize TopologicalSortUtilEdgeTraits to supply the following: ` /// The type of the directed connection from one node to another /// bsl::pair<NodeType, NodeType> and std::pair<NodeType> work /// without TopologicalSortUtilEdgeTraits specialization. typedef EDGE_TYPE EdgeType;

Synopsis

Declared in <bdlb_topologicalsortutil.h>

template<class EDGE_TYPE>
struct TopologicalSortUtilEdgeTraits;

Description

/// Alias describing the output values from a sort, as well as the /// results of the from and to functions of this edge traits /// instance. Or in other words, the node (or node identifier) type /// of the directed acyclic graph. typedef user-defined NodeType;

/// Return a const reference to the "from" attribute of the /// specified input. Note that the template parameter type /// EDGE_TYPE is an element in the input range to sort. static const NodeType& from(const EDGE_TYPE& input);

/// Return a const reference to the "from" attribute of the /// specified input. Note that the template parameter type /// EDGE_TYPE is an element in the input range to sort. static const NodeType& to(const EDGE_TYPE& input) `

Specializations

NameDescription
TopologicalSortUtilEdgeTraits<bsl::pair<NODE_TYPE, NODE_TYPE>> This struct is a specialization (customization) of TopologicalSortUtilEdgeTraits for bsl::pair<T, T>.