QGIS API Documentation  3.0.2-Girona (307d082)
qgsreadwritecontext.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsreadwritecontext.h
3  ----------------------
4  begin : May 2017
5  copyright : (C) 2017 by Martin Dobias
6  email : wonder dot sk at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSREADWRITECONTEXT_H
19 #define QGSREADWRITECONTEXT_H
20 
21 #include "qgspathresolver.h"
22 
29 class CORE_EXPORT QgsReadWriteContext
30 {
31  public:
32 
36  QgsReadWriteContext() = default;
37 
39  const QgsPathResolver &pathResolver() const { return mPathResolver; }
40 
42  void setPathResolver( const QgsPathResolver &resolver ) { mPathResolver = resolver; }
43 
44  private:
45  QgsPathResolver mPathResolver;
46 };
47 
48 #endif // QGSREADWRITECONTEXT_H
The class is used as a container of context for various read/write operations on other objects...
void setPathResolver(const QgsPathResolver &resolver)
Sets up path resolver for conversion between relative and absolute paths.
const QgsPathResolver & pathResolver() const
Returns path resolver for conversion between relative and absolute paths.
Resolves relative paths into absolute paths and vice versa.