17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 05:09:20 +02:00

refactor(sonar): use override instead of redundant virtual (cpp:S3471)

This commit is contained in:
jerrrrycho
2026-10-10 14:55:56 +02:00
parent c26041f2e7
commit 3d46090e49
14 changed files with 213 additions and 213 deletions

View File

@@ -85,8 +85,8 @@ class TRura : public TPrzekladnik // nieprzekladnik, rura laczaca
private: private:
public: public:
TRura() : TPrzekladnik() {}; TRura() : TPrzekladnik() {};
virtual double P(void) /*override*/; double P(void) override;
virtual void Update(double dt) /*override*/; void Update(double dt) override;
}; };
class TPrzeciwposlizg : public TRura // przy napelnianiu - rura, przy poslizgu - upust class TPrzeciwposlizg : public TRura // przy napelnianiu - rura, przy poslizgu - upust
@@ -97,7 +97,7 @@ class TPrzeciwposlizg : public TRura // przy napelnianiu - rura, przy poslizgu -
public: public:
void SetPoslizg(bool flag); void SetPoslizg(bool flag);
void Update(double dt) /*override*/; void Update(double dt) override;
inline TPrzeciwposlizg() : TRura() inline TPrzeciwposlizg() : TRura()
{ {
Poslizg = false; Poslizg = false;
@@ -117,7 +117,7 @@ class TRapid : public TPrzekladnik {
public: public:
void SetRapidParams(double mult, double size); void SetRapidParams(double mult, double size);
void SetRapidStatus(bool rs); void SetRapidStatus(bool rs);
void Update(double dt) /*override*/; void Update(double dt) override;
inline TRapid() : inline TRapid() :
TPrzekladnik() TPrzekladnik()
{} {}
@@ -131,7 +131,7 @@ class TPrzekCiagly : public TPrzekladnik {
public: public:
void SetMult(double m); void SetMult(double m);
void Update(double dt) /*override*/; void Update(double dt) override;
inline TPrzekCiagly() : inline TPrzekCiagly() :
TPrzekladnik() TPrzekladnik()
{} {}
@@ -145,7 +145,7 @@ class TPrzek_PZZ : public TPrzekladnik {
public: public:
void SetLBP(double P); void SetLBP(double P);
void Update(double dt) /*override*/; void Update(double dt) override;
inline TPrzek_PZZ() : inline TPrzek_PZZ() :
TPrzekladnik() TPrzekladnik()
{} {}
@@ -169,7 +169,7 @@ class TPrzekED : public TRura {
public: public:
void SetP(double P); void SetP(double P);
void Update(double dt) /*override*/; void Update(double dt) override;
inline TPrzekED() : inline TPrzekED() :
TRura() TRura()
{} {}
@@ -209,19 +209,19 @@ class TNESt3 : public TBrake {
inline TNESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : inline TNESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) :
TBrake( i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) TBrake( i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
{} {}
void Init( double const PP, double const HPP, double const LPP, double const BP, int const BDF ) /*override*/; void Init( double const PP, double const HPP, double const LPP, double const BP, int const BDF ) override;
virtual double GetPF( double const PP, double const dt, double const Vel ) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF( double const PP, double const dt, double const Vel ) override; // przeplyw miedzy komora wstepna i PG
void EStParams(double i_crc); // parametry charakterystyczne dla ESt void EStParams(double i_crc); // parametry charakterystyczne dla ESt
virtual double GetCRP() /*override*/; double GetCRP() override;
void CheckState(double const BCP, double &dV1); // glowny przyrzad rozrzadczy void CheckState(double const BCP, double &dV1); // glowny przyrzad rozrzadczy
void CheckReleaser(double const dt); // odluzniacz void CheckReleaser(double const dt); // odluzniacz
double CVs(double const BP); // napelniacz sterujacego double CVs(double const BP); // napelniacz sterujacego
double BVs(double const BCP); // napelniacz pomocniczego double BVs(double const BCP); // napelniacz pomocniczego
void SetSize( int const size, std::string const &params ); // ustawianie dysz (rozmiaru ZR), przekladniki void SetSize( int const size, std::string const &params ); // ustawianie dysz (rozmiaru ZR), przekladniki
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej
virtual void ForceEmptiness() /*override*/; // wymuszenie bycia pustym void ForceEmptiness() override; // wymuszenie bycia pustym
void SetLBP(double const P); // cisnienie z hamulca pomocniczego void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego
}; };
extern double d2A( double const d ); extern double d2A( double const d );

View File

@@ -49,7 +49,7 @@ class TP10Bg: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -59,7 +59,7 @@ class TP10Bgu: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -69,7 +69,7 @@ class TP10yBg: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -79,7 +79,7 @@ class TP10yBgu: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -89,7 +89,7 @@ class TP10: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -99,7 +99,7 @@ class TFR513: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -109,7 +109,7 @@ class TFR510: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -119,7 +119,7 @@ class TCosid: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -129,7 +129,7 @@ class TDisk1: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };
@@ -139,7 +139,7 @@ class TDisk2: public TFricMat
{ {
public: public:
double GetFC(double N, double Vel)/*override*/; double GetFC(double N, double Vel) override;
}; };

View File

@@ -290,13 +290,13 @@ class TBrakeCyl : public TReservoir
/// Returns absolute pressure inside the brake cylinder (P() * 0.1). /// Returns absolute pressure inside the brake cylinder (P() * 0.1).
/// </summary> /// </summary>
/// <returns>Absolute cylinder pressure.</returns> /// <returns>Absolute cylinder pressure.</returns>
virtual double pa() /*override*/; double pa() override;
/// <summary> /// <summary>
/// Returns gauge pressure inside the brake cylinder, modelling the /// Returns gauge pressure inside the brake cylinder, modelling the
/// piston-stroke pressure curve (dead volume, linear stroke, fully extended). /// piston-stroke pressure curve (dead volume, linear stroke, fully extended).
/// </summary> /// </summary>
/// <returns>Cylinder pressure in bar.</returns> /// <returns>Cylinder pressure in bar.</returns>
virtual double P() /*override*/; double P() override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
TBrakeCyl() : TReservoir() {}; TBrakeCyl() : TReservoir() {};
}; };
@@ -537,23 +537,23 @@ class TWest : public TBrake
/// <param name="LPP">Low pressure.</param> /// <param name="LPP">Low pressure.</param>
/// <param name="BP">Initial cylinder pressure.</param> /// <param name="BP">Initial cylinder pressure.</param>
/// <param name="BDF">Initial brake delay flag.</param> /// <param name="BDF">Initial brake delay flag.</param>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>Sets the auxiliary brake target pressure and engages the DCV when above cylinder.</summary> /// <summary>Sets the auxiliary brake target pressure and engages the DCV when above cylinder.</summary>
/// <param name="P">Pressure [bar].</param> /// <param name="P">Pressure [bar].</param>
void SetLBP(double const P); // cisnienie z hamulca pomocniczego void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego
/// <summary>One-step distributor advance (Westinghouse logic).</summary> /// <summary>One-step distributor advance (Westinghouse logic).</summary>
/// <returns>Net flow exchanged with the brake pipe.</returns> /// <returns>Net flow exchanged with the brake pipe.</returns>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Returns the high-pressure flow drawn during the last GetPF step.</summary> /// <summary>Returns the high-pressure flow drawn during the last GetPF step.</summary>
double GetHPFlow(double const HP, double const dt) /*override*/; double GetHPFlow(double const HP, double const dt) override;
/// <summary>Recomputes the load-weighing pressure coefficient for the current mass.</summary> /// <summary>Recomputes the load-weighing pressure coefficient for the current mass.</summary>
/// <param name="mass">Vehicle mass.</param> /// <param name="mass">Vehicle mass.</param>
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej
/// <summary>Sets the EP brake state and toggles the DCV / latches LBP from cylinder pressure on release.</summary> /// <summary>Sets the EP brake state and toggles the DCV / latches LBP from cylinder pressure on release.</summary>
/// <param name="nEPS">New EP intensity.</param> /// <param name="nEPS">New EP intensity.</param>
void SetEPS(double const nEPS) /*override*/; // stan hamulca EP void SetEPS(double const nEPS) override; // stan hamulca EP
/// <summary>Stores the load-weighing parameters (TareM, LoadM, TareBP).</summary> /// <summary>Stores the load-weighing parameters (TareM, LoadM, TareBP).</summary>
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej
/// <summary>Constructs the distributor by forwarding all parameters to TBrake.</summary> /// <summary>Constructs the distributor by forwarding all parameters to TBrake.</summary>
inline TWest(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {} inline TWest(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
@@ -576,15 +576,15 @@ class TESt : public TBrake
public: public:
/// <summary>Initialises the ESt distributor; sizes the control reservoir (15 l) and computes BVM.</summary> /// <summary>Initialises the ESt distributor; sizes the control reservoir (15 l) and computes BVM.</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>One-step distributor advance for the ESt baseline.</summary> /// <summary>One-step distributor advance for the ESt baseline.</summary>
/// <returns>Net flow exchanged with the brake pipe.</returns> /// <returns>Net flow exchanged with the brake pipe.</returns>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Sets ESt-specific characteristic parameters (placeholder; used by some variants).</summary> /// <summary>Sets ESt-specific characteristic parameters (placeholder; used by some variants).</summary>
/// <param name="i_crc">Characteristic value.</param> /// <param name="i_crc">Characteristic value.</param>
void EStParams(double i_crc); // parametry charakterystyczne dla ESt void EStParams(double i_crc); // parametry charakterystyczne dla ESt
/// <summary>Returns the control reservoir (ZS) pressure.</summary> /// <summary>Returns the control reservoir (ZS) pressure.</summary>
double GetCRP() /*override*/; double GetCRP() override;
/// <summary> /// <summary>
/// Updates BrakeStatus (b_on/b_hld) according to the relations between /// Updates BrakeStatus (b_on/b_hld) according to the relations between
/// pre-chamber, cylinder and control reservoir pressures (the main slide valve). /// pre-chamber, cylinder and control reservoir pressures (the main slide valve).
@@ -611,7 +611,7 @@ class TESt : public TBrake
/// <returns>Dimensionless opening coefficient.</returns> /// <returns>Dimensionless opening coefficient.</returns>
double BVs(double BCP); // napelniacz pomocniczego double BVs(double BCP); // napelniacz pomocniczego
/// <summary>Vents the valve, brake and control reservoirs to zero.</summary> /// <summary>Vents the valve, brake and control reservoirs to zero.</summary>
void ForceEmptiness() /*override*/; // wymuszenie bycia pustym void ForceEmptiness() override; // wymuszenie bycia pustym
/// <summary>Constructs the ESt distributor and creates the control reservoir.</summary> /// <summary>Constructs the ESt distributor and creates the control reservoir.</summary>
inline TESt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TESt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -633,7 +633,7 @@ class TESt3 : public TESt
public: public:
/// <summary>One-step distributor advance for ESt3 (G/P-dependent fill/release curves).</summary> /// <summary>One-step distributor advance for ESt3 (G/P-dependent fill/release curves).</summary>
/// <returns>Net flow exchanged with the brake pipe.</returns> /// <returns>Net flow exchanged with the brake pipe.</returns>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Constructs the ESt3 distributor.</summary> /// <summary>Constructs the ESt3 distributor.</summary>
inline TESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {} inline TESt3(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
@@ -660,13 +660,13 @@ class TESt3AL2 : public TESt3
public: public:
/// <summary>Initialises the impulse chamber on top of the ESt initialisation.</summary> /// <summary>Initialises the impulse chamber on top of the ESt initialisation.</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>One-step distributor advance for ESt3/AL2 with load-weighing relay.</summary> /// <summary>One-step distributor advance for ESt3/AL2 with load-weighing relay.</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Recomputes LoadC for the current vehicle mass.</summary> /// <summary>Recomputes LoadC for the current vehicle mass.</summary>
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej
/// <summary>Stores the load-weighing parameters.</summary> /// <summary>Stores the load-weighing parameters.</summary>
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej
/// <summary>Constructs the distributor and creates the impulse chamber.</summary> /// <summary>Constructs the distributor and creates the impulse chamber.</summary>
inline TESt3AL2(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt3(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TESt3AL2(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt3(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -695,9 +695,9 @@ class TESt4R : public TESt
public: public:
/// <summary>Initialises the ESt4R; sizes the impulse chamber and selects the R delay.</summary> /// <summary>Initialises the ESt4R; sizes the impulse chamber and selects the R delay.</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>One-step distributor advance for ESt4R (rapid step active above velocity threshold).</summary> /// <summary>One-step distributor advance for ESt4R (rapid step active above velocity threshold).</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Constructs the distributor and creates the impulse chamber.</summary> /// <summary>Constructs the distributor and creates the impulse chamber.</summary>
inline TESt4R(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TESt4R(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -726,21 +726,21 @@ class TLSt : public TESt4R
public: public:
/// <summary>Initialises the LSt; resizes the valve and impulse reservoirs and presets pressures.</summary> /// <summary>Initialises the LSt; resizes the valve and impulse reservoirs and presets pressures.</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>Sets the auxiliary brake target pressure for the DCV.</summary> /// <summary>Sets the auxiliary brake target pressure for the DCV.</summary>
void SetLBP(double const P); // cisnienie z hamulca pomocniczego void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego
/// <summary>Sets the rapid step ratio (RM = 1 - RMR).</summary> /// <summary>Sets the rapid step ratio (RM = 1 - RMR).</summary>
/// <param name="RMR">Reduction ratio (0 disables rapid, &gt; 0 enables).</param> /// <param name="RMR">Reduction ratio (0 disables rapid, &gt; 0 enables).</param>
void SetRM(double const RMR); // ustalenie przelozenia rapida void SetRM(double const RMR) override; // ustalenie przelozenia rapida
/// <summary>One-step distributor advance for LSt (DCV + rapid + ED release).</summary> /// <summary>One-step distributor advance for LSt (DCV + rapid + ED release).</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Computes the high-pressure inflow (replenishes the auxiliary reservoir from the main line).</summary> /// <summary>Computes the high-pressure inflow (replenishes the auxiliary reservoir from the main line).</summary>
double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar double GetHPFlow(double const HP, double const dt) override; // przeplyw - 8 bar
/// <summary>Returns the brake-cylinder reference pressure used by the ED brake controller (CVP-BCP * BVM).</summary> /// <summary>Returns the brake-cylinder reference pressure used by the ED brake controller (CVP-BCP * BVM).</summary>
virtual double GetEDBCP(); // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED w EP09 double GetEDBCP() override; // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED w EP09
/// <summary>Sets the ED brake state used to relax the pneumatic brake.</summary> /// <summary>Sets the ED brake state used to relax the pneumatic brake.</summary>
/// <param name="EDstate">ED intensity (0..1).</param> /// <param name="EDstate">ED intensity (0..1).</param>
virtual void SetED(double const EDstate); // stan hamulca ED do luzowania void SetED(double const EDstate) override; // stan hamulca ED do luzowania
/// <summary>Constructs the LSt distributor.</summary> /// <summary>Constructs the LSt distributor.</summary>
inline TLSt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt4R(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {} inline TLSt(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TESt4R(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) {}
@@ -774,15 +774,15 @@ class TEStED : public TLSt
public: public:
/// <summary>Initialises the EStED — sets up Miedzypoj, ImplsRes and the nozzle characteristics.</summary> /// <summary>Initialises the EStED — sets up Miedzypoj, ImplsRes and the nozzle characteristics.</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>One-step distributor advance for EStED (full EP09 logic with intermediate reservoir).</summary> /// <summary>One-step distributor advance for EStED (full EP09 logic with intermediate reservoir).</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Returns ED-brake reference pressure (ImplsRes pressure scaled by load coefficient).</summary> /// <summary>Returns ED-brake reference pressure (ImplsRes pressure scaled by load coefficient).</summary>
double GetEDBCP() /*override*/; // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED double GetEDBCP() override; // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED
/// <summary>Recomputes LoadC for the current vehicle mass.</summary> /// <summary>Recomputes LoadC for the current vehicle mass.</summary>
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej
/// <summary>Stores the load-weighing parameters.</summary> /// <summary>Stores the load-weighing parameters.</summary>
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej
/// <summary>Constructs the distributor and creates the intermediate reservoir.</summary> /// <summary>Constructs the distributor and creates the intermediate reservoir.</summary>
inline TEStED(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TLSt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TEStED(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TLSt(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -812,15 +812,15 @@ class TEStEP2 : public TLSt
public: public:
/// <summary>Initialises the EP2-equipped distributor (impulse chamber, P delay).</summary> /// <summary>Initialises the EP2-equipped distributor (impulse chamber, P delay).</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; // inicjalizacja void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override; // inicjalizacja
/// <summary>One-step distributor advance with EP2 EP brake logic.</summary> /// <summary>One-step distributor advance with EP2 EP brake logic.</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Recomputes LoadC for the current vehicle mass.</summary> /// <summary>Recomputes LoadC for the current vehicle mass.</summary>
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej
/// <summary>Sets EP intensity; if EP is active and LBP &lt; cylinder pressure, latches LBP from cylinder.</summary> /// <summary>Sets EP intensity; if EP is active and LBP &lt; cylinder pressure, latches LBP from cylinder.</summary>
void SetEPS(double const nEPS) /*override*/; // stan hamulca EP void SetEPS(double const nEPS) override; // stan hamulca EP
/// <summary>Stores the load-weighing parameters.</summary> /// <summary>Stores the load-weighing parameters.</summary>
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej
/// <summary>EP brake flow integration step. Override in EP1 for proportional control.</summary> /// <summary>EP brake flow integration step. Override in EP1 for proportional control.</summary>
/// <param name="dt">Time step [s].</param> /// <param name="dt">Time step [s].</param>
void virtual EPCalc(double dt); void virtual EPCalc(double dt);
@@ -839,7 +839,7 @@ class TEStEP1 : public TEStEP2
public: public:
/// <summary>Proportional EP flow integration step (uses fractional part of EPS as the EP target).</summary> /// <summary>Proportional EP flow integration step (uses fractional part of EPS as the EP target).</summary>
void EPCalc(double dt); void EPCalc(double dt) override;
/// <summary>Stores the EP intensity.</summary> /// <summary>Stores the EP intensity.</summary>
/// <param name="nEPS">Target EP value (integer part = direction, fractional part = magnitude).</param> /// <param name="nEPS">Target EP value (integer part = direction, fractional part = magnitude).</param>
void SetEPS(double const nEPS) override; // stan hamulca EP void SetEPS(double const nEPS) override; // stan hamulca EP
@@ -867,11 +867,11 @@ class TCV1 : public TBrake
public: public:
/// <summary>Initialises the CV1 distributor (sizes ZS, sets pressures, computes BVM).</summary> /// <summary>Initialises the CV1 distributor (sizes ZS, sets pressures, computes BVM).</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>One-step distributor advance for the CV1 baseline.</summary> /// <summary>One-step distributor advance for the CV1 baseline.</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Returns the control reservoir (ZS) pressure.</summary> /// <summary>Returns the control reservoir (ZS) pressure.</summary>
double GetCRP() /*override*/; double GetCRP() override;
/// <summary>Updates BrakeStatus based on pre-chamber/cylinder/control reservoir relations and the releaser.</summary> /// <summary>Updates BrakeStatus based on pre-chamber/cylinder/control reservoir relations and the releaser.</summary>
/// <param name="BCP">Cylinder (or impulse) pressure.</param> /// <param name="BCP">Cylinder (or impulse) pressure.</param>
/// <param name="dV1">In/out brake pipe flow correction.</param> /// <param name="dV1">In/out brake pipe flow correction.</param>
@@ -881,7 +881,7 @@ class TCV1 : public TBrake
/// <summary>Returns the ZP-filling slide valve opening factor for the given cylinder pressure.</summary> /// <summary>Returns the ZP-filling slide valve opening factor for the given cylinder pressure.</summary>
double BVs(double const BCP); double BVs(double const BCP);
/// <summary>Vents valve, brake and control reservoirs to zero.</summary> /// <summary>Vents valve, brake and control reservoirs to zero.</summary>
void ForceEmptiness() /*override*/; // wymuszenie bycia pustym void ForceEmptiness() override; // wymuszenie bycia pustym
/// <summary>Constructs the CV1 distributor and creates the control reservoir.</summary> /// <summary>Constructs the CV1 distributor and creates the control reservoir.</summary>
inline TCV1(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TCV1(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -922,13 +922,13 @@ class TCV1L_TR : public TCV1
public: public:
/// <summary>Initialises the CV1-L-TR (sizes the impulse chamber on top of CV1::Init).</summary> /// <summary>Initialises the CV1-L-TR (sizes the impulse chamber on top of CV1::Init).</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>One-step distributor advance for CV1-L-TR (impulse chamber + DCV).</summary> /// <summary>One-step distributor advance for CV1-L-TR (impulse chamber + DCV).</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Sets the auxiliary brake target pressure for the DCV.</summary> /// <summary>Sets the auxiliary brake target pressure for the DCV.</summary>
void SetLBP(double const P); // cisnienie z hamulca pomocniczego void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego
/// <summary>Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir.</summary> /// <summary>Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir.</summary>
double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar double GetHPFlow(double const HP, double const dt) override; // przeplyw - 8 bar
/// <summary>Constructs the CV1-L-TR and creates the impulse chamber.</summary> /// <summary>Constructs the CV1-L-TR and creates the impulse chamber.</summary>
inline TCV1L_TR(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TCV1(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TCV1L_TR(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TCV1(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -971,15 +971,15 @@ class TKE : public TBrake
public: public:
/// <summary>Initialises the KE distributor (control / impulse / auxiliary reservoirs and BVM).</summary> /// <summary>Initialises the KE distributor (control / impulse / auxiliary reservoirs and BVM).</summary>
void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) /*override*/; void Init(double const PP, double const HPP, double const LPP, double const BP, int const BDF) override;
/// <summary>Sets the rapid step ratio (RM = 1 - RMR).</summary> /// <summary>Sets the rapid step ratio (RM = 1 - RMR).</summary>
void SetRM(double const RMR); // ustalenie przelozenia rapida void SetRM(double const RMR) override; // ustalenie przelozenia rapida
/// <summary>One-step distributor advance for the KE distributor.</summary> /// <summary>One-step distributor advance for the KE distributor.</summary>
double GetPF(double const PP, double const dt, double const Vel) /*override*/; // przeplyw miedzy komora wstepna i PG double GetPF(double const PP, double const dt, double const Vel) override; // przeplyw miedzy komora wstepna i PG
/// <summary>Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir.</summary> /// <summary>Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir.</summary>
double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar double GetHPFlow(double const HP, double const dt) override; // przeplyw - 8 bar
/// <summary>Returns the control reservoir (ZS) pressure.</summary> /// <summary>Returns the control reservoir (ZS) pressure.</summary>
double GetCRP() /*override*/; double GetCRP() override;
/// <summary>Updates BrakeStatus from cylinder/pre-chamber/control reservoir pressures (KE-specific thresholds).</summary> /// <summary>Updates BrakeStatus from cylinder/pre-chamber/control reservoir pressures (KE-specific thresholds).</summary>
void CheckState(double const BCP, double &dV1); void CheckState(double const BCP, double &dV1);
/// <summary>Drives the releaser logic for KE — bleeds the control reservoir while engaged.</summary> /// <summary>Drives the releaser logic for KE — bleeds the control reservoir while engaged.</summary>
@@ -989,13 +989,13 @@ class TKE : public TBrake
/// <summary>ZP-filling slide valve opening factor for the given cylinder pressure.</summary> /// <summary>ZP-filling slide valve opening factor for the given cylinder pressure.</summary>
double BVs(double const BCP); // napelniacz pomocniczego double BVs(double const BCP); // napelniacz pomocniczego
/// <summary>Recomputes LoadC for the current vehicle mass.</summary> /// <summary>Recomputes LoadC for the current vehicle mass.</summary>
void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej
/// <summary>Stores the load-weighing parameters.</summary> /// <summary>Stores the load-weighing parameters.</summary>
void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej
/// <summary>Sets the auxiliary brake target pressure for the DCV.</summary> /// <summary>Sets the auxiliary brake target pressure for the DCV.</summary>
void SetLBP(double const P); // cisnienie z hamulca pomocniczego void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego
/// <summary>Vents valve, brake, control, impulse and secondary auxiliary reservoirs to zero.</summary> /// <summary>Vents valve, brake, control, impulse and secondary auxiliary reservoirs to zero.</summary>
void ForceEmptiness() /*override*/; // wymuszenie bycia pustym void ForceEmptiness() override; // wymuszenie bycia pustym
/// <summary>Constructs the KE distributor and creates the control / impulse / secondary reservoirs.</summary> /// <summary>Constructs the KE distributor and creates the control / impulse / secondary reservoirs.</summary>
inline TKE(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa) inline TKE(double i_mbp, double i_bcr, double i_bcd, double i_brc, int i_bcn, int i_BD, int i_mat, int i_ba, int i_nbpa) : TBrake(i_mbp, i_bcr, i_bcd, i_brc, i_bcn, i_BD, i_mat, i_ba, i_nbpa)
@@ -1107,9 +1107,9 @@ class TFV4a : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the FV4a handle (uses BPT[] table).</summary> /// <summary>Computes brake pipe flow for the FV4a handle (uses BPT[] table).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP and RP to the supplied pressure.</summary> /// <summary>Initialises CP and RP to the supplied pressure.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TFV4a() : TDriverHandle() {} inline TFV4a() : TDriverHandle() {}
@@ -1149,19 +1149,19 @@ class TFV4aM : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the FV4a/M handle (interpolated BPT, wave modelling, accelerator).</summary> /// <summary>Computes brake pipe flow for the FV4a/M handle (interpolated BPT, wave modelling, accelerator).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP and RP.</summary> /// <summary>Initialises CP and RP.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Sets the reductor adjustment offset.</summary> /// <summary>Sets the reductor adjustment offset.</summary>
void SetReductor(double nAdj) /*override*/; void SetReductor(double nAdj) override;
/// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary> /// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary>
double GetSound(int i) /*override*/; double GetSound(int i) override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Returns the time chamber pressure (TP).</summary> /// <summary>Returns the time chamber pressure (TP).</summary>
double GetCP(); double GetCP() override;
/// <summary>Returns the regulator pressure (5 + TP*0.08 + RedAdj).</summary> /// <summary>Returns the regulator pressure (5 + TP*0.08 + RedAdj).</summary>
double GetRP(); double GetRP() override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TFV4aM() : TDriverHandle() {} inline TFV4aM() : TDriverHandle() {}
}; };
@@ -1199,23 +1199,23 @@ class TMHZ_EN57 : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for MHZ_EN57 (covers handle positions -1..10 with EP/pneumatic mix).</summary> /// <summary>Computes brake pipe flow for MHZ_EN57 (covers handle positions -1..10 with EP/pneumatic mix).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP.</summary> /// <summary>Initialises CP.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Sets the reductor adjustment offset.</summary> /// <summary>Sets the reductor adjustment offset.</summary>
void SetReductor(double nAdj) /*override*/; void SetReductor(double nAdj) override;
/// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary> /// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary>
double GetSound(int i) /*override*/; double GetSound(int i) override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Returns the regulator pressure (RP).</summary> /// <summary>Returns the regulator pressure (RP).</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the regulator target (5 + RedAdj).</summary> /// <summary>Returns the regulator target (5 + RedAdj).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Returns EP brake intensity for the given handle position.</summary> /// <summary>Returns EP brake intensity for the given handle position.</summary>
double GetEP(double pos); double GetEP(double pos) override;
/// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, overcharge dynamics).</summary> /// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, overcharge dynamics).</summary>
void SetParams(bool AO, bool MO, double OverP, double, double OMP, double OPD); void SetParams(bool AO, bool MO, double OverP, double, double OMP, double OPD) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TMHZ_EN57(void) : TDriverHandle() {} inline TMHZ_EN57(void) : TDriverHandle() {}
}; };
@@ -1253,21 +1253,21 @@ class TMHZ_K5P : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the K5P 5-position handle (release / cut-off / brake / emergency).</summary> /// <summary>Computes brake pipe flow for the K5P 5-position handle (release / cut-off / brake / emergency).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP and enables the time chambers.</summary> /// <summary>Initialises CP and enables the time chambers.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Sets the reductor adjustment offset.</summary> /// <summary>Sets the reductor adjustment offset.</summary>
void SetReductor(double nAdj) /*override*/; void SetReductor(double nAdj) override;
/// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary> /// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary>
double GetSound(int i) /*override*/; double GetSound(int i) override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the regulator target (5 + TP + RedAdj).</summary> /// <summary>Returns the regulator target (5 + TP + RedAdj).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, filling-stroke factor, overcharge dynamics).</summary> /// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, filling-stroke factor, overcharge dynamics).</summary>
void SetParams(bool AO, bool MO, double, double, double OMP, double OPD); /*ovveride*/ void SetParams(bool AO, bool MO, double, double, double OMP, double OPD) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TMHZ_K5P(void) : TDriverHandle() {} inline TMHZ_K5P(void) : TDriverHandle() {}
@@ -1306,21 +1306,21 @@ class TMHZ_6P : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the 6P handle.</summary> /// <summary>Computes brake pipe flow for the 6P handle.</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP and enables the time chambers.</summary> /// <summary>Initialises CP and enables the time chambers.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Sets the reductor adjustment offset.</summary> /// <summary>Sets the reductor adjustment offset.</summary>
void SetReductor(double nAdj) /*override*/; void SetReductor(double nAdj) override;
/// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary> /// <summary>Returns Sounds[i] (or 0 if i &gt; 4).</summary>
double GetSound(int i) /*override*/; double GetSound(int i) override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the regulator target (5 + TP + RedAdj).</summary> /// <summary>Returns the regulator target (5 + TP + RedAdj).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, filling-stroke factor, overcharge dynamics).</summary> /// <summary>Configures handle parameters (auto/manual overcharge, over-pressure, filling-stroke factor, overcharge dynamics).</summary>
void SetParams(bool AO, bool MO, double, double, double OMP, double OPD); /*ovveride*/ void SetParams(bool AO, bool MO, double, double, double OMP, double OPD) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TMHZ_6P(void) : TDriverHandle() {} inline TMHZ_6P(void) : TDriverHandle() {}
@@ -1372,17 +1372,17 @@ class TM394 : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the M394 handle (uses BPT_394).</summary> /// <summary>Computes brake pipe flow for the M394 handle (uses BPT_394).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP and enables the time chamber.</summary> /// <summary>Initialises CP and enables the time chamber.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Sets the reductor adjustment offset.</summary> /// <summary>Sets the reductor adjustment offset.</summary>
void SetReductor(double nAdj) /*override*/; void SetReductor(double nAdj) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns max(5, CP) + RedAdj.</summary> /// <summary>Returns max(5, CP) + RedAdj.</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Default constructor — sets the maximum handle position to 5.</summary> /// <summary>Default constructor — sets the maximum handle position to 5.</summary>
inline TM394(void) : TDriverHandle() inline TM394(void) : TDriverHandle()
@@ -1411,17 +1411,17 @@ class TH14K1 : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the H14K1 handle.</summary> /// <summary>Computes brake pipe flow for the H14K1 handle.</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP and enables the time chambers.</summary> /// <summary>Initialises CP and enables the time chambers.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Sets the reductor adjustment offset.</summary> /// <summary>Sets the reductor adjustment offset.</summary>
void SetReductor(double nAdj) /*override*/; void SetReductor(double nAdj) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the regulator target (5 + RedAdj).</summary> /// <summary>Returns the regulator target (5 + RedAdj).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Default constructor — sets the maximum handle position to 4.</summary> /// <summary>Default constructor — sets the maximum handle position to 4.</summary>
inline TH14K1(void) : TDriverHandle() inline TH14K1(void) : TDriverHandle()
@@ -1450,17 +1450,17 @@ class TSt113 : public TH14K1
public: public:
/// <summary>Computes brake pipe flow for the St113 handle (with EP).</summary> /// <summary>Computes brake pipe flow for the St113 handle (with EP).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the regulator target (5 + RedAdj).</summary> /// <summary>Returns the regulator target (5 + RedAdj).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Returns the current EP intensity.</summary> /// <summary>Returns the current EP intensity.</summary>
double GetEP() /*override*/; double GetEP() override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Enables the time chambers (no pressure init).</summary> /// <summary>Enables the time chambers (no pressure init).</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TSt113(void) : TH14K1() {} inline TSt113(void) : TH14K1() {}
@@ -1479,9 +1479,9 @@ class Ttest : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow using the FV4a-style BPT table for testing.</summary> /// <summary>Computes brake pipe flow using the FV4a-style BPT table for testing.</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises CP.</summary> /// <summary>Initialises CP.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline Ttest(void) : TDriverHandle() {} inline Ttest(void) : TDriverHandle() {}
@@ -1505,11 +1505,11 @@ class TFD1 : public TDriverHandle
double Speed = 0.0; // szybkosc dzialania double Speed = 0.0; // szybkosc dzialania
/// <summary>Computes the auxiliary brake outflow for this step.</summary> /// <summary>Computes the auxiliary brake outflow for this step.</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises MaxBP and the action speed.</summary> /// <summary>Initialises MaxBP and the action speed.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Returns the currently commanded cylinder pressure (BP).</summary> /// <summary>Returns the currently commanded cylinder pressure (BP).</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Sets the action speed multiplier.</summary> /// <summary>Sets the action speed multiplier.</summary>
void SetSpeed(double nSpeed); void SetSpeed(double nSpeed);
// procedure Init(press: real; MaxBP: real); overload; // procedure Init(press: real; MaxBP: real); overload;
@@ -1532,11 +1532,11 @@ class TH1405 : public TDriverHandle
public: public:
/// <summary>Computes the auxiliary brake outflow for this step (proportional to handle deflection).</summary> /// <summary>Computes the auxiliary brake outflow for this step (proportional to handle deflection).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Initialises MaxBP and enables the time chamber.</summary> /// <summary>Initialises MaxBP and enables the time chamber.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Returns the currently commanded cylinder pressure (BP).</summary> /// <summary>Returns the currently commanded cylinder pressure (BP).</summary>
double GetCP() /*override*/; double GetCP() override;
// procedure Init(press: real; MaxBP: real); overload; // procedure Init(press: real; MaxBP: real); overload;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
@@ -1559,19 +1559,19 @@ class TFVel6 : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for FVel6 (continuous EP brake plus pneumatic emergency).</summary> /// <summary>Computes brake pipe flow for FVel6 (continuous EP brake plus pneumatic emergency).</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the regulator target (constant 5 bar).</summary> /// <summary>Returns the regulator target (constant 5 bar).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Returns the current EP intensity.</summary> /// <summary>Returns the current EP intensity.</summary>
double GetEP() /*override*/; double GetEP() override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Returns Sounds[i] (or 0 if i &gt; 2).</summary> /// <summary>Returns Sounds[i] (or 0 if i &gt; 2).</summary>
double GetSound(int i) /*override*/; double GetSound(int i) override;
/// <summary>Enables the time chambers.</summary> /// <summary>Enables the time chambers.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TFVel6(void) : TDriverHandle() {} inline TFVel6(void) : TDriverHandle() {}
@@ -1594,19 +1594,19 @@ class TFVE408 : public TDriverHandle
public: public:
/// <summary>Computes brake pipe flow for the FVE408 handle.</summary> /// <summary>Computes brake pipe flow for the FVE408 handle.</summary>
double GetPF(double i_bcp, double PP, double HP, double dt, double ep) /*override*/; double GetPF(double i_bcp, double PP, double HP, double dt, double ep) override;
/// <summary>Returns CP.</summary> /// <summary>Returns CP.</summary>
double GetCP() /*override*/; double GetCP() override;
/// <summary>Returns the current EP intensity.</summary> /// <summary>Returns the current EP intensity.</summary>
double GetEP() /*override*/; double GetEP() override;
/// <summary>Returns the regulator target (constant 5 bar).</summary> /// <summary>Returns the regulator target (constant 5 bar).</summary>
double GetRP() /*override*/; double GetRP() override;
/// <summary>Returns pos_table[i].</summary> /// <summary>Returns pos_table[i].</summary>
double GetPos(int i) /*override*/; double GetPos(int i) override;
/// <summary>Returns Sounds[i] (or 0 if i &gt; 2).</summary> /// <summary>Returns Sounds[i] (or 0 if i &gt; 2).</summary>
double GetSound(int i) /*override*/; double GetSound(int i) override;
/// <summary>Enables the time chamber, disables the EP-time chamber.</summary> /// <summary>Enables the time chamber, disables the EP-time chamber.</summary>
void Init(double Press) /*override*/; void Init(double Press) override;
/// <summary>Default constructor.</summary> /// <summary>Default constructor.</summary>
inline TFVE408(void) : TDriverHandle() {} inline TFVE408(void) : TDriverHandle() {}

View File

@@ -21,36 +21,36 @@ struct IMaterial
{ {
static struct NullMaterial : public IMaterial static struct NullMaterial : public IMaterial
{ {
virtual void finalize(bool Loadnow) override {} void finalize(bool Loadnow) override {}
virtual bool update() override bool update() override
{ {
return false; return false;
} }
virtual float get_or_guess_opacity() const override float get_or_guess_opacity() const override
{ {
return 1.f; return 1.f;
} }
virtual bool is_translucent() const override bool is_translucent() const override
{ {
return false; return false;
} }
virtual glm::vec2 GetSize() const override glm::vec2 GetSize() const override
{ {
return {-1.f, -1.f}; return {-1.f, -1.f};
} }
virtual std::string GetName() const override std::string GetName() const override
{ {
return ""; return "";
} }
virtual std::optional<float> GetSelfillum() const override std::optional<float> GetSelfillum() const override
{ {
return std::nullopt; return std::nullopt;
} }
virtual int GetShadowRank() const override int GetShadowRank() const override
{ {
return 0; return 0;
} }
virtual texture_handle GetTexture(int slot) const override texture_handle GetTexture(int slot) const override
{ {
return 0; return 0;
} }

View File

@@ -25,51 +25,51 @@ struct ITexture
{ {
static struct NullTexture : public ITexture static struct NullTexture : public ITexture
{ {
virtual bool create(bool Static = false) override bool create(bool Static = false) override
{ {
return false; return false;
} }
virtual bool is_stub() const override bool is_stub() const override
{ {
return false; return false;
} }
virtual int get_width() const override int get_width() const override
{ {
return 1; return 1;
} }
virtual int get_height() const override int get_height() const override
{ {
return 1; return 1;
} }
virtual size_t get_id() const override size_t get_id() const override
{ {
return 0; return 0;
} }
virtual void release() override {} void release() override {}
virtual void make_stub() override {} void make_stub() override {}
virtual std::string_view get_traits() const override std::string_view get_traits() const override
{ {
return ""; return "";
} }
virtual std::string_view get_name() const override std::string_view get_name() const override
{ {
return ""; return "";
} }
virtual std::string_view get_type() const override std::string_view get_type() const override
{ {
return ""; return "";
} }
virtual bool get_has_alpha() const override bool get_has_alpha() const override
{ {
return false; return false;
} }
virtual bool get_is_ready() const override bool get_is_ready() const override
{ {
return false; return false;
} }
virtual void set_components_hint(int hint) override {} void set_components_hint(int hint) override {}
virtual void make_from_memory(size_t width, size_t height, const uint8_t *data) override {} void make_from_memory(size_t width, size_t height, const uint8_t *data) override {}
virtual void update_from_memory(size_t width, size_t height, const uint8_t *data) override {} void update_from_memory(size_t width, size_t height, const uint8_t *data) override {}
} null_texture{}; } null_texture{};
return &null_texture; return &null_texture;
} }

View File

@@ -21,7 +21,7 @@ public:
protected: protected:
// methods // methods
void void
default_bindings(); default_bindings() override;
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -21,10 +21,10 @@ namespace network::tcp
connection(asio::io_context &io_ctx, bool client = false, size_t counter = 0); connection(asio::io_context &io_ctx, bool client = false, size_t counter = 0);
~connection(); ~connection();
virtual void connected() override; void connected() override;
virtual void disconnect() override; void disconnect() override;
virtual void send_messages(const std::vector<std::shared_ptr<message> > &messages) override; void send_messages(const std::vector<std::shared_ptr<message> > &messages) override;
virtual void send_message(const message &msg) override; void send_message(const message &msg) override;
asio::ip::tcp::socket m_socket; asio::ip::tcp::socket m_socket;
@@ -61,7 +61,7 @@ namespace network::tcp
uint32_t port; uint32_t port;
protected: protected:
virtual void connect() override; void connect() override;
public: public:
client(asio::io_context &io_ctx, const std::string &host, uint32_t port); client(asio::io_context &io_ctx, const std::string &host, uint32_t port);
@@ -73,9 +73,9 @@ namespace network::tcp
public: public:
asio_manager(); asio_manager();
virtual std::shared_ptr<network::server> create_server(std::shared_ptr<std::fstream>, const std::string &conf) override; std::shared_ptr<network::server> create_server(std::shared_ptr<std::fstream>, const std::string &conf) override;
virtual std::shared_ptr<network::client> create_client(const std::string &conf) override; std::shared_ptr<network::client> create_client(const std::string &conf) override;
virtual void update() override; void update() override;
}; };
asio_manager manager; asio_manager manager;

View File

@@ -27,8 +27,8 @@ struct client_hello : public message
{ {
client_hello() : message(CLIENT_HELLO) {} client_hello() : message(CLIENT_HELLO) {}
virtual void serialize(std::ostream &stream) const override; void serialize(std::ostream &stream) const override;
virtual void deserialize(std::istream &stream) override; void deserialize(std::istream &stream) override;
int32_t version{0}; int32_t version{0};
uint32_t start_packet{0}; uint32_t start_packet{0};
@@ -43,8 +43,8 @@ struct server_hello : public message
int64_t config{0}; int64_t config{0};
std::string scenario; std::string scenario;
virtual void serialize(std::ostream &stream) const override; void serialize(std::ostream &stream) const override;
virtual void deserialize(std::istream &stream) override; void deserialize(std::istream &stream) override;
}; };
struct request_command : public message struct request_command : public message
@@ -54,8 +54,8 @@ struct request_command : public message
command_queue::commands_map commands; command_queue::commands_map commands;
virtual void serialize(std::ostream &stream) const override; void serialize(std::ostream &stream) const override;
virtual void deserialize(std::istream &stream) override; void deserialize(std::istream &stream) override;
}; };
struct frame_info : public request_command struct frame_info : public request_command
@@ -66,8 +66,8 @@ struct frame_info : public request_command
double dt{0.0}; double dt{0.0};
double sync{0.0}; double sync{0.0};
virtual void serialize(std::ostream &stream) const override; void serialize(std::ostream &stream) const override;
virtual void deserialize(std::istream &stream) override; void deserialize(std::istream &stream) override;
}; };
std::shared_ptr<message> deserialize_message(std::istream &stream); std::shared_ptr<message> deserialize_message(std::istream &stream);

View File

@@ -150,7 +150,7 @@ public:
static bool renderer_register; static bool renderer_register;
virtual imgui_renderer *GetImguiRenderer() imgui_renderer *GetImguiRenderer() override
{ {
return nullptr; return nullptr;
} }

View File

@@ -29,7 +29,7 @@ struct semaphore : public map_object
std::vector<basic_event *> events; std::vector<basic_event *> events;
TMemCell *memcell = nullptr; TMemCell *memcell = nullptr;
virtual gfx::basic_vertex vertex() override { gfx::basic_vertex vertex() override {
bool stop_signal = memcell->IsVelocity() && (memcell->Value1() == 0.0); bool stop_signal = memcell->IsVelocity() && (memcell->Value1() == 0.0);
return gfx::basic_vertex(location, glm::vec3(), return gfx::basic_vertex(location, glm::vec3(),
(!stop_signal) ? glm::vec2(0.0f, 0.2f) : glm::vec2(0.2f, 0.4f)); (!stop_signal) ? glm::vec2(0.0f, 0.2f) : glm::vec2(0.2f, 0.4f));
@@ -47,7 +47,7 @@ struct launcher : public map_object
level_crossing level_crossing
} type; } type;
virtual gfx::basic_vertex vertex() { gfx::basic_vertex vertex() override {
return gfx::basic_vertex(location, glm::vec3(), return gfx::basic_vertex(location, glm::vec3(),
type == track_switch ? glm::vec2(0.4f, 0.6f) : glm::vec2(0.6f, 0.8f)); type == track_switch ? glm::vec2(0.4f, 0.6f) : glm::vec2(0.6f, 0.8f));
} }
@@ -60,7 +60,7 @@ struct track_switch : public map_object
std::array<char[4], 4> preview; std::array<char[4], 4> preview;
std::array<TTrack*, 4> track = { nullptr }; std::array<TTrack*, 4> track = { nullptr };
virtual gfx::basic_vertex vertex() { gfx::basic_vertex vertex() override {
return gfx::basic_vertex(location, glm::vec3(), glm::vec2(0.4f, 0.6f)); return gfx::basic_vertex(location, glm::vec3(), glm::vec2(0.4f, 0.6f));
} }
}; };
@@ -70,7 +70,7 @@ struct obstacle : public map_object
{ {
std::string model_name; std::string model_name;
virtual gfx::basic_vertex vertex() { gfx::basic_vertex vertex() override {
return gfx::basic_vertex(location, glm::vec3(), glm::vec2(0.8f, 1.0f)); return gfx::basic_vertex(location, glm::vec3(), glm::vec2(0.8f, 1.0f));
} }
}; };

View File

@@ -53,13 +53,13 @@ public:
private: private:
// methods // methods
// radius() subclass details, calculates node's bounding radius // radius() subclass details, calculates node's bounding radius
float radius_(); float radius_() override;
// serialize() subclass details, sends content of the subclass to provided stream // serialize() subclass details, sends content of the subclass to provided stream
void serialize_( std::ostream &Output ) const; void serialize_( std::ostream &Output ) const override;
// deserialize() subclass details, restores content of the subclass from provided stream // deserialize() subclass details, restores content of the subclass from provided stream
void deserialize_( std::istream &Input ); void deserialize_( std::istream &Input ) override;
// export() subclass details, sends basic content of the class in legacy (text) format to provided stream // export() subclass details, sends basic content of the class in legacy (text) format to provided stream
void export_as_text_( std::ostream &Output ) const; void export_as_text_( std::ostream &Output ) const override;
// members // members
int iKey { 0 }; int iKey { 0 };

View File

@@ -61,11 +61,11 @@ public:
private: private:
// methods // methods
// serialize() subclass details, sends content of the subclass to provided stream // serialize() subclass details, sends content of the subclass to provided stream
void serialize_( std::ostream &Output ) const; void serialize_( std::ostream &Output ) const override;
// deserialize() subclass details, restores content of the subclass from provided stream // deserialize() subclass details, restores content of the subclass from provided stream
void deserialize_( std::istream &Input ); void deserialize_( std::istream &Input ) override;
// export() subclass details, sends basic content of the class in legacy (text) format to provided stream // export() subclass details, sends basic content of the class in legacy (text) format to provided stream
void export_as_text_( std::ostream &Output ) const; void export_as_text_( std::ostream &Output ) const override;
// members // members
// content // content

View File

@@ -78,13 +78,13 @@ private:
// methods // methods
glm::vec3 wire_color() const; glm::vec3 wire_color() const;
// radius() subclass details, calculates node's bounding radius // radius() subclass details, calculates node's bounding radius
float radius_(); float radius_() override;
// serialize() subclass details, sends content of the subclass to provided stream // serialize() subclass details, sends content of the subclass to provided stream
void serialize_( std::ostream &Output ) const; void serialize_( std::ostream &Output ) const override;
// deserialize() subclass details, restores content of the subclass from provided stream // deserialize() subclass details, restores content of the subclass from provided stream
void deserialize_( std::istream &Input ); void deserialize_( std::istream &Input ) override;
// export() subclass details, sends basic content of the class in legacy (text) format to provided stream // export() subclass details, sends basic content of the class in legacy (text) format to provided stream
void export_as_text_( std::ostream &Output ) const; void export_as_text_( std::ostream &Output ) const override;
}; };

View File

@@ -38,11 +38,11 @@ public:
private: private:
// methods // methods
// serialize() subclass details, sends content of the subclass to provided stream // serialize() subclass details, sends content of the subclass to provided stream
void serialize_( std::ostream &Output ) const; void serialize_( std::ostream &Output ) const override;
// deserialize() subclass details, restores content of the subclass from provided stream // deserialize() subclass details, restores content of the subclass from provided stream
void deserialize_( std::istream &Input ); void deserialize_( std::istream &Input ) override;
// export() subclass details, sends basic content of the class in legacy (text) format to provided stream // export() subclass details, sends basic content of the class in legacy (text) format to provided stream
void export_as_text_( std::ostream &Output ) const; void export_as_text_( std::ostream &Output ) const override;
// members // members
double NominalVoltage = 0.0; double NominalVoltage = 0.0;