|
Skyscraper 2.0
|
#include <callstation.h>


Classes | |
| class | Timer |
Public Member Functions | |
| CallStation (Object *parent, int floornum, int number) | |
| ~CallStation () | |
| ButtonPanel * | CreateButtonPanel (const std::string &texture, int rows, int columns, const std::string &direction, Real width, Real height, Real spacingX, Real spacingY, Real tw, Real th) |
| void | Enabled (bool value) |
| bool | IsEnabled () |
| void | Report (const std::string &message) |
| bool | ReportError (const std::string &message) |
| int | GetFloor () |
| ButtonPanel * | GetPanel () |
| void | RemovePanel () |
| bool | SelectFloor (int floor) |
| void | SetController (int number) |
| DispatchController * | GetController () |
| void | SetPosition (Vector3 &position) |
| bool | ServicesElevator (int elevator) |
| int | GetElevatorArrived (int starting_floor, int destination_floor) |
| bool | FireService (int value) |
| Indicator * | AddIndicator (const std::string &sound, const std::string &texture_prefix, const std::string &blank_texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real timer_duration) |
| void | UpdateIndicator (const std::string &text, bool play_sound=true) |
| bool | Input (const std::string &text) |
| void | ProcessCache () |
| void | Error (bool type=0) |
| int | GetRecallFloor () |
| void | ReportElevator (Elevator *elevator) |
| bool | Call (bool direction) |
| bool | GetFloorFromID (const std::string &floor, int &result) |
| void | SetLightsGroup (int up, int down) |
| void | UpLight (bool value) |
| void | DownLight (bool value) |
| void | SetLights (int up, int down) |
| bool | GetUpStatus () |
| bool | GetDownStatus () |
| Control * | GetUpControl () |
| Control * | GetDownControl () |
| bool | Press (bool up) |
| bool | CreateCallButtons (const std::string &sound_file_up, const std::string &sound_file_down, std::string BackTexture, const std::string &UpButtonTexture, const std::string &UpButtonTexture_Lit, const std::string &DownButtonTexture, const std::string &DownButtonTexture_Lit, const std::string &direction, Real BackWidth, Real BackHeight, bool ShowBack, Real tw, Real th) |
| int | GetElevatorArrivedStandard (int floor, bool direction) |
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 () |
| virtual void | Loop () |
| void | RegisterLoop (Object *object) |
| void | UnregisterLoop (Object *object) |
| 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 () |
Public Member Functions inherited from SBS::Lock | |
| Lock (Object *parent) | |
| virtual | ~Lock () |
| void | SetLocked (bool value, int keyid) |
| bool | IsLocked () |
| bool | ToggleLock (bool force=false) |
| int | GetKeyID () |
Public Attributes | |
| std::string | Name |
| int | Number |
| std::vector< std::string > | InvalidInput |
| Real | TimerDelay |
| bool | ShowDirection |
Public Attributes inherited from SBS::Object | |
| std::string | command |
| std::string | command_processed |
| std::string | context |
| int | linenum |
| std::string | includefile |
| bool | parent_deleting |
Private Attributes | |
| ButtonPanel * | panel |
| int | controller |
| bool | is_enabled |
| Floor * | floor |
| Indicator * | indicator |
| std::string | InputCache |
| bool | Locked |
| int | KeyID |
| Timer * | timer |
Additional Inherited Members | |
Protected Member Functions inherited from SBS::Object | |
| void | EnableLoop (bool value) |
| void | LoopChildren () |
| bool | SelfDestruct () |
Protected Attributes inherited from SBS::ObjectBase | |
| SBS * | sbs |
Definition at line 31 of file callstation.h.
| SBS::CallStation::CallStation | ( | Object * | parent, |
| int | floornum, | ||
| int | number ) |
Definition at line 51 of file callstation.cpp.
References controller, floor, SBS::SBS::GetFloor(), indicator, is_enabled, KeyID, Locked, Number, panel, Report(), SBS::ObjectBase::sbs, SBS::ObjectBase::SetName(), SBS::Object::SetValues(), ShowDirection, timer, TimerDelay, SBS::ToString(), and SBS::SBS::Verbose.

| SBS::CallStation::~CallStation | ( | ) |
Definition at line 82 of file callstation.cpp.
References SBS::SBS::FastDelete, floor, GetController(), indicator, SBS::Object::parent_deleting, SBS::Floor::RemoveCallStation(), RemovePanel(), SBS::ObjectBase::sbs, and SBS::DispatchController::UnregisterCallStation().

| Indicator * SBS::CallStation::AddIndicator | ( | const std::string & | sound, |
| const std::string & | texture_prefix, | ||
| const std::string & | blank_texture, | ||
| const std::string & | direction, | ||
| Real | CenterX, | ||
| Real | CenterZ, | ||
| Real | width, | ||
| Real | height, | ||
| Real | voffset, | ||
| Real | timer_duration ) |
Definition at line 259 of file callstation.cpp.
References indicator.
Referenced by Skyscraper::ScriptProcessor::CallStationSection::Run().
| bool SBS::CallStation::Call | ( | bool | direction | ) |
Definition at line 461 of file callstation.cpp.
References SBS::DispatchController::CallElevator(), DownLight(), GetController(), SBS::Lock::IsLocked(), ReportError(), SBS_PROFILE, and UpLight().
Referenced by SBS::Action::Run().

| ButtonPanel * SBS::CallStation::CreateButtonPanel | ( | const std::string & | texture, |
| int | rows, | ||
| int | columns, | ||
| const std::string & | direction, | ||
| Real | width, | ||
| Real | height, | ||
| Real | spacingX, | ||
| Real | spacingY, | ||
| Real | tw, | ||
| Real | th ) |
Definition at line 109 of file callstation.cpp.
References panel, Report(), SBS::ObjectBase::sbs, and SBS::SBS::Verbose.
Referenced by Skyscraper::ScriptProcessor::CallStationSection::Run().

| bool SBS::CallStation::CreateCallButtons | ( | const std::string & | sound_file_up, |
| const std::string & | sound_file_down, | ||
| std::string | BackTexture, | ||
| const std::string & | UpButtonTexture, | ||
| const std::string & | UpButtonTexture_Lit, | ||
| const std::string & | DownButtonTexture, | ||
| const std::string & | DownButtonTexture_Lit, | ||
| const std::string & | direction, | ||
| Real | BackWidth, | ||
| Real | BackHeight, | ||
| bool | ShowBack, | ||
| Real | tw, | ||
| Real | th ) |
Definition at line 637 of file callstation.cpp.
References SBS::ButtonPanel::AddControl(), SBS::TextureManager::EnableLighting(), floor, SBS::DispatchController::GetBottomFloor(), GetController(), SBS::SBS::GetTextureManager(), SBS::DispatchController::GetTopFloor(), SBS::Floor::Number, panel, Report(), SBS::ObjectBase::sbs, and SBS::SBS::Verbose.
Referenced by SBS::Floor::AddCallButtons().

| void SBS::CallStation::DownLight | ( | bool | value | ) |
Definition at line 518 of file callstation.cpp.
References SetLightsGroup().
Referenced by Call().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 123 of file callstation.cpp.
References SBS::ButtonPanel::Enabled(), is_enabled, panel, Report(), SBS::ObjectBase::sbs, and SBS::SBS::Verbose.

| void SBS::CallStation::Error | ( | bool | type = 0 | ) |
Definition at line 394 of file callstation.cpp.
References UpdateIndicator().
Referenced by SBS::DispatchController::CallElevator(), Input(), ProcessCache(), and SBS::DispatchController::RequestRoute().

| bool SBS::CallStation::FireService | ( | int | value | ) |
Definition at line 250 of file callstation.cpp.
References SBS::DispatchController::FireService(), GetController(), and ReportError().
Referenced by Skyscraper::editelevator::On_Fire1Bypass_Select(), Skyscraper::editelevator::On_Fire1Off_Select(), Skyscraper::editelevator::On_Fire1On_Select(), and SBS::Action::Run().

| DispatchController * SBS::CallStation::GetController | ( | ) |
Definition at line 210 of file callstation.cpp.
References controller, SBS::SBS::GetController(), and SBS::ObjectBase::sbs.
Referenced by Call(), CreateCallButtons(), FireService(), GetElevatorArrived(), GetElevatorArrivedStandard(), GetRecallFloor(), SelectFloor(), ServicesElevator(), SetController(), SetLightsGroup(), and ~CallStation().

| Control * SBS::CallStation::GetDownControl | ( | ) |
Definition at line 617 of file callstation.cpp.
References SBS::ButtonPanel::GetControl(), and panel.
Referenced by GetDownStatus(), Press(), and SetLights().

| bool SBS::CallStation::GetDownStatus | ( | ) |
Definition at line 605 of file callstation.cpp.
References GetDownControl().
Referenced by SBS::Person::ProcessRoute(), and SetLights().

