#include <WsfCommGraph.hpp>
Inherits UtScriptAccessible.
|
| | Graph ()=default |
| | Graph (const Graph &aSrc)=default |
| virtual | ~Graph ()=default |
| Graph & | operator= (const Graph &aRhs)=default |
| virtual Node * | FindNode (const Address &aAddress) const |
| virtual const Node * | CreateNode (const Address &aAddress) |
| virtual bool | RemoveNode (const Node *aNodePtr) |
| virtual bool | RemoveNode (const Address &aAddress) |
| virtual Edge * | InsertEdge (const Node *aSourceNode, const Node *aDestinationNode, bool aIsEnabled, bool aIsStatic=false) |
| virtual Edge * | InsertEdge (const Address &aSourceAddress, const Address &aDestinationAddress, bool aIsEnabled, bool aIsStatic=false) |
| virtual bool | EraseEdge (const Node *aSourceNode, const Node *aDestinationNode) |
| virtual bool | EraseEdge (const Address &aSourceAddress, const Address &aDestinationAddress) |
| virtual Edge * | FindEdge (const Node *aSourceNode, const Node *aDestinationNode) |
| virtual Edge * | FindEdge (const Address &aSourceAddress, const Address &aDestinationAddress) |
| std::vector< const Node * > | GetNodes () const |
| virtual EdgeList | GetIncomingNodeEdges (const Node *aNodePtr) |
| virtual EdgeList | GetIncomingNodeEdges (const Address &aAddress) |
| virtual EdgeList | GetOutgoingNodeEdges (const Node *aNodePtr) const |
| virtual EdgeList | GetOutgoingNodeEdges (const Address &aAddress) const |
| virtual EdgeList | GetAllNodeEdges (const Node *aNodePtr) |
| virtual EdgeList | GetAllNodeEdges (const Address &aAddress) |
| virtual void | RemoveNodeEdges (Node *aNode) |
| | Removes all incoming and outgoing edges to this node.
|
| void | SetUserModifiable (bool aCanModify) |
| bool | IsUserModifiable () const |
|
This method finds the correct path from a source node to a destination node if possible (return false on failure). The path to the destination and the cost is provided. The user may provide a derived GraphCost class object that will provide correct node consideration and edge weighting based on the defined GraphCost method implementations. If GraphCost is not provided, the default algorithm considers all nodes and edges regardless of state, and finds the path using the least amount of hops to the destination.
|
| bool | FindPath (const Node *aSourceNode, const Node *aDestinationNode, GraphImpl::NodeList &aPath, double &aCost, const GraphImpl::cost_func *aCostClass=nullptr) const |
| bool | FindPath (const Address &aSourceAddress, const Address &aDestinationAddress, AddressList &aAddressList, double &aCost, const GraphImpl::cost_func *aCostClass=nullptr) const |
| bool | FindAnyPath (const Address &aSourceAddress, const Address &aDestinationAddress, AddressList *aAddressList, double &aCost, const GraphImpl::cost_func *aCostClass=nullptr) const |
| | Finds any path if one exists, with no guarantee that it will be the optimal shortest path.
|
| void | Clear () |
| const char * | GetScriptClassName () const override |
◆ GraphAction
| Enumerator |
|---|
| cADD_NODE | |
| cADD_EDGE | |
| cREMOVE_NODE | |
| cREMOVE_EDGE | |
◆ Graph() [1/2]
| wsf::comm::graph::Graph::Graph |
( |
| ) |
|
|
default |
◆ Graph() [2/2]
| wsf::comm::graph::Graph::Graph |
( |
const Graph & | aSrc | ) |
|
|
default |
◆ ~Graph()
| virtual wsf::comm::graph::Graph::~Graph |
( |
| ) |
|
|
virtualdefault |
◆ Clear()
| void wsf::comm::graph::Graph::Clear |
( |
| ) |
|
◆ CreateNode()
| const Node * wsf::comm::graph::Graph::CreateNode |
( |
const Address & | aAddress | ) |
|
|
virtual |
◆ EraseEdge() [1/2]
| bool wsf::comm::graph::Graph::EraseEdge |
( |
const Address & | aSourceAddress, |
|
|
const Address & | aDestinationAddress ) |
|
virtual |
◆ EraseEdge() [2/2]
| bool wsf::comm::graph::Graph::EraseEdge |
( |
const Node * | aSourceNode, |
|
|
const Node * | aDestinationNode ) |
|
virtual |
◆ FindAnyPath()
| bool wsf::comm::graph::Graph::FindAnyPath |
( |
const Address & | aSourceAddress, |
|
|
const Address & | aDestinationAddress, |
|
|
AddressList * | aAddressList, |
|
|
double & | aCost, |
|
|
const GraphImpl::cost_func * | aCostClass = nullptr ) const |
◆ FindEdge() [1/2]
| Edge * wsf::comm::graph::Graph::FindEdge |
( |
const Address & | aSourceAddress, |
|
|
const Address & | aDestinationAddress ) |
|
virtual |
◆ FindEdge() [2/2]
| Edge * wsf::comm::graph::Graph::FindEdge |
( |
const Node * | aSourceNode, |
|
|
const Node * | aDestinationNode ) |
|
virtual |
◆ FindNode()
| Node * wsf::comm::graph::Graph::FindNode |
( |
const Address & | aAddress | ) |
const |
|
virtual |
Referenced by wsf::comm::router::Router::DisableNode(), wsf::comm::router::ProtocolOSPF::DR_GraphAdd(), wsf::comm::router::Router::EnableNode(), EraseEdge(), FindEdge(), GetAllNodeEdges(), GetIncomingNodeEdges(), GetOutgoingNodeEdges(), wsf::comm::router::OSPF_Area::InitializeGraphData(), InsertEdge(), operator=(), RemoveNode(), and wsf::comm::router::Router::RemoveNode().
◆ FindPath() [1/2]
| bool wsf::comm::graph::Graph::FindPath |
( |
const Address & | aSourceAddress, |
|
|
const Address & | aDestinationAddress, |
|
|
AddressList & | aAddressList, |
|
|
double & | aCost, |
|
|
const GraphImpl::cost_func * | aCostClass = nullptr ) const |
◆ FindPath() [2/2]
| bool wsf::comm::graph::Graph::FindPath |
( |
const Node * | aSourceNode, |
|
|
const Node * | aDestinationNode, |
|
|
GraphImpl::NodeList & | aPath, |
|
|
double & | aCost, |
|
|
const GraphImpl::cost_func * | aCostClass = nullptr ) const |
◆ GetAllNodeEdges() [1/2]
| EdgeList wsf::comm::graph::Graph::GetAllNodeEdges |
( |
const Address & | aAddress | ) |
|
|
virtual |
◆ GetAllNodeEdges() [2/2]
| EdgeList wsf::comm::graph::Graph::GetAllNodeEdges |
( |
const Node * | aNodePtr | ) |
|
|
virtual |
◆ GetIncomingNodeEdges() [1/2]
| EdgeList wsf::comm::graph::Graph::GetIncomingNodeEdges |
( |
const Address & | aAddress | ) |
|
|
virtual |
◆ GetIncomingNodeEdges() [2/2]
| EdgeList wsf::comm::graph::Graph::GetIncomingNodeEdges |
( |
const Node * | aNodePtr | ) |
|
|
virtual |
◆ GetNodes()
| std::vector< const Node * > wsf::comm::graph::Graph::GetNodes |
( |
| ) |
const |
◆ GetOutgoingNodeEdges() [1/2]
| EdgeList wsf::comm::graph::Graph::GetOutgoingNodeEdges |
( |
const Address & | aAddress | ) |
const |
|
virtual |
◆ GetOutgoingNodeEdges() [2/2]
| EdgeList wsf::comm::graph::Graph::GetOutgoingNodeEdges |
( |
const Node * | aNodePtr | ) |
const |
|
virtual |
◆ GetScriptClassName()
| const char * wsf::comm::graph::Graph::GetScriptClassName |
( |
| ) |
const |
|
inlineoverride |
◆ InsertEdge() [1/2]
| Edge * wsf::comm::graph::Graph::InsertEdge |
( |
const Address & | aSourceAddress, |
|
|
const Address & | aDestinationAddress, |
|
|
bool | aIsEnabled, |
|
|
bool | aIsStatic = false ) |
|
virtual |
◆ InsertEdge() [2/2]
| Edge * wsf::comm::graph::Graph::InsertEdge |
( |
const Node * | aSourceNode, |
|
|
const Node * | aDestinationNode, |
|
|
bool | aIsEnabled, |
|
|
bool | aIsStatic = false ) |
|
virtual |
◆ IsUserModifiable()
| bool wsf::comm::graph::Graph::IsUserModifiable |
( |
| ) |
const |
|
inline |
◆ operator=()
| Graph & wsf::comm::graph::Graph::operator= |
( |
const Graph & | aRhs | ) |
|
|
default |
References CreateNode(), EraseEdge(), FindEdge(), FindNode(), GetAllNodeEdges(), GetIncomingNodeEdges(), GetNodes(), GetOutgoingNodeEdges(), Graph(), InsertEdge(), RemoveNode(), and RemoveNodeEdges().
◆ RemoveNode() [1/2]
| bool wsf::comm::graph::Graph::RemoveNode |
( |
const Address & | aAddress | ) |
|
|
virtual |
◆ RemoveNode() [2/2]
| bool wsf::comm::graph::Graph::RemoveNode |
( |
const Node * | aNodePtr | ) |
|
|
virtual |
◆ RemoveNodeEdges()
| void wsf::comm::graph::Graph::RemoveNodeEdges |
( |
Node * | aNode | ) |
|
|
virtual |
◆ SetUserModifiable()
| void wsf::comm::graph::Graph::SetUserModifiable |
( |
bool | aCanModify | ) |
|
|
inline |
The documentation for this class was generated from the following files: