refs #409 Rename ISimulatorModelMappings to IModelMappingsProvider

The reason is that the previous name sounded more like a value
object. But instead it does read the mappings from somwhere.
This commit is contained in:
Roland Winklmeier
2015-05-02 00:40:10 +02:00
parent 6275e06b4f
commit 9e274badf1
7 changed files with 31 additions and 31 deletions

View File

@@ -0,0 +1,62 @@
/* 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 BLACKMISC_SIMULATION_FSCOMMON_VPILOTMODELMAPPINGS_H
#define BLACKMISC_SIMULATION_FSCOMMON_VPILOTMODELMAPPINGS_H
#include "blackmisc/blackmiscexport.h"
#include "blackmisc/simulation/modelmappingsprovider.h"
#include <QStringList>
namespace BlackMisc
{
namespace Simulation
{
namespace FsCommon
{
//! Model mappings
class BLACKMISC_EXPORT CModelMappingsProviderVPilot : public IModelMappingsProvider
{
public:
//! Constructor
CModelMappingsProviderVPilot(bool standardDirectory, QObject *parent = nullptr);
//! Destructor
virtual ~CModelMappingsProviderVPilot() {}
//! File names
void addFilename(const QString &fileName);
//! Directory with .vmr files
void addDirectory(const QString &directory);
//! Loaded files (number)
int countFilesLoaded() const { return m_loadedFiles; }
//! The standard directory for vPilot mappings
static const QString &standardMappingsDirectory();
public slots:
//! Load data
virtual bool read() override;
private:
QStringList m_fileList; //!< list of file names
QStringList m_fileListWithProblems; //!< problems during parsing
int m_loadedFiles = 0; //!< loaded files
//! Single file read and parsing
bool loadFile(const QString &fileName);
};
} // namespace
} // namespace
} // namespace
#endif // guard