#include <Graph.h>
It may represent a object in the modelled world and is connected to other vertices through edges. It also can store any data.
Definition at line 308 of file Graph.h.
Public Member Functions | |
Edge * | AddEdge (Vertex *ToVertex) |
Adds a new edge that starts in the vertex. | |
bool | DeleteEdge (Vertex *ToVertex) |
Removes an edge from the vertex by its end vertex. | |
bool | DeleteEdge (class Edge *Edge) |
Removes an edge from the vertex. | |
void | DeleteEdges () |
Removes all edges from the vertex. | |
void * | GetData () |
Returns the data stored in the vertex. | |
EdgeArray * | GetEdges () |
Returns an EdgeArray of all edges that start in the vertex. | |
void | SetData (void *data) |
Sets any data to be stored in the vertex. | |
Private Member Functions | |
Vertex (class Graph *Graph) | |
Creates a new vertex. | |
virtual | ~Vertex () |
Destroys the vertex. | |
Private Attributes | |
friend | ArrayList<Edge> |
friend | ArrayList<Vertex> |
void * | Data |
Any application's data to store in the vertex. | |
friend | Edge |
friend | EdgeArray |
EdgeArray * | Edges |
All edges that start in the vertex. | |
Graph * | Graph |
The graph the vertex belongs to. | |
friend | Graph |
friend | Vertex |
friend | VertexArray |
|
Creates a new vertex.
|
|
Destroys the vertex.
|
|
Adds a new edge that starts in the vertex. It is created by the method and a pointer to the new edge is returned.
|
|
Removes an edge from the vertex by its end vertex. The edge is looked up, it is released from the corresponding vertices, and its memory is freed.
|
|
Removes an edge from the vertex. The edge is looked up, it is released from the corresponding vertices, and its memory is freed.
|
|
Removes all edges from the vertex. All edges are released from their corresponding vertices, and their memory is freed. |
|
Returns the data stored in the vertex.
|
|
Returns an EdgeArray of all edges that start in the vertex.
|
|
Sets any data to be stored in the vertex.
|
|
|
|
|
|
Any application's data to store in the vertex.
|
|
|
|
|
|
All edges that start in the vertex.
|
|
The graph the vertex belongs to.
|
|
|
|
|
|
|