| int SBS::CallStation::GetElevatorArrived | ( | int | starting_floor, |
| int | destination_floor ) |
Definition at line 228 of file callstation.cpp.
References GetController(), and SBS::DispatchController::GetElevatorArrived().
Referenced by SBS::Person::ProcessRoute().

| int SBS::CallStation::GetElevatorArrivedStandard | ( | int | floor, |
| bool | direction ) |
Definition at line 239 of file callstation.cpp.
References floor, GetController(), and SBS::DispatchController::GetElevatorArrivedStandard().
Referenced by SBS::Person::ProcessRoute().

| int SBS::CallStation::GetFloor | ( | ) |
Definition at line 163 of file callstation.cpp.
References floor, and SBS::Floor::Number.
Referenced by SBS::DispatchController::CallElevator(), Report(), ReportError(), SBS::Action::Run(), SelectFloor(), and SetPosition().
| bool SBS::CallStation::GetFloorFromID | ( | const std::string & | floor, |
| int & | result ) |
Definition at line 361 of file callstation.cpp.
References floor, SBS::FloorManager::Get(), SBS::FloorManager::GetByID(), SBS::FloorManager::GetByNumberID(), SBS::SBS::GetFloorManager(), SBS::IsNumeric(), SBS::Floor::Number, SBS::ObjectBase::sbs, SBS::ToInt(), and SBS::ToString().
Referenced by Input(), and ProcessCache().

| ButtonPanel * SBS::CallStation::GetPanel | ( | ) |
Definition at line 170 of file callstation.cpp.
References panel.
Referenced by ReportElevator(), and Skyscraper::ScriptProcessor::CallStationSection::Run().
| int SBS::CallStation::GetRecallFloor | ( | ) |
Definition at line 406 of file callstation.cpp.
References GetController(), and SBS::DispatchController::GetRecallFloor().
Referenced by ProcessCache().

| Control * SBS::CallStation::GetUpControl | ( | ) |
Definition at line 612 of file callstation.cpp.
References SBS::ButtonPanel::GetControl(), and panel.
Referenced by GetUpStatus(), Press(), and SetLights().

| bool SBS::CallStation::GetUpStatus | ( | ) |
Definition at line 598 of file callstation.cpp.
References GetUpControl().
Referenced by SBS::Person::ProcessRoute(), and SetLights().

| bool SBS::CallStation::Input | ( | const std::string & | text | ) |
Definition at line 275 of file callstation.cpp.
References Error(), GetFloorFromID(), InputCache, SBS::Lock::IsLocked(), ReportError(), SBS::TimerObject::Start(), SBS::TimerObject::Stop(), timer, TimerDelay, and UpdateIndicator().
Referenced by SBS::Action::Run().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 144 of file callstation.cpp.
References is_enabled.
| bool SBS::CallStation::Press | ( | bool | up | ) |
Definition at line 622 of file callstation.cpp.
References GetDownControl(), GetUpControl(), and SBS::Control::Press().
Referenced by SBS::Person::ProcessRoute(), and SBS::Action::Run().

| void SBS::CallStation::ProcessCache | ( | ) |
Definition at line 324 of file callstation.cpp.
References Error(), floor, GetFloorFromID(), GetRecallFloor(), InputCache, InvalidInput, SBS::IsNumeric(), and SelectFloor().
Referenced by SBS::CallStation::Timer::Notify().

| void SBS::CallStation::RemovePanel | ( | ) |
Definition at line 175 of file callstation.cpp.
References panel, and SBS::Object::parent_deleting.
Referenced by ~CallStation().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 149 of file callstation.cpp.
References GetFloor(), Number, SBS::ObjectBase::Report(), and SBS::ToString().
Referenced by CallStation(), CreateButtonPanel(), CreateCallButtons(), Enabled(), SelectFloor(), SetLights(), and SetLightsGroup().

| void SBS::CallStation::ReportElevator | ( | Elevator * | elevator | ) |
Definition at line 415 of file callstation.cpp.
References SBS::ButtonPanel::Direction, GetPanel(), SBS::Object::GetPosition(), SBS::Elevator::ID, ShowDirection, and UpdateIndicator().

|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 156 of file callstation.cpp.
References GetFloor(), Number, SBS::ObjectBase::ReportError(), and SBS::ToString().
Referenced by Call(), FireService(), Input(), and SelectFloor().

