00001 // RoadSegment.h: interface for the RoadSegment class. 00002 // 00004 00005 #if !defined(AFX_ROADSEGMENT_H__DFD0E9F6_3EB2_47CB_9D5E_408357D1CF04__INCLUDED_) 00006 #define AFX_ROADSEGMENT_H__DFD0E9F6_3EB2_47CB_9D5E_408357D1CF04__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include "stdafx.h" 00013 #include "Truck.h" 00014 #include "Car.h" 00015 #include "IDM.h" 00016 #include "IDMParameterSet.h" 00017 00020 class RoadSegment 00021 { 00022 public: 00023 CIDMParameterSet* getIDMParams(WORD veh_id); 00024 void setIDMParams_Lowloader(CIDMParameterSet *Params); 00025 void setIDMParams_LargeTruck(CIDMParameterSet *Params); 00026 void setIDMParams_SmallTruck(CIDMParameterSet *Params); 00027 void setIDMParams_Crane(CIDMParameterSet *Params); 00028 void setIDMParams_Car(CIDMParameterSet* Params); 00029 bool getDirPos(); 00030 00031 static bool CompareSegments(const RoadSegment* a, const RoadSegment* b); 00032 00033 virtual void removeVehicle(Vehicle* pVeh); 00034 virtual void addVehicle(Vehicle* pVeh); 00035 void setEnd(int end); 00036 void setBeginning(int beginning); 00037 int getEnd() const; 00038 int getBeginning() const; 00039 RoadSegment(); 00040 virtual ~RoadSegment(); 00041 00042 protected: 00043 int m_Beginning; 00044 int m_End; 00045 bool m_DirPos; 00046 CIDMParameterSet* m_pIDMParams_Car; 00047 CIDMParameterSet* m_pIDMParams_Crane; 00048 CIDMParameterSet* m_pIDMParams_SmallTruck; 00049 CIDMParameterSet* m_pIDMParams_LargeTruck; 00050 CIDMParameterSet* m_pIDMParams_Lowloader; 00051 }; 00052 00053 #endif // !defined(AFX_ROADSEGMENT_H__DFD0E9F6_3EB2_47CB_9D5E_408357D1CF04__INCLUDED_)