|
Skyscraper 2.0
|
#include <timer.h>


Public Member Functions | |
| TimerObject (Object *parent, const std::string &name) | |
| virtual | ~TimerObject () |
| void | Start (int milliseconds=-1, bool oneshot=false) |
| void | Stop () |
| virtual void | Notify () |
| bool | IsRunning () |
| void | Loop () |
| unsigned long | GetCurrentTime () |
| void | Report (const std::string &message) |
Public Member Functions inherited from SBS::Object | |
| Object (Object *parent) | |
| virtual | ~Object () |
| void | SetValues (const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true) |
| bool | IsPermanent () |
| bool | IsMovable () |
| const std::string & | GetType () |
| int | GetNumber () |
| void | AddChild (Object *object) |
| Object * | GetChild (int index) |
| int | GetChildrenCount () |
| void | RemoveChild (Object *object) |
| SceneNode * | GetSceneNode () |
| void | ShowBoundingBox (bool value) |
| virtual void | Move (const Vector3 &vector, Real speed=1.0, bool force=false) |
| virtual void | Move (Real X, Real Y, Real Z, Real speed=1.0, bool force=false) |
| virtual void | SetPosition (const Vector3 &position, bool relative=false, bool force=false) |
| virtual void | SetPosition (Real X, Real Y, Real Z, bool relative=false, bool force=false) |
| virtual void | SetPositionY (Real value, bool force=false) |
| virtual Vector3 | GetPosition (bool relative=false) |
| virtual void | Rotate (const Vector3 &vector, Real speed=1.0) |
| virtual void | Rotate (Real X, Real Y, Real Z, Real speed=1.0) |
| virtual void | SetRotation (const Vector3 &rotation) |
| virtual void | SetRotation (Real X, Real Y, Real Z) |
| virtual Vector3 | GetRotation () |
| Quaternion | GetOrientation (bool relative=false) |
| void | SetOrientation (const Quaternion &q, bool relative=false) |
| virtual void | OnMove (bool parent) |
| virtual void | OnRotate (bool parent) |
| virtual void | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
| virtual void | OnUnclick (bool right) |
| virtual void | OnHit () |
| void | NotifyMove (bool parent=false) |
| void | NotifyRotate (bool parent=false) |
| virtual void | ResetState () |
| void | ChangeParent (Object *new_parent) |
| bool | IsGlobal () |
| void | Init (bool children=true) |
| virtual void | OnInit () |
| void | RegisterLoop (Object *object) |
| void | UnregisterLoop (Object *object) |
| virtual void | Enabled (bool value) |
| virtual bool | IsEnabled () |
| std::string | GetNameBase () |
| template<typename T > | |
| bool | IsType () |
| template<typename T > | |
| T * | ConvertTo () |
Public Member Functions inherited from SBS::ObjectBase | |
| ObjectBase (Object *parent) | |
| virtual | ~ObjectBase () |
| Object * | GetParent () |
| SBS * | GetRoot () |
| void | SetName (const std::string &name) |
| const std::string & | GetName () |
| std::string | GetNameBase () |
| virtual bool | ReportError (const std::string &message) |
Private Attributes | |
| int | Interval |
| bool | OneShot |
| unsigned long | CurrentTime |
| unsigned long | LastHit |
| unsigned long | StartTime |
| bool | Running |
Additional Inherited Members | |
Public Attributes inherited from SBS::Object | |
| std::string | command |
| std::string | command_processed |
| std::string | context |
| int | linenum |
| std::string | includefile |
| bool | parent_deleting |
Protected Member Functions inherited from SBS::Object | |
| void | EnableLoop (bool value) |
| void | LoopChildren () |
| bool | SelfDestruct () |
Protected Attributes inherited from SBS::ObjectBase | |
| SBS * | sbs |
| SBS::TimerObject::TimerObject | ( | Object * | parent, |
| const std::string & | name ) |
Definition at line 30 of file timer.cpp.
References CurrentTime, Interval, LastHit, OneShot, Running, SBS::Object::SetValues(), and StartTime.

