//----------------------------------------------------------------------------//
// module ThrTune.cpp //
// //
// Thread function: Tune parameters using TTune //
// // //
// copyright (c) 2003 by Lars Haendel //
// home: www.newty.de //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 2 of the License. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
//----------------------------------------------------------------------------//
#ifndef TuneH
#define TuneH
#include <Classes.hpp>
#include "FMain.h"
#include "tune.h"
//----------------------------------------------------------------------------------------------------------------------
// Thread function: Tunes parameters
class ThrTune : public TThread
{
private:
void __fastcall MessageBox(); // display error message
char szText[256]; // error message text
TFMain* main; // main window; used to callback on finish and to access stop flag
TTune* tuningResults; // tuning results; needed to call TTune::DoIt()
void __fastcall OnFinish(TObject*); // finishing function: calls TFMain::OnTuneFinished
void __fastcall Execute();
public:
__fastcall ThrTune(bool CreateSuspended, TFMain*const& _main, TTune*const& _tuningResults);
};
#endif