diff --git a/src/plugins/simulator/fsx/simulator_fsx.cpp b/src/plugins/simulator/fsx/simulator_fsx.cpp index 0f1454e47..4ff45d865 100644 --- a/src/plugins/simulator/fsx/simulator_fsx.cpp +++ b/src/plugins/simulator/fsx/simulator_fsx.cpp @@ -33,16 +33,6 @@ namespace BlackSimPlugin { namespace Fsx { - BlackCore::ISimulator *CSimulatorFsxFactory::create(QObject *parent) - { - return new Fsx::CSimulatorFsx(parent); - } - - BlackSim::CSimulatorInfo CSimulatorFsxFactory::getSimulatorInfo() const - { - return CSimulatorInfo::FSX(); - } - CSimulatorFsx::CSimulatorFsx(QObject *parent) : ISimulator(parent), m_simulatorInfo(CSimulatorInfo::FSX()), diff --git a/src/plugins/simulator/fsx/simulator_fsxfactory.cpp b/src/plugins/simulator/fsx/simulator_fsxfactory.cpp new file mode 100644 index 000000000..dcef4c98c --- /dev/null +++ b/src/plugins/simulator/fsx/simulator_fsxfactory.cpp @@ -0,0 +1,35 @@ +/* Copyright (C) 2013 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "simulator_fsxfactory.h" +#include "simulator_fsx.h" +#include "blacksim/simulatorinfo.h" +#include "blackmisc/project.h" +#include +#include + +using namespace BlackSim; +using namespace BlackCore; + +namespace BlackSimPlugin +{ + namespace Fsx + { + BlackCore::ISimulator *CSimulatorFsxFactory::create(QObject *parent) + { + return new Fsx::CSimulatorFsx(parent); + } + + CSimulatorInfo CSimulatorFsxFactory::getSimulatorInfo() const + { + return CSimulatorInfo::FSX(); + } + + } // namespace +} // namespace diff --git a/src/plugins/simulator/fsx/simulator_fsxfactory.h b/src/plugins/simulator/fsx/simulator_fsxfactory.h new file mode 100644 index 000000000..20ecbe10b --- /dev/null +++ b/src/plugins/simulator/fsx/simulator_fsxfactory.h @@ -0,0 +1,45 @@ +/* Copyright (C) 2013 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKSIMPLUGIN_SIMULATOR_FSXFACTORY_H +#define BLACKSIMPLUGIN_SIMULATOR_FSXFACTORY_H + +#include "blackcore/simulator.h" +#include "blacksim/simulatorinfo.h" + +#include +#include +#include + +namespace BlackSimPlugin +{ + namespace Fsx + { + //! Factory implementation to create CSimulatorFsx instances + class CSimulatorFsxFactory : public QObject, public BlackCore::ISimulatorFactory + { + Q_OBJECT + // TODO: @RW, move this string into CProject please + Q_PLUGIN_METADATA(IID "net.vatsim.PilotClient.BlackCore.SimulatorInterface") + Q_INTERFACES(BlackCore::ISimulatorFactory) + + public: + //! \copydoc BlackCore::ISimulatorFactory::create + virtual BlackCore::ISimulator *create(QObject *parent) override; + + //! \copydoc BlackCore::ISimulatorFactory::getSimulatorInfo + virtual BlackSim::CSimulatorInfo getSimulatorInfo() const override; + }; + + } // namespace +} // namespace + +#endif // guard