mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
* MDAL 0.5.90 : support for custom Logger and 1D meshes * [FEATURE] [MESH] Support rendering of 1D meshes, see https://github.com/qgis/QGIS-Enhancement-Proposals/issues/164 1D mesh consist of edges (edge is straight line segment with 2 vertices) and the data that is defined on either vertices or edges. Such data can be loaded by MDAL and rendered as mesh layer in QGIS.
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
/*
|
|
MDAL - Mesh Data Abstraction Library (MIT License)
|
|
Copyright (C) 2018 Peter Petrik (zilolv at gmail dot com)
|
|
*/
|
|
|
|
#ifndef MDAL_DRIVER_MANAGER_HPP
|
|
#define MDAL_DRIVER_MANAGER_HPP
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
#include "mdal.h"
|
|
#include "mdal_data_model.hpp"
|
|
#include "mdal_logger.hpp"
|
|
#include "frmts/mdal_driver.hpp"
|
|
|
|
namespace MDAL
|
|
{
|
|
|
|
class DriverManager
|
|
{
|
|
public:
|
|
static DriverManager &instance()
|
|
{
|
|
static DriverManager sInstance;
|
|
return sInstance;
|
|
}
|
|
DriverManager( DriverManager const & ) = delete;
|
|
void operator=( DriverManager const & ) = delete;
|
|
|
|
std::unique_ptr< Mesh > load( const std::string &meshFile ) const;
|
|
void loadDatasets( Mesh *mesh, const std::string &datasetFile ) const;
|
|
|
|
void save( Mesh *mesh, const std::string &uri, const std::string &driver ) const;
|
|
|
|
size_t driversCount() const;
|
|
std::shared_ptr<MDAL::Driver> driver( const std::string &driverName ) const;
|
|
std::shared_ptr<MDAL::Driver> driver( size_t index ) const;
|
|
|
|
private:
|
|
DriverManager();
|
|
|
|
std::vector<std::shared_ptr<MDAL::Driver>> mDrivers;
|
|
};
|
|
|
|
} // namespace MDAL
|
|
#endif //MDAL_DRIVER_MANAGER_HPP
|