CRoadFeature Class Reference

A class for storing general Road Feature objects to file. More...

#include <RoadFeature.h>

List of all members.

Public Member Functions

 CRoadFeature ()
virtual ~CRoadFeature ()
void Serialize (CArchive &ar)
WORD getType ()
bool getDirPos ()
int getStart ()
int getEnd ()
double getValue ()
void setType (WORD type)
void setDirPos (bool dirpos)
void setStart (int start)
void setEnd (int end)
void setValue (double val)

Private Attributes

double m_Value
int m_End
int m_Start
bool m_DirPos
WORD m_Type


Detailed Description

A class for storing general Road Feature objects to file.

Definition at line 14 of file RoadFeature.h.


Constructor & Destructor Documentation

CRoadFeature::CRoadFeature (  ) 

Definition at line 21 of file RoadFeature.cpp.

References FEAT_SPEEDLIMIT.

00022 {
00023         m_Type          = FEAT_SPEEDLIMIT;
00024         m_DirPos        = true;
00025         m_Start         = 0;
00026         m_End           = 1000;
00027         m_Value         = 41.7; //  in m/s - about 150 km/h!
00028 }

CRoadFeature::~CRoadFeature (  )  [virtual]

Definition at line 30 of file RoadFeature.cpp.

00031 {
00032 
00033 }


Member Function Documentation

void CRoadFeature::Serialize ( CArchive &  ar  ) 

Definition at line 35 of file RoadFeature.cpp.

References m_DirPos, m_End, m_Start, m_Type, and m_Value.

00036 {
00037     if (ar.IsStoring())
00038     {
00039         ar      << m_Type
00040                         << static_cast<int>(m_DirPos)   // because I read in an int below
00041                         << m_Start
00042                         << m_End
00043                         << m_Value;
00044     }
00045     else
00046         {
00047                 int temp;
00048         ar      >> m_Type
00049                         >> temp
00050                         >> m_Start
00051                         >> m_End
00052                         >> m_Value;
00053 
00054                 m_DirPos = temp == 0 ? false : true;
00055         }
00056 }

WORD CRoadFeature::getType (  ) 

bool CRoadFeature::getDirPos (  ) 

int CRoadFeature::getStart (  ) 

int CRoadFeature::getEnd (  ) 

double CRoadFeature::getValue (  ) 

void CRoadFeature::setType ( WORD  type  ) 

Definition at line 83 of file RoadFeature.cpp.

References m_Type.

Referenced by CRoadFeaturesDlg::SetParamData().

00084 {
00085         m_Type = type;
00086 }

void CRoadFeature::setDirPos ( bool  dirpos  ) 

Definition at line 88 of file RoadFeature.cpp.

References m_DirPos.

Referenced by CRoadFeaturesDlg::SetParamData().

00089 {
00090         m_DirPos = dirpos;
00091 }

void CRoadFeature::setStart ( int  start  ) 

Definition at line 93 of file RoadFeature.cpp.

References m_Start.

Referenced by CRoadFeaturesDlg::OnValidate(), and CRoadFeaturesDlg::SetParamData().

00094 {
00095         m_Start = start;
00096 }

void CRoadFeature::setEnd ( int  end  ) 

Definition at line 98 of file RoadFeature.cpp.

References m_End.

Referenced by CRoadFeaturesDlg::OnValidate(), and CRoadFeaturesDlg::SetParamData().

00099 {
00100         m_End = end;
00101 }

void CRoadFeature::setValue ( double  val  ) 

Definition at line 103 of file RoadFeature.cpp.

References m_Value.

Referenced by CRoadFeaturesDlg::SetParamData().

00104 {
00105         m_Value = val;
00106 }


Member Data Documentation

double CRoadFeature::m_Value [private]

Definition at line 39 of file RoadFeature.h.

Referenced by getValue(), Serialize(), and setValue().

int CRoadFeature::m_End [private]

Definition at line 40 of file RoadFeature.h.

Referenced by getEnd(), Serialize(), and setEnd().

int CRoadFeature::m_Start [private]

Definition at line 41 of file RoadFeature.h.

Referenced by getStart(), Serialize(), and setStart().

bool CRoadFeature::m_DirPos [private]

Definition at line 42 of file RoadFeature.h.

Referenced by getDirPos(), Serialize(), and setDirPos().

WORD CRoadFeature::m_Type [private]

Definition at line 43 of file RoadFeature.h.

Referenced by getType(), Serialize(), and setType().


The documentation for this class was generated from the following files:

Generated on Wed Aug 20 00:48:46 2008 for EvolveTraffic by  doxygen 1.5.6