Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

pathstructure.h

00001 /***************************************************************************
00002                           pathstructure.h  -  description
00003       $Id: pathstructure.h 29 2006-07-30 11:50:14Z neoneurone $
00004                              -------------------
00005     begin                : june 17th, 2003
00006     copyright            : (C) 2003-2006 by Duong-Khang NGUYEN
00007     email                : neoneurone @ users sourceforge net
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   any later version.                                                    *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifndef _OPENCITY_PATHSTRUCTURE_H_
00020 #define _OPENCITY_PATHSTRUCTURE_H_ 1
00021 
00022 #include "structure.h"
00023 
00024 
00028 class PathStructure : public Structure  {
00029 public:
00031     PathStructure();
00032     PathStructure( const OPENCITY_STRUCTURE_CODE & enumStructCode );
00033     virtual ~PathStructure();   // virtual since Structure's one is
00034 
00035 
00036 //========================================================================
00041     void
00042     SaveTo( std::fstream& rfs );
00043 
00044 
00045 //========================================================================
00050     void
00051     LoadFrom( std::fstream& rfs );
00052 
00053 
00054     void
00055     AddNeighbour(
00056         const PathStructure & rcNeighbour,
00057         const OPENCITY_DIRECTION & enumDir );
00058 
00059 
00060     void
00061     RemoveNeighbour(
00062         const PathStructure & rcNeighbour,
00063         const OPENCITY_DIRECTION & enumDir );
00064 
00065 
00066     const OC_UBYTE &
00067     GetTraffic() const;
00068 
00069     void
00070     SetTraffic(
00071         const OC_UBYTE & rubTraffic );
00072 
00073     const uint &
00074     GetLength() const;
00075 
00076     void
00077     SetLength(
00078         const uint & rcuiValue );
00079 
00080 
00081 private:
00082     OC_UBYTE ubNumberNeighbour;
00083     OC_UBYTE ubTraffic;
00084 
00085     uint uiLength;      // for pathfinding purpose
00086 };
00087 
00088 #endif
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 

Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2