diff --git a/McZapkie/Oerlikon_ESt.h b/McZapkie/Oerlikon_ESt.h index c1269185..16fd7b3c 100644 --- a/McZapkie/Oerlikon_ESt.h +++ b/McZapkie/Oerlikon_ESt.h @@ -85,8 +85,8 @@ class TRura : public TPrzekladnik // nieprzekladnik, rura laczaca private: public: TRura() : TPrzekladnik() {}; - virtual double P(void) /*override*/; - virtual void Update(double dt) /*override*/; + double P(void) override; + void Update(double dt) override; }; class TPrzeciwposlizg : public TRura // przy napelnianiu - rura, przy poslizgu - upust @@ -97,7 +97,7 @@ class TPrzeciwposlizg : public TRura // przy napelnianiu - rura, przy poslizgu - public: void SetPoslizg(bool flag); - void Update(double dt) /*override*/; + void Update(double dt) override; inline TPrzeciwposlizg() : TRura() { Poslizg = false; @@ -117,7 +117,7 @@ class TRapid : public TPrzekladnik { public: void SetRapidParams(double mult, double size); void SetRapidStatus(bool rs); - void Update(double dt) /*override*/; + void Update(double dt) override; inline TRapid() : TPrzekladnik() {} @@ -131,7 +131,7 @@ class TPrzekCiagly : public TPrzekladnik { public: void SetMult(double m); - void Update(double dt) /*override*/; + void Update(double dt) override; inline TPrzekCiagly() : TPrzekladnik() {} @@ -145,7 +145,7 @@ class TPrzek_PZZ : public TPrzekladnik { public: void SetLBP(double P); - void Update(double dt) /*override*/; + void Update(double dt) override; inline TPrzek_PZZ() : TPrzekladnik() {} @@ -169,7 +169,7 @@ class TPrzekED : public TRura { public: void SetP(double P); - void Update(double dt) /*override*/; + void Update(double dt) override; inline TPrzekED() : 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) : 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*/; - virtual double GetPF( double const PP, double const dt, double const Vel ) /*override*/; // przeplyw miedzy komora wstepna i PG + void Init( double const PP, double const HPP, double const LPP, double const BP, int const BDF ) override; + 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 - virtual double GetCRP() /*override*/; + double GetCRP() override; void CheckState(double const BCP, double &dV1); // glowny przyrzad rozrzadczy void CheckReleaser(double const dt); // odluzniacz double CVs(double const BP); // napelniacz sterujacego double BVs(double const BCP); // napelniacz pomocniczego void SetSize( int const size, std::string const ¶ms ); // ustawianie dysz (rozmiaru ZR), przekladniki - void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej - void SetLP(double const TM, double const LM, double const TBP); // parametry przystawki wazacej - virtual void ForceEmptiness() /*override*/; // wymuszenie bycia pustym - void SetLBP(double const P); // cisnienie z hamulca pomocniczego + void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej + void SetLP(double const TM, double const LM, double const TBP) override; // parametry przystawki wazacej + void ForceEmptiness() override; // wymuszenie bycia pustym + void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego }; extern double d2A( double const d ); diff --git a/McZapkie/friction.h b/McZapkie/friction.h index 067a61b9..39679b7c 100644 --- a/McZapkie/friction.h +++ b/McZapkie/friction.h @@ -49,7 +49,7 @@ class TP10Bg: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -59,7 +59,7 @@ class TP10Bgu: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -69,7 +69,7 @@ class TP10yBg: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -79,7 +79,7 @@ class TP10yBgu: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -89,7 +89,7 @@ class TP10: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -99,7 +99,7 @@ class TFR513: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -109,7 +109,7 @@ class TFR510: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -119,7 +119,7 @@ class TCosid: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -129,7 +129,7 @@ class TDisk1: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; @@ -139,7 +139,7 @@ class TDisk2: public TFricMat { public: - double GetFC(double N, double Vel)/*override*/; + double GetFC(double N, double Vel) override; }; diff --git a/McZapkie/hamulce.h b/McZapkie/hamulce.h index a05a3635..7f833f9c 100644 --- a/McZapkie/hamulce.h +++ b/McZapkie/hamulce.h @@ -290,13 +290,13 @@ class TBrakeCyl : public TReservoir /// Returns absolute pressure inside the brake cylinder (P() * 0.1). /// /// Absolute cylinder pressure. - virtual double pa() /*override*/; + double pa() override; /// /// Returns gauge pressure inside the brake cylinder, modelling the /// piston-stroke pressure curve (dead volume, linear stroke, fully extended). /// /// Cylinder pressure in bar. - virtual double P() /*override*/; + double P() override; /// Default constructor. TBrakeCyl() : TReservoir() {}; }; @@ -537,23 +537,23 @@ class TWest : public TBrake /// Low pressure. /// Initial cylinder pressure. /// Initial brake delay flag. - 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; /// Sets the auxiliary brake target pressure and engages the DCV when above cylinder. /// Pressure [bar]. - void SetLBP(double const P); // cisnienie z hamulca pomocniczego + void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego /// One-step distributor advance (Westinghouse logic). /// Net flow exchanged with the brake pipe. - 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 /// Returns the high-pressure flow drawn during the last GetPF step. - double GetHPFlow(double const HP, double const dt) /*override*/; + double GetHPFlow(double const HP, double const dt) override; /// Recomputes the load-weighing pressure coefficient for the current mass. /// Vehicle mass. - void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej + void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej /// Sets the EP brake state and toggles the DCV / latches LBP from cylinder pressure on release. /// New EP intensity. - void SetEPS(double const nEPS) /*override*/; // stan hamulca EP + void SetEPS(double const nEPS) override; // stan hamulca EP /// Stores the load-weighing parameters (TareM, LoadM, TareBP). - 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 /// Constructs the distributor by forwarding all parameters to TBrake. 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: /// Initialises the ESt distributor; sizes the control reservoir (15 l) and computes BVM. - 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; /// One-step distributor advance for the ESt baseline. /// Net flow exchanged with the brake pipe. - 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 /// Sets ESt-specific characteristic parameters (placeholder; used by some variants). /// Characteristic value. void EStParams(double i_crc); // parametry charakterystyczne dla ESt /// Returns the control reservoir (ZS) pressure. - double GetCRP() /*override*/; + double GetCRP() override; /// /// Updates BrakeStatus (b_on/b_hld) according to the relations between /// pre-chamber, cylinder and control reservoir pressures (the main slide valve). @@ -611,7 +611,7 @@ class TESt : public TBrake /// Dimensionless opening coefficient. double BVs(double BCP); // napelniacz pomocniczego /// Vents the valve, brake and control reservoirs to zero. - void ForceEmptiness() /*override*/; // wymuszenie bycia pustym + void ForceEmptiness() override; // wymuszenie bycia pustym /// Constructs the ESt distributor and creates the control reservoir. 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: /// One-step distributor advance for ESt3 (G/P-dependent fill/release curves). /// Net flow exchanged with the brake pipe. - 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 /// Constructs the ESt3 distributor. 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: /// Initialises the impulse chamber on top of the ESt initialisation. - 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; /// One-step distributor advance for ESt3/AL2 with load-weighing relay. - 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 /// Recomputes LoadC for the current vehicle mass. - void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej + void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej /// Stores the load-weighing parameters. - 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 /// Constructs the distributor and creates the impulse chamber. 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: /// Initialises the ESt4R; sizes the impulse chamber and selects the R delay. - 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; /// One-step distributor advance for ESt4R (rapid step active above velocity threshold). - 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 /// Constructs the distributor and creates the impulse chamber. 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: /// Initialises the LSt; resizes the valve and impulse reservoirs and presets pressures. - 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; /// Sets the auxiliary brake target pressure for the DCV. - void SetLBP(double const P); // cisnienie z hamulca pomocniczego + void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego /// Sets the rapid step ratio (RM = 1 - RMR). /// Reduction ratio (0 disables rapid, > 0 enables). - void SetRM(double const RMR); // ustalenie przelozenia rapida + void SetRM(double const RMR) override; // ustalenie przelozenia rapida /// One-step distributor advance for LSt (DCV + rapid + ED release). - 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 /// Computes the high-pressure inflow (replenishes the auxiliary reservoir from the main line). - double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar + double GetHPFlow(double const HP, double const dt) override; // przeplyw - 8 bar /// Returns the brake-cylinder reference pressure used by the ED brake controller (CVP-BCP * BVM). - 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 /// Sets the ED brake state used to relax the pneumatic brake. /// ED intensity (0..1). - virtual void SetED(double const EDstate); // stan hamulca ED do luzowania + void SetED(double const EDstate) override; // stan hamulca ED do luzowania /// Constructs the LSt distributor. 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: /// Initialises the EStED — sets up Miedzypoj, ImplsRes and the nozzle characteristics. - 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; /// One-step distributor advance for EStED (full EP09 logic with intermediate reservoir). - 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 /// Returns ED-brake reference pressure (ImplsRes pressure scaled by load coefficient). - double GetEDBCP() /*override*/; // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED + double GetEDBCP() override; // cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED /// Recomputes LoadC for the current vehicle mass. - void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej + void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej /// Stores the load-weighing parameters. - 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 /// Constructs the distributor and creates the intermediate reservoir. 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: /// Initialises the EP2-equipped distributor (impulse chamber, P delay). - 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 /// One-step distributor advance with EP2 EP brake logic. - 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 /// Recomputes LoadC for the current vehicle mass. - void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej + void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej /// Sets EP intensity; if EP is active and LBP < cylinder pressure, latches LBP from cylinder. - void SetEPS(double const nEPS) /*override*/; // stan hamulca EP + void SetEPS(double const nEPS) override; // stan hamulca EP /// Stores the load-weighing parameters. - 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 /// EP brake flow integration step. Override in EP1 for proportional control. /// Time step [s]. void virtual EPCalc(double dt); @@ -839,7 +839,7 @@ class TEStEP1 : public TEStEP2 public: /// Proportional EP flow integration step (uses fractional part of EPS as the EP target). - void EPCalc(double dt); + void EPCalc(double dt) override; /// Stores the EP intensity. /// Target EP value (integer part = direction, fractional part = magnitude). void SetEPS(double const nEPS) override; // stan hamulca EP @@ -867,11 +867,11 @@ class TCV1 : public TBrake public: /// Initialises the CV1 distributor (sizes ZS, sets pressures, computes BVM). - 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; /// One-step distributor advance for the CV1 baseline. - 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 /// Returns the control reservoir (ZS) pressure. - double GetCRP() /*override*/; + double GetCRP() override; /// Updates BrakeStatus based on pre-chamber/cylinder/control reservoir relations and the releaser. /// Cylinder (or impulse) pressure. /// In/out brake pipe flow correction. @@ -881,7 +881,7 @@ class TCV1 : public TBrake /// Returns the ZP-filling slide valve opening factor for the given cylinder pressure. double BVs(double const BCP); /// Vents valve, brake and control reservoirs to zero. - void ForceEmptiness() /*override*/; // wymuszenie bycia pustym + void ForceEmptiness() override; // wymuszenie bycia pustym /// Constructs the CV1 distributor and creates the control reservoir. 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: /// Initialises the CV1-L-TR (sizes the impulse chamber on top of CV1::Init). - 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; /// One-step distributor advance for CV1-L-TR (impulse chamber + DCV). - 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 /// Sets the auxiliary brake target pressure for the DCV. - void SetLBP(double const P); // cisnienie z hamulca pomocniczego + void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego /// Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir. - double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar + double GetHPFlow(double const HP, double const dt) override; // przeplyw - 8 bar /// Constructs the CV1-L-TR and creates the impulse chamber. 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: /// Initialises the KE distributor (control / impulse / auxiliary reservoirs and BVM). - 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; /// Sets the rapid step ratio (RM = 1 - RMR). - void SetRM(double const RMR); // ustalenie przelozenia rapida + void SetRM(double const RMR) override; // ustalenie przelozenia rapida /// One-step distributor advance for the KE distributor. - 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 /// Computes the high-pressure (8 bar) inflow used to replenish the auxiliary reservoir. - double GetHPFlow(double const HP, double const dt) /*override*/; // przeplyw - 8 bar + double GetHPFlow(double const HP, double const dt) override; // przeplyw - 8 bar /// Returns the control reservoir (ZS) pressure. - double GetCRP() /*override*/; + double GetCRP() override; /// Updates BrakeStatus from cylinder/pre-chamber/control reservoir pressures (KE-specific thresholds). void CheckState(double const BCP, double &dV1); /// Drives the releaser logic for KE — bleeds the control reservoir while engaged. @@ -989,13 +989,13 @@ class TKE : public TBrake /// ZP-filling slide valve opening factor for the given cylinder pressure. double BVs(double const BCP); // napelniacz pomocniczego /// Recomputes LoadC for the current vehicle mass. - void PLC(double const mass); // wspolczynnik cisnienia przystawki wazacej + void PLC(double const mass) override; // wspolczynnik cisnienia przystawki wazacej /// Stores the load-weighing parameters. - 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 /// Sets the auxiliary brake target pressure for the DCV. - void SetLBP(double const P); // cisnienie z hamulca pomocniczego + void SetLBP(double const P) override; // cisnienie z hamulca pomocniczego /// Vents valve, brake, control, impulse and secondary auxiliary reservoirs to zero. - void ForceEmptiness() /*override*/; // wymuszenie bycia pustym + void ForceEmptiness() override; // wymuszenie bycia pustym /// Constructs the KE distributor and creates the control / impulse / secondary reservoirs. 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: /// Computes brake pipe flow for the FV4a handle (uses BPT[] table). - 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; /// Initialises CP and RP to the supplied pressure. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Default constructor. inline TFV4a() : TDriverHandle() {} @@ -1149,19 +1149,19 @@ class TFV4aM : public TDriverHandle public: /// Computes brake pipe flow for the FV4a/M handle (interpolated BPT, wave modelling, accelerator). - 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; /// Initialises CP and RP. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Sets the reductor adjustment offset. - void SetReductor(double nAdj) /*override*/; + void SetReductor(double nAdj) override; /// Returns Sounds[i] (or 0 if i > 4). - double GetSound(int i) /*override*/; + double GetSound(int i) override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Returns the time chamber pressure (TP). - double GetCP(); + double GetCP() override; /// Returns the regulator pressure (5 + TP*0.08 + RedAdj). - double GetRP(); + double GetRP() override; /// Default constructor. inline TFV4aM() : TDriverHandle() {} }; @@ -1199,23 +1199,23 @@ class TMHZ_EN57 : public TDriverHandle public: /// Computes brake pipe flow for MHZ_EN57 (covers handle positions -1..10 with EP/pneumatic mix). - 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; /// Initialises CP. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Sets the reductor adjustment offset. - void SetReductor(double nAdj) /*override*/; + void SetReductor(double nAdj) override; /// Returns Sounds[i] (or 0 if i > 4). - double GetSound(int i) /*override*/; + double GetSound(int i) override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Returns the regulator pressure (RP). - double GetCP() /*override*/; + double GetCP() override; /// Returns the regulator target (5 + RedAdj). - double GetRP() /*override*/; + double GetRP() override; /// Returns EP brake intensity for the given handle position. - double GetEP(double pos); + double GetEP(double pos) override; /// Configures handle parameters (auto/manual overcharge, over-pressure, overcharge dynamics). - 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; /// Default constructor. inline TMHZ_EN57(void) : TDriverHandle() {} }; @@ -1253,21 +1253,21 @@ class TMHZ_K5P : public TDriverHandle public: /// Computes brake pipe flow for the K5P 5-position handle (release / cut-off / brake / emergency). - 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; /// Initialises CP and enables the time chambers. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Sets the reductor adjustment offset. - void SetReductor(double nAdj) /*override*/; + void SetReductor(double nAdj) override; /// Returns Sounds[i] (or 0 if i > 4). - double GetSound(int i) /*override*/; + double GetSound(int i) override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns the regulator target (5 + TP + RedAdj). - double GetRP() /*override*/; + double GetRP() override; /// Configures handle parameters (auto/manual overcharge, over-pressure, filling-stroke factor, overcharge dynamics). - 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; /// Default constructor. inline TMHZ_K5P(void) : TDriverHandle() {} @@ -1306,21 +1306,21 @@ class TMHZ_6P : public TDriverHandle public: /// Computes brake pipe flow for the 6P handle. - 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; /// Initialises CP and enables the time chambers. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Sets the reductor adjustment offset. - void SetReductor(double nAdj) /*override*/; + void SetReductor(double nAdj) override; /// Returns Sounds[i] (or 0 if i > 4). - double GetSound(int i) /*override*/; + double GetSound(int i) override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns the regulator target (5 + TP + RedAdj). - double GetRP() /*override*/; + double GetRP() override; /// Configures handle parameters (auto/manual overcharge, over-pressure, filling-stroke factor, overcharge dynamics). - 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; /// Default constructor. inline TMHZ_6P(void) : TDriverHandle() {} @@ -1372,17 +1372,17 @@ class TM394 : public TDriverHandle public: /// Computes brake pipe flow for the M394 handle (uses BPT_394). - 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; /// Initialises CP and enables the time chamber. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Sets the reductor adjustment offset. - void SetReductor(double nAdj) /*override*/; + void SetReductor(double nAdj) override; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns max(5, CP) + RedAdj. - double GetRP() /*override*/; + double GetRP() override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Default constructor — sets the maximum handle position to 5. inline TM394(void) : TDriverHandle() @@ -1411,17 +1411,17 @@ class TH14K1 : public TDriverHandle public: /// Computes brake pipe flow for the H14K1 handle. - 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; /// Initialises CP and enables the time chambers. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Sets the reductor adjustment offset. - void SetReductor(double nAdj) /*override*/; + void SetReductor(double nAdj) override; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns the regulator target (5 + RedAdj). - double GetRP() /*override*/; + double GetRP() override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Default constructor — sets the maximum handle position to 4. inline TH14K1(void) : TDriverHandle() @@ -1450,17 +1450,17 @@ class TSt113 : public TH14K1 public: /// Computes brake pipe flow for the St113 handle (with EP). - 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; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns the regulator target (5 + RedAdj). - double GetRP() /*override*/; + double GetRP() override; /// Returns the current EP intensity. - double GetEP() /*override*/; + double GetEP() override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Enables the time chambers (no pressure init). - void Init(double Press) /*override*/; + void Init(double Press) override; /// Default constructor. inline TSt113(void) : TH14K1() {} @@ -1479,9 +1479,9 @@ class Ttest : public TDriverHandle public: /// Computes brake pipe flow using the FV4a-style BPT table for testing. - 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; /// Initialises CP. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Default constructor. inline Ttest(void) : TDriverHandle() {} @@ -1505,11 +1505,11 @@ class TFD1 : public TDriverHandle double Speed = 0.0; // szybkosc dzialania /// Computes the auxiliary brake outflow for this step. - 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; /// Initialises MaxBP and the action speed. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Returns the currently commanded cylinder pressure (BP). - double GetCP() /*override*/; + double GetCP() override; /// Sets the action speed multiplier. void SetSpeed(double nSpeed); // procedure Init(press: real; MaxBP: real); overload; @@ -1532,11 +1532,11 @@ class TH1405 : public TDriverHandle public: /// Computes the auxiliary brake outflow for this step (proportional to handle deflection). - 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; /// Initialises MaxBP and enables the time chamber. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Returns the currently commanded cylinder pressure (BP). - double GetCP() /*override*/; + double GetCP() override; // procedure Init(press: real; MaxBP: real); overload; /// Default constructor. @@ -1559,19 +1559,19 @@ class TFVel6 : public TDriverHandle public: /// Computes brake pipe flow for FVel6 (continuous EP brake plus pneumatic emergency). - 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; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns the regulator target (constant 5 bar). - double GetRP() /*override*/; + double GetRP() override; /// Returns the current EP intensity. - double GetEP() /*override*/; + double GetEP() override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Returns Sounds[i] (or 0 if i > 2). - double GetSound(int i) /*override*/; + double GetSound(int i) override; /// Enables the time chambers. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Default constructor. inline TFVel6(void) : TDriverHandle() {} @@ -1594,19 +1594,19 @@ class TFVE408 : public TDriverHandle public: /// Computes brake pipe flow for the FVE408 handle. - 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; /// Returns CP. - double GetCP() /*override*/; + double GetCP() override; /// Returns the current EP intensity. - double GetEP() /*override*/; + double GetEP() override; /// Returns the regulator target (constant 5 bar). - double GetRP() /*override*/; + double GetRP() override; /// Returns pos_table[i]. - double GetPos(int i) /*override*/; + double GetPos(int i) override; /// Returns Sounds[i] (or 0 if i > 2). - double GetSound(int i) /*override*/; + double GetSound(int i) override; /// Enables the time chamber, disables the EP-time chamber. - void Init(double Press) /*override*/; + void Init(double Press) override; /// Default constructor. inline TFVE408(void) : TDriverHandle() {} diff --git a/global_include/interfaces/IMaterial.h b/global_include/interfaces/IMaterial.h index eaf7268f..1cf03592 100644 --- a/global_include/interfaces/IMaterial.h +++ b/global_include/interfaces/IMaterial.h @@ -21,36 +21,36 @@ struct IMaterial { static struct NullMaterial : public IMaterial { - virtual void finalize(bool Loadnow) override {} - virtual bool update() override + void finalize(bool Loadnow) override {} + bool update() override { return false; } - virtual float get_or_guess_opacity() const override + float get_or_guess_opacity() const override { return 1.f; } - virtual bool is_translucent() const override + bool is_translucent() const override { return false; } - virtual glm::vec2 GetSize() const override + glm::vec2 GetSize() const override { return {-1.f, -1.f}; } - virtual std::string GetName() const override + std::string GetName() const override { return ""; } - virtual std::optional GetSelfillum() const override + std::optional GetSelfillum() const override { return std::nullopt; } - virtual int GetShadowRank() const override + int GetShadowRank() const override { return 0; } - virtual texture_handle GetTexture(int slot) const override + texture_handle GetTexture(int slot) const override { return 0; } diff --git a/global_include/interfaces/ITexture.h b/global_include/interfaces/ITexture.h index 8a1a6796..c7b5934e 100644 --- a/global_include/interfaces/ITexture.h +++ b/global_include/interfaces/ITexture.h @@ -25,51 +25,51 @@ struct ITexture { static struct NullTexture : public ITexture { - virtual bool create(bool Static = false) override + bool create(bool Static = false) override { return false; } - virtual bool is_stub() const override + bool is_stub() const override { return false; } - virtual int get_width() const override + int get_width() const override { return 1; } - virtual int get_height() const override + int get_height() const override { return 1; } - virtual size_t get_id() const override + size_t get_id() const override { return 0; } - virtual void release() override {} - virtual void make_stub() override {} - virtual std::string_view get_traits() const override + void release() override {} + void make_stub() override {} + std::string_view get_traits() const override { return ""; } - virtual std::string_view get_name() const override + std::string_view get_name() const override { return ""; } - virtual std::string_view get_type() const override + std::string_view get_type() const override { return ""; } - virtual bool get_has_alpha() const override + bool get_has_alpha() const override { return false; } - virtual bool get_is_ready() const override + bool get_is_ready() const override { return false; } - virtual void set_components_hint(int hint) override {} - virtual 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 set_components_hint(int hint) override {} + void make_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{}; return &null_texture; } diff --git a/input/driverkeyboardinput.h b/input/driverkeyboardinput.h index 1e3f11b1..7ebf2cc5 100644 --- a/input/driverkeyboardinput.h +++ b/input/driverkeyboardinput.h @@ -21,7 +21,7 @@ public: protected: // methods void - default_bindings(); + default_bindings() override; }; //--------------------------------------------------------------------------- diff --git a/network/backend/asio.h b/network/backend/asio.h index 47e731c7..b508e60f 100644 --- a/network/backend/asio.h +++ b/network/backend/asio.h @@ -21,10 +21,10 @@ namespace network::tcp connection(asio::io_context &io_ctx, bool client = false, size_t counter = 0); ~connection(); - virtual void connected() override; - virtual void disconnect() override; - virtual void send_messages(const std::vector > &messages) override; - virtual void send_message(const message &msg) override; + void connected() override; + void disconnect() override; + void send_messages(const std::vector > &messages) override; + void send_message(const message &msg) override; asio::ip::tcp::socket m_socket; @@ -61,7 +61,7 @@ namespace network::tcp uint32_t port; protected: - virtual void connect() override; + void connect() override; public: client(asio::io_context &io_ctx, const std::string &host, uint32_t port); @@ -73,9 +73,9 @@ namespace network::tcp public: asio_manager(); - virtual std::shared_ptr create_server(std::shared_ptr, const std::string &conf) override; - virtual std::shared_ptr create_client(const std::string &conf) override; - virtual void update() override; + std::shared_ptr create_server(std::shared_ptr, const std::string &conf) override; + std::shared_ptr create_client(const std::string &conf) override; + void update() override; }; asio_manager manager; diff --git a/network/message.h b/network/message.h index 5aa07d78..436fd3eb 100644 --- a/network/message.h +++ b/network/message.h @@ -27,8 +27,8 @@ struct client_hello : public message { client_hello() : message(CLIENT_HELLO) {} - virtual void serialize(std::ostream &stream) const override; - virtual void deserialize(std::istream &stream) override; + void serialize(std::ostream &stream) const override; + void deserialize(std::istream &stream) override; int32_t version{0}; uint32_t start_packet{0}; @@ -43,8 +43,8 @@ struct server_hello : public message int64_t config{0}; std::string scenario; - virtual void serialize(std::ostream &stream) const override; - virtual void deserialize(std::istream &stream) override; + void serialize(std::ostream &stream) const override; + void deserialize(std::istream &stream) override; }; struct request_command : public message @@ -54,8 +54,8 @@ struct request_command : public message command_queue::commands_map commands; - virtual void serialize(std::ostream &stream) const override; - virtual void deserialize(std::istream &stream) override; + void serialize(std::ostream &stream) const override; + void deserialize(std::istream &stream) override; }; struct frame_info : public request_command @@ -66,8 +66,8 @@ struct frame_info : public request_command double dt{0.0}; double sync{0.0}; - virtual void serialize(std::ostream &stream) const override; - virtual void deserialize(std::istream &stream) override; + void serialize(std::ostream &stream) const override; + void deserialize(std::istream &stream) override; }; std::shared_ptr deserialize_message(std::istream &stream); diff --git a/rendering/nullrenderer.h b/rendering/nullrenderer.h index 69839f11..d48e6cf8 100644 --- a/rendering/nullrenderer.h +++ b/rendering/nullrenderer.h @@ -150,7 +150,7 @@ public: static bool renderer_register; - virtual imgui_renderer *GetImguiRenderer() + imgui_renderer *GetImguiRenderer() override { return nullptr; } diff --git a/widgets/map_objects.h b/widgets/map_objects.h index f5d07ebf..52ae5db3 100644 --- a/widgets/map_objects.h +++ b/widgets/map_objects.h @@ -29,7 +29,7 @@ struct semaphore : public map_object std::vector events; TMemCell *memcell = nullptr; - virtual gfx::basic_vertex vertex() override { + gfx::basic_vertex vertex() override { bool stop_signal = memcell->IsVelocity() && (memcell->Value1() == 0.0); return gfx::basic_vertex(location, glm::vec3(), (!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 } type; - virtual gfx::basic_vertex vertex() { + gfx::basic_vertex vertex() override { return gfx::basic_vertex(location, glm::vec3(), 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 preview; std::array 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)); } }; @@ -70,7 +70,7 @@ struct obstacle : public map_object { 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)); } }; diff --git a/world/EvLaunch.h b/world/EvLaunch.h index a38e9e4a..780f8d8f 100644 --- a/world/EvLaunch.h +++ b/world/EvLaunch.h @@ -53,13 +53,13 @@ public: private: // methods // radius() subclass details, calculates node's bounding radius - float radius_(); + float radius_() override; // 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 - 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 - void export_as_text_( std::ostream &Output ) const; + void export_as_text_( std::ostream &Output ) const override; // members int iKey { 0 }; diff --git a/world/MemCell.h b/world/MemCell.h index c2960f27..b6a40082 100644 --- a/world/MemCell.h +++ b/world/MemCell.h @@ -61,11 +61,11 @@ public: private: // methods // 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 - 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 - void export_as_text_( std::ostream &Output ) const; + void export_as_text_( std::ostream &Output ) const override; // members // content diff --git a/world/Traction.h b/world/Traction.h index 638f46b0..6fab29df 100644 --- a/world/Traction.h +++ b/world/Traction.h @@ -78,13 +78,13 @@ private: // methods glm::vec3 wire_color() const; // radius() subclass details, calculates node's bounding radius - float radius_(); + float radius_() override; // 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 - 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 - void export_as_text_( std::ostream &Output ) const; + void export_as_text_( std::ostream &Output ) const override; }; diff --git a/world/TractionPower.h b/world/TractionPower.h index d1faa037..fd5d7384 100644 --- a/world/TractionPower.h +++ b/world/TractionPower.h @@ -38,11 +38,11 @@ public: private: // methods // 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 - 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 - void export_as_text_( std::ostream &Output ) const; + void export_as_text_( std::ostream &Output ) const override; // members double NominalVoltage = 0.0;