|
#include "StdAfx.h"
#include "Change.h"
#include "Simulator.h"
CChange::CChange()
{
enabled = false;
}
CChange::~CChange(void)
{
}
double CChange::Time() const
{
return t;
}
int CChange::Index() const
{
return index;
}
void CChange::Expire()
{
}
void CChange::ChangeTime(double t)
{
Simulator()->ChangeTime(this, t);
}
bool CChange::IsEnabled() const
{
return enabled;
}
void CChange::Enable(bool enable)
{
Simulator()->Enable( this, enable );
}
bool CChange::operator <(const CChange &change) const
{
if( enabled )
if( change.enabled )
return Time() < change.Time();
else
return true;
else
return false;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I develop rail signalling simulation technology at EDM where I use C++ and C#, but also love to dabble in functional programming languages such as Clean and Cat.