Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Route Class Reference

#include <link.h>

List of all members.

Public Methods

 Route (void)
 ~Route ()
int find_join (int)
void get_join (int)

Public Attributes

int destination
int numJoins
vect type

Private Attributes

int * joins


Constructor & Destructor Documentation

Route::Route void    [inline]
 

Definition at line 28 of file link.h.

References destination, joins, numJoins, Off, and type.

00028 { destination= 0;  type= Off;  numJoins= 0; joins= NULL; }

Route::~Route   [inline]
 

Definition at line 29 of file link.h.

References joins.

00029 { delete joins; }


Member Function Documentation

int Route::find_join int   
 

Definition at line 21 of file link.c.

References between(), joins, and numJoins.

Referenced by MapNode::find_join().

00021                                 {
00022 
00023   if ( between(joinNum, 0, numJoins) ) return joins[joinNum];
00024   else {
00025     cerr << "Join link " << joinNum << " out of range ("
00026          << 0 << ".." << numJoins << ")\n";
00027     return 0;  // node 0 points to NULL
00028   }
00029 }

void Route::get_join int   
 

Definition at line 33 of file link.c.

References joins, and numJoins.

00033                              {
00034 
00035   int *oldJoins= joins;
00036   int num= numJoins;
00037 
00038   joins= new int[++numJoins];
00039   assert ( joins != 0 );
00040   for (int i= 0; i < num; i++) joins[i]= oldJoins[i];
00041   joins[num]= join;
00042 
00043   delete oldJoins;
00044 }


Member Data Documentation

int Route::destination
 

Definition at line 25 of file link.h.

Referenced by MapNode::find_link(), MapNode::find_vector(), MapNode::get_link(), MapNode::is_link(), Route(), and MapNode::show_node().

int* Route::joins [private]
 

Definition at line 22 of file link.h.

Referenced by find_join(), get_join(), Route(), and ~Route().

int Route::numJoins
 

Definition at line 25 of file link.h.

Referenced by find_join(), get_join(), MapNode::num_joins(), and Route().

vect Route::type
 

Definition at line 26 of file link.h.

Referenced by MapNode::find_vector(), MapNode::get_link(), MapNode::is_link(), Route(), and MapNode::show_node().


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 23:07:18 2003 for Scotland Yard by doxygen1.2.15