| bool SBS::CallStation::SelectFloor | ( | int | floor | ) |
Definition at line 185 of file callstation.cpp.
References floor, GetController(), GetFloor(), SBS::Lock::IsLocked(), Report(), ReportError(), SBS::DispatchController::RequestRoute(), and SBS::ToString().
Referenced by ProcessCache(), SBS::Person::ProcessRoute(), and SBS::Action::Run().

| bool SBS::CallStation::ServicesElevator | ( | int | elevator | ) |
Definition at line 221 of file callstation.cpp.
References GetController(), and SBS::DispatchController::ServicesElevator().

| void SBS::CallStation::SetController | ( | int | number | ) |
Definition at line 200 of file callstation.cpp.
References controller, GetController(), and SBS::DispatchController::RegisterCallStation().
Referenced by SBS::Floor::AddCallButtons(), and Skyscraper::ScriptProcessor::CallStationSection::Run().

| void SBS::CallStation::SetLights | ( | int | up, |
| int | down ) |
Definition at line 529 of file callstation.cpp.
References GetDownControl(), GetDownStatus(), GetUpControl(), GetUpStatus(), Report(), SBS::ObjectBase::sbs, SBS::Control::SetSelectPosition(), and SBS::SBS::Verbose.

| void SBS::CallStation::SetLightsGroup | ( | int | up, |
| int | down ) |
Definition at line 486 of file callstation.cpp.
References floor, SBS::DispatchController::GetCallStations(), GetController(), SBS::Floor::Number, Report(), SBS::ObjectBase::sbs, and SBS::SBS::Verbose.
Referenced by DownLight(), and UpLight().

| void SBS::CallStation::SetPosition | ( | Vector3 & | position | ) |
Definition at line 215 of file callstation.cpp.
References SBS::Floor::GetBase(), GetFloor(), SBS::SBS::GetFloor(), SBS::ObjectBase::sbs, and SBS::Object::SetPosition().
Referenced by Skyscraper::ScriptProcessor::CallStationSection::Run().

| void SBS::CallStation::UpdateIndicator | ( | const std::string & | text, |
| bool | play_sound = true ) |
Definition at line 269 of file callstation.cpp.
References indicator, and SBS::Indicator::Update().
Referenced by Error(), Input(), and ReportElevator().

| void SBS::CallStation::UpLight | ( | bool | value | ) |
Definition at line 507 of file callstation.cpp.
References SetLightsGroup().
Referenced by Call().

|
private |
Definition at line 82 of file callstation.h.
Referenced by CallStation(), GetController(), and SetController().
|
private |
Definition at line 86 of file callstation.h.
Referenced by CallStation(), CreateCallButtons(), GetElevatorArrivedStandard(), GetFloor(), GetFloorFromID(), ProcessCache(), SelectFloor(), SetLightsGroup(), and ~CallStation().
|
private |
Definition at line 88 of file callstation.h.
Referenced by AddIndicator(), CallStation(), UpdateIndicator(), and ~CallStation().
|
private |
Definition at line 91 of file callstation.h.
Referenced by Input(), and ProcessCache().
| std::vector<std::string> SBS::CallStation::InvalidInput |
Definition at line 37 of file callstation.h.
Referenced by ProcessCache(), and Skyscraper::ScriptProcessor::CallStationSection::Run().
|
private |
Definition at line 84 of file callstation.h.
Referenced by CallStation(), Enabled(), and IsEnabled().
|
private |
Definition at line 94 of file callstation.h.
Referenced by CallStation().
|
private |
Definition at line 93 of file callstation.h.
Referenced by CallStation().
| std::string SBS::CallStation::Name |
Definition at line 35 of file callstation.h.
Referenced by Skyscraper::ScriptProcessor::CallStationSection::Run().
| int SBS::CallStation::Number |
Definition at line 36 of file callstation.h.
Referenced by CallStation(), Report(), and ReportError().
|
private |
Definition at line 81 of file callstation.h.
Referenced by CallStation(), CreateButtonPanel(), CreateCallButtons(), Enabled(), GetDownControl(), GetPanel(), GetUpControl(), and RemovePanel().
| bool SBS::CallStation::ShowDirection |
Definition at line 39 of file callstation.h.
Referenced by CallStation(), ReportElevator(), and Skyscraper::ScriptProcessor::CallStationSection::Run().
|
private |
Definition at line 99 of file callstation.h.
Referenced by CallStation(), and Input().
| Real SBS::CallStation::TimerDelay |
Definition at line 38 of file callstation.h.
Referenced by CallStation(), Input(), and Skyscraper::ScriptProcessor::CallStationSection::Run().