C4 Engine
C4 Engine API Documentation

class Graph

Defined in:  TSGraph.h
The Graph class encapsulates a directed graph.
Definition

template <class elementType, class relationType> class Graph : public GraphBase

Member Functions
Graph::Empty Returns a boolean value indicating whether any elements exist in a graph.
Graph::GetGraphElementCount Returns the number of elements in a graph.
Graph::PurgeGraph Destroys all elements belonging to a graph.
Graph::AddGraphElement Adds an element to a graph.
Graph::RemoveGraphElement Removes an element from a graph.
Graph::Predecessor Returns a boolean value indicating whether one element precedes another.
Template Parameters
elementType The type of the class that can be stored as an element in the graph.
relationType The type of the class that represents the relations in the graph.
Constructor

Graph();

Description
The Graph class is used to organize a set of elements and relations arranged as a directed graph.
Base Classes
GraphBase Used internally to encapsulate common functionality that is independent of the template parameter.
See Also

GraphElement

GraphRelation