File: plotMapProjection.h

package info (click to toggle)
groops 0%2Bgit20250907%2Bds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 11,140 kB
  • sloc: cpp: 135,607; fortran: 1,603; makefile: 20
file content (73 lines) | stat: -rw-r--r-- 2,278 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/***********************************************/
/**
* @file plotMapProjection.h
*
* @brief Map projections used for plotting.
*
* @author Andreas Kvas
* @author Torsten Mayer-Guerr
* @date 2015-10-23
*
*/
/***********************************************/

#ifndef __GROOPS_PLOTMAPROJECTION__
#define __GROOPS_PLOTMAPROJECTION__

// Latex documentation
#ifdef DOCSTRING_PlotMapProjection
static const char *docstringPlotMapProjection = R"(
\section{PlotMapProjection}\label{plotMapProjectionType}
Selects the underlying projection of \program{PlotMap}.
)";
#endif

/***********************************************/

#include "base/import.h"
#include "config/config.h"

/** @addtogroup plotGroup */
/// @{

/***** TYPES ***********************************/

class PlotMapProjection;
typedef std::shared_ptr<PlotMapProjection> PlotMapProjectionPtr;

/***** CLASS ***********************************/

/** @brief Layers for maps.
* An Instance of this class can be created by @ref readConfig. */
class PlotMapProjection
{
public:
  virtual ~PlotMapProjection() {}

  virtual std::string scriptEntry(Double width, Double height) const = 0;

  virtual Double aspectRatio() const {return 1;}

  /** @brief creates an derived instance of this class. */
  static PlotMapProjectionPtr create(Config &config, const std::string &name);
};

/***** FUNCTIONS *******************************/

/** @brief Creates a class PlotMapProjection.
* Search for a node with @a name in the Config node.
* if @a name is not found the function returns FALSE and @a plotMapProjection is untouched.
* @param config The config node which includes the node with the options for this class
* @param name Tag name in the config.
* @param[out] plotMapProjection Created class.
* @param mustSet If is MUSTSET and @a name is not found, this function throws an exception instead of returning with FALSE.
* @param defaultValue Ignored at the moment.
* @param annotation Description of the function of this class.
* @relates PlotMapProjection */
template<> Bool readConfig(Config &config, const std::string &name, PlotMapProjectionPtr &plotMapProjection, Config::Appearance mustSet, const std::string &defaultValue, const std::string &annotation);

/// @}

/***********************************************/

#endif