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

mapnode.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 *       FILE:     MAPNODE.h
00003 *       AUTHOR:   E. Otis O
00004 *       DATE:     17 April 1993
00005 *       MODIFIED: 30 April 1993 (5:00 pm)
00006 *       PURPOSE:
00007 *         Functions to store and manipulate a node.
00008 ***********************************************************************/
00009 
00010 #ifndef _MAPNODE_H
00011 #define _MAPNODE_H
00012 
00013 #include "link.h"
00014 
00015 
00016 
00017 
00018 
00019 
00020 /**********************************************************************
00021 *       Class Definition
00022 ***********************************************************************/
00023 
00024 class MapNode {
00025 
00026   Route *links;  // array to store adjacent (linked) nodes
00027   char  *name;   // stores the name of a node
00028 
00029  public:
00030   int x, y,      // graphic coordinates of a node
00031       numLinks,  // number of adjacent (linked) nodes
00032       numJoins;
00033 
00034   MapNode(void) { numLinks= 0; links= NULL; name= NULL; }
00035   ~MapNode()    { delete [] links;  delete name; }
00036 
00037   void get_name(char*, int);
00038   void get_link(int, mode);
00039   void get_join(int join)
00040     { if (numLinks > 0) links[numLinks-1].get_join(join); }
00041 
00042   bool is_link(mode);
00043   bool is_link(int, mode);
00044   vect find_vector(int);
00045   int  find_link(int);
00046   int  find_join(int link, int join) { return links[link].find_join(join); }
00047   char* find_name(int link) { return name; }
00048 
00049   int  num_joins(int link) { return links[link].numJoins; }
00050 
00051   void show_node(void);
00052 };
00053 
00054 
00055 
00056 #endif
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 

Generated on Sun Jul 6 23:07:15 2003 for Scotland Yard by doxygen1.2.15