|
virtual |
| unsigned long SBS::TimerObject::GetCurrentTime | ( | ) |
Definition at line 99 of file timer.cpp.
References CurrentTime.
| bool SBS::TimerObject::IsRunning | ( | ) |
Definition at line 74 of file timer.cpp.
References Running.
Referenced by SBS::ElevatorDoor::Hold(), SBS::Person::IsRandomActivityEnabled(), SBS::Elevator::Loop(), SBS::Elevator::MoveElevatorToFloor(), SBS::ElevatorDoor::ResetNudgeTimer(), and SBS::ElevatorDoor::TimerIsRunning().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 79 of file timer.cpp.
References CurrentTime, SBS::SBS::GetCurrentTime(), Interval, LastHit, Notify(), OneShot, Report(), Running, SBS::ObjectBase::sbs, StartTime, Stop(), and SBS::SBS::Verbose.

|
inlinevirtual |
Reimplemented in SBS::CallStation::Timer, SBS::DirectionalIndicator::Timer, SBS::Door::Timer, SBS::Elevator::Timer, SBS::ElevatorCar::KeypadTimer, SBS::ElevatorDoor::Timer, SBS::Escalator::Timer, SBS::FloorIndicator::Timer, SBS::Indicator::Timer, SBS::Map::Timer, and SBS::Person::Timer.
Definition at line 37 of file timer.h.
Referenced by Loop().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 104 of file timer.cpp.
References SBS::ObjectBase::GetName(), SBS::ObjectBase::GetParent(), and SBS::ObjectBase::Report().
Referenced by Loop(), Start(), and Stop().

| void SBS::TimerObject::Start | ( | int | milliseconds = -1, |
| bool | oneshot = false ) |
Definition at line 49 of file timer.cpp.
References SBS::SBS::GetCurrentTime(), Interval, LastHit, OneShot, SBS::SBS::RegisterTimerCallback(), Report(), Running, SBS::ObjectBase::sbs, StartTime, and SBS::SBS::Verbose.
Referenced by SBS::Door::AutoClose(), SBS::DirectionalIndicator::DownLight(), SBS::Elevator::EnableMalfunctions(), SBS::Escalator::EnableMalfunctions(), SBS::Person::EnableRandomActivity(), SBS::FloorIndicator::Flash(), SBS::CallStation::Input(), SBS::ElevatorCar::Input(), SBS::Elevator::Loop(), SBS::Elevator::MoveElevatorToFloor(), SBS::ElevatorDoor::Reset(), SBS::ElevatorDoor::ResetNudgeTimer(), SBS::DirectionalIndicator::SetLights(), SBS::Indicator::Update(), and SBS::DirectionalIndicator::UpLight().

| void SBS::TimerObject::Stop | ( | ) |
Definition at line 62 of file timer.cpp.
References Report(), Running, SBS::ObjectBase::sbs, SBS::SBS::UnregisterTimerCallback(), and SBS::SBS::Verbose.
Referenced by SBS::Door::AutoClose(), SBS::DirectionalIndicator::DownLight(), SBS::Elevator::EnableMalfunctions(), SBS::Escalator::EnableMalfunctions(), SBS::Person::EnableRandomActivity(), SBS::FloorIndicator::Flash(), SBS::ElevatorDoor::Hold(), SBS::CallStation::Input(), SBS::ElevatorCar::Input(), Loop(), SBS::ElevatorDoor::MoveDoors(), SBS::Elevator::MoveElevatorToFloor(), SBS::DirectionalIndicator::Timer::Notify(), SBS::Elevator::Timer::Notify(), SBS::ElevatorDoor::ResetNudgeTimer(), SBS::ElevatorDoor::ResetState(), SBS::DirectionalIndicator::UpLight(), and ~TimerObject().

|
private |
Definition at line 46 of file timer.h.
Referenced by GetCurrentTime(), Loop(), and TimerObject().
|
private |
Definition at line 44 of file timer.h.
Referenced by Loop(), Start(), and TimerObject().
|
private |
Definition at line 47 of file timer.h.
Referenced by Loop(), Start(), and TimerObject().
|
private |
Definition at line 45 of file timer.h.
Referenced by Loop(), Start(), and TimerObject().
|
private |
Definition at line 49 of file timer.h.
Referenced by IsRunning(), Loop(), Start(), Stop(), TimerObject(), and ~TimerObject().
|
private |
Definition at line 48 of file timer.h.
Referenced by Loop(), Start(), and TimerObject().