Skyscraper 2.0
Skyscraper::ScriptProcessor::Section Class Reference

#include <section.h>

Inheritance diagram for Skyscraper::ScriptProcessor::Section:
Collaboration diagram for Skyscraper::ScriptProcessor::Section:

Public Member Functions

 Section (ScriptProcessor *parent)
 
virtual ~Section ()
 
virtual void Reset ()
 
virtual int Run (std::string &LineData)
 
int SplitData (const std::string &string, int start, bool calc=true)
 
int SplitAfterEquals (const std::string &string, bool calc=true)
 
std::string GetAfterEquals (const std::string &string, bool &found_equals)
 
std::string GetBeforeEquals (const std::string &string, bool calc=true)
 
bool GetRange (const std::string &string, int &start, int &end)
 
int ScriptError (std::string message, bool warning=false)
 
int ScriptError ()
 
int ScriptWarning (std::string message)
 
bool IfProc (const std::string &expression)
 
void StoreCommand (SBS::Object *object)
 
int MathFunctions (std::string &LineData)
 
::SBS::MeshObjectGetMeshObject (std::string name)
 
bool GetElevatorCar (std::string &value, int floor, int &elevator, int &car)
 
void GetDirectionStrings (int direction, std::string &face_direction, std::string &open_direction)
 

Protected Member Functions

std::string Calc (const std::string &expression)
 

Protected Attributes

ScriptProcessorparent
 
SBS::SBSSimcore
 
EngineContextengine
 
std::vector< std::string > tempdata
 
bool warn_deprecated
 
ScriptProcessor::ConfigHandlerconfig
 

Friends

class ScriptProcessor
 

Detailed Description

Definition at line 28 of file section.h.

Constructor & Destructor Documentation

◆ Section()

◆ ~Section()

virtual Skyscraper::ScriptProcessor::Section::~Section ( )
inlinevirtual

Definition at line 34 of file section.h.

Member Function Documentation

◆ Calc()

std::string Skyscraper::ScriptProcessor::Section::Calc ( const std::string & expression)
protected

Definition at line 1030 of file section.cpp.

◆ GetAfterEquals()

std::string Skyscraper::ScriptProcessor::Section::GetAfterEquals ( const std::string & string,
bool & found_equals )

Definition at line 107 of file section.cpp.

References SBS::TrimString().

Here is the call graph for this function:

◆ GetBeforeEquals()

std::string Skyscraper::ScriptProcessor::Section::GetBeforeEquals ( const std::string & string,
bool calc = true )

Definition at line 129 of file section.cpp.

References Skyscraper::ScriptProcessor::Calc(), Skyscraper::IsNumeric(), and SBS::TrimString().

Here is the call graph for this function:

◆ GetDirectionStrings()

void Skyscraper::ScriptProcessor::Section::GetDirectionStrings ( int direction,
std::string & face_direction,
std::string & open_direction )

Definition at line 1254 of file section.cpp.

◆ GetElevatorCar()

bool Skyscraper::ScriptProcessor::Section::GetElevatorCar ( std::string & value,
int floor,
int & elevator,
int & car )

◆ GetMeshObject()

◆ GetRange()

bool Skyscraper::ScriptProcessor::Section::GetRange ( const std::string & string,
int & start,
int & end )

Definition at line 176 of file section.cpp.

References Skyscraper::IsNumeric(), Skyscraper::ScriptProcessor::ScriptError(), and SBS::TrimString().

Here is the call graph for this function:

◆ IfProc()

bool Skyscraper::ScriptProcessor::Section::IfProc ( const std::string & expression)

Definition at line 217 of file section.cpp.

References Skyscraper::IsNumeric(), SBS::ReplaceAll(), Skyscraper::ScriptProcessor::ScriptError(), SBS::ToBool(), and SBS::ToFloat().

Here is the call graph for this function:

◆ MathFunctions()

int Skyscraper::ScriptProcessor::Section::MathFunctions ( std::string & LineData)

◆ Reset()

virtual void Skyscraper::ScriptProcessor::Section::Reset ( )
inlinevirtual

Reimplemented in Skyscraper::ScriptProcessor::FloorSection.

Definition at line 35 of file section.h.

Referenced by Skyscraper::ScriptProcessor::Reset().

◆ Run()

◆ ScriptError() [1/2]

int Skyscraper::ScriptProcessor::Section::ScriptError ( )

Definition at line 207 of file section.cpp.

◆ ScriptError() [2/2]

int Skyscraper::ScriptProcessor::Section::ScriptError ( std::string message,
bool warning = false )

Definition at line 202 of file section.cpp.

◆ ScriptWarning()

int Skyscraper::ScriptProcessor::Section::ScriptWarning ( std::string message)

Definition at line 212 of file section.cpp.

◆ SplitAfterEquals()

int Skyscraper::ScriptProcessor::Section::SplitAfterEquals ( const std::string & string,
bool calc = true )

Definition at line 78 of file section.cpp.

References SBS::SplitString(), and SBS::TrimString().

Here is the call graph for this function:

◆ SplitData()

int Skyscraper::ScriptProcessor::Section::SplitData ( const std::string & string,
int start,
bool calc = true )

Definition at line 52 of file section.cpp.

References SBS::SplitString().

Here is the call graph for this function:

◆ StoreCommand()

void Skyscraper::ScriptProcessor::Section::StoreCommand ( SBS::Object * object)

Definition at line 425 of file section.cpp.

Friends And Related Symbol Documentation

◆ ScriptProcessor

friend class ScriptProcessor
friend

Definition at line 30 of file section.h.

Member Data Documentation

◆ config

ScriptProcessor::ConfigHandler* Skyscraper::ScriptProcessor::Section::config
protected

Definition at line 58 of file section.h.

Referenced by Section().

◆ engine

EngineContext* Skyscraper::ScriptProcessor::Section::engine
protected

Definition at line 55 of file section.h.

Referenced by Section().

◆ parent

ScriptProcessor* Skyscraper::ScriptProcessor::Section::parent
protected

Definition at line 53 of file section.h.

Referenced by Section().

◆ Simcore

SBS::SBS* Skyscraper::ScriptProcessor::Section::Simcore
protected

Definition at line 54 of file section.h.

Referenced by Section().

◆ tempdata

std::vector<std::string> Skyscraper::ScriptProcessor::Section::tempdata
protected

Definition at line 56 of file section.h.

◆ warn_deprecated

bool Skyscraper::ScriptProcessor::Section::warn_deprecated
protected

Definition at line 57 of file section.h.

Referenced by Section().


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