Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Vertex Class Reference

#include <Graph.h>

List of all members.


Detailed Description

A graph's edge.

It may represent a object in the modelled world and is connected to other vertices through edges. It also can store any data.

Author:
Thomas Jacob

Definition at line 308 of file Graph.h.

Public Member Functions

EdgeAddEdge (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.

EdgeArrayGetEdges ()
 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
EdgeArrayEdges
 All edges that start in the vertex.

GraphGraph
 The graph the vertex belongs to.

friend Graph
friend Vertex
friend VertexArray


Constructor & Destructor Documentation

Vertex class Graph Graph  )  [private]
 

Creates a new vertex.

Parameters:
Graph The graph this vertex belongs to.

virtual ~Vertex  )  [private, virtual]
 

Destroys the vertex.


Member Function Documentation

Edge* AddEdge Vertex ToVertex  ) 
 

Adds a new edge that starts in the vertex.

It is created by the method and a pointer to the new edge is returned.

Parameters:
ToVertex The vertex the edge ends in.
Returns:
The new edge, automatically created by the method.

bool DeleteEdge Vertex ToVertex  ) 
 

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.

Parameters:
ToVertex The vertex the edge ends in.
Returns:
If the deletion was successful.

bool DeleteEdge class Edge Edge  )  [inline]
 

Removes an edge from the vertex.

The edge is looked up, it is released from the corresponding vertices, and its memory is freed.

Parameters:
Edge The edge to be deleted.
Returns:
If the deletion was successful.

void DeleteEdges  )  [inline]
 

Removes all edges from the vertex.

All edges are released from their corresponding vertices, and their memory is freed.

void* GetData  )  [inline]
 

Returns the data stored in the vertex.

Returns:
The data stored in the vertex.

EdgeArray* GetEdges  )  [inline]
 

Returns an EdgeArray of all edges that start in the vertex.

Returns:
All edges as EdgeArray.

void SetData void *  data  )  [inline]
 

Sets any data to be stored in the vertex.

Parameters:
data The data to be stored.


Member Data Documentation

friend ArrayList<Edge> [private]
 

Definition at line 316 of file Graph.h.

friend ArrayList<Vertex> [private]
 

Definition at line 313 of file Graph.h.

void* Data [private]
 

Any application's data to store in the vertex.

Definition at line 334 of file Graph.h.

friend Edge [private]
 

Definition at line 314 of file Graph.h.

friend EdgeArray [private]
 

Definition at line 315 of file Graph.h.

EdgeArray* Edges [private]
 

All edges that start in the vertex.

Definition at line 339 of file Graph.h.

class Graph* Graph [private]
 

The graph the vertex belongs to.

Definition at line 344 of file Graph.h.

friend Graph [private]
 

Definition at line 310 of file Graph.h.

friend Vertex [private]
 

Definition at line 311 of file Graph.h.

friend VertexArray [private]
 

Definition at line 312 of file Graph.h.


The documentation for this class was generated from the following file:
Generated on Tue Oct 3 00:23:41 2006 for ToolBox by doxygen 1.3.6