#include <StatDetector.h>
Public Member Functions | |
CStatDetector () | |
virtual | ~CStatDetector () |
void | Serialize (CArchive &ar) |
std::string | getStdStrMetricsDir () |
WORD | getDetectorType () |
bool | getDirPos () |
WORD | getVehicleType () |
int | getTimeInterval () |
int | getLocation () |
void | setMetricsDir (CString dir) |
void | setDetectorType (WORD type) |
void | setDirPos (bool dirpos) |
void | setVehicleType (WORD type) |
void | setTimeInterval (int interval) |
void | setLocation (int loc) |
Private Attributes | |
CString | m_MetricsDir |
WORD | m_DetectorType |
bool | m_DirPos |
WORD | m_VehicleType |
int | m_TimeInterval |
int | m_Location |
Definition at line 16 of file StatDetector.h.
CStatDetector::CStatDetector | ( | ) |
Definition at line 21 of file StatDetector.cpp.
References METRICS_TYPE_FLOWDENSITY, and METRICS_VEH_ALL.
00022 { 00023 m_DetectorType = METRICS_TYPE_FLOWDENSITY; 00024 m_DirPos = true; 00025 m_VehicleType = METRICS_VEH_ALL; 00026 m_TimeInterval = 60; 00027 m_Location = 1000; 00028 }
CStatDetector::~CStatDetector | ( | ) | [virtual] |
void CStatDetector::Serialize | ( | CArchive & | ar | ) |
Definition at line 35 of file StatDetector.cpp.
References m_DetectorType, m_DirPos, m_Location, m_TimeInterval, and m_VehicleType.
00036 { 00037 if (ar.IsStoring()) 00038 { 00039 ar << m_DetectorType 00040 << static_cast<int>(m_DirPos) // because I read in an int below 00041 << m_VehicleType 00042 << m_TimeInterval 00043 << m_Location; 00044 } 00045 else 00046 { 00047 int temp; 00048 ar >> m_DetectorType 00049 >> temp 00050 >> m_VehicleType 00051 >> m_TimeInterval 00052 >> m_Location; 00053 00054 m_DirPos = temp == 0 ? false : true; 00055 } 00056 }
std::string CStatDetector::getStdStrMetricsDir | ( | ) |
Definition at line 113 of file StatDetector.cpp.
References m_MetricsDir.
Referenced by Road::SetMetricDetFromStatDet().
00114 { 00115 std::string str = (LPCTSTR)m_MetricsDir; 00116 return str; 00117 }
WORD CStatDetector::getDetectorType | ( | ) |
Definition at line 58 of file StatDetector.cpp.
References m_DetectorType.
Referenced by CEvolveTrafficView::DrawDetectors(), CStatDetectorDlg::LoadStatDetectorsIntoGrid(), CStatDetectorDlg::OnValidate(), and Road::SetMetricDetFromStatDet().
00059 { 00060 return m_DetectorType; 00061 }
bool CStatDetector::getDirPos | ( | ) |
Definition at line 63 of file StatDetector.cpp.
References m_DirPos.
Referenced by CEvolveTrafficView::DrawDetectors(), CStatDetectorDlg::LoadStatDetectorsIntoGrid(), and Road::SetMetricDetFromStatDet().
00064 { 00065 return m_DirPos; 00066 }
WORD CStatDetector::getVehicleType | ( | ) |
Definition at line 68 of file StatDetector.cpp.
References m_VehicleType.
Referenced by CStatDetectorDlg::LoadStatDetectorsIntoGrid(), and Road::SetMetricDetFromStatDet().
00069 { 00070 return m_VehicleType; 00071 }
int CStatDetector::getTimeInterval | ( | ) |
Definition at line 73 of file StatDetector.cpp.
References m_TimeInterval.
Referenced by CStatDetectorDlg::LoadStatDetectorsIntoGrid(), CStatDetectorDlg::OnValidate(), and Road::SetMetricDetFromStatDet().
00074 { 00075 return m_TimeInterval; 00076 }
int CStatDetector::getLocation | ( | ) |
Definition at line 78 of file StatDetector.cpp.
References m_Location.
Referenced by CEvolveTrafficView::DrawDetectors(), CStatDetectorDlg::LoadStatDetectorsIntoGrid(), CStatDetectorDlg::OnValidate(), and Road::SetMetricDetFromStatDet().
00079 { 00080 return m_Location; 00081 }
void CStatDetector::setMetricsDir | ( | CString | dir | ) |
Definition at line 108 of file StatDetector.cpp.
References m_MetricsDir.
Referenced by CEvolveTrafficDoc::initSim().
00109 { 00110 m_MetricsDir = dir; 00111 }
void CStatDetector::setDetectorType | ( | WORD | type | ) |
Definition at line 83 of file StatDetector.cpp.
References m_DetectorType.
Referenced by CStatDetectorDlg::SetParamData().
00084 { 00085 m_DetectorType = type; 00086 }
void CStatDetector::setDirPos | ( | bool | dirpos | ) |
Definition at line 88 of file StatDetector.cpp.
References m_DirPos.
Referenced by CStatDetectorDlg::SetParamData().
00089 { 00090 m_DirPos = dirpos; 00091 }
void CStatDetector::setVehicleType | ( | WORD | type | ) |
Definition at line 93 of file StatDetector.cpp.
References m_VehicleType.
Referenced by CStatDetectorDlg::SetParamData().
00094 { 00095 m_VehicleType = type; 00096 }
void CStatDetector::setTimeInterval | ( | int | interval | ) |
Definition at line 98 of file StatDetector.cpp.
References m_TimeInterval.
Referenced by CStatDetectorDlg::SetParamData().
00099 { 00100 m_TimeInterval = interval; 00101 }
void CStatDetector::setLocation | ( | int | loc | ) |
Definition at line 103 of file StatDetector.cpp.
References m_Location.
Referenced by CStatDetectorDlg::SetParamData().
00104 { 00105 m_Location = loc; 00106 }
CString CStatDetector::m_MetricsDir [private] |
Definition at line 43 of file StatDetector.h.
Referenced by getStdStrMetricsDir(), and setMetricsDir().
WORD CStatDetector::m_DetectorType [private] |
Definition at line 44 of file StatDetector.h.
Referenced by getDetectorType(), Serialize(), and setDetectorType().
bool CStatDetector::m_DirPos [private] |
Definition at line 45 of file StatDetector.h.
Referenced by getDirPos(), Serialize(), and setDirPos().
WORD CStatDetector::m_VehicleType [private] |
Definition at line 46 of file StatDetector.h.
Referenced by getVehicleType(), Serialize(), and setVehicleType().
int CStatDetector::m_TimeInterval [private] |
Definition at line 47 of file StatDetector.h.
Referenced by getTimeInterval(), Serialize(), and setTimeInterval().
int CStatDetector::m_Location [private] |
Definition at line 48 of file StatDetector.h.
Referenced by getLocation(), Serialize(), and setLocation().