Repository navigation
Expand file tree
/
Copy pathmapconvertparser.h
More file actions
69 lines (59 loc) · 2.35 KB
/
Copy pathmapconvertparser.h
File metadata and controls
69 lines (59 loc) · 2.35 KB
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
// Copyright (C) 2018 Petros Koutsolampros
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include "imodeparser.h"
#include "salalib/shapemap.h"
class MapConvertParser : public IModeParser
{
public:
MapConvertParser():
m_outMapType(ShapeMap::EMPTYMAP),
m_outMapName(""),
m_removeInputMap(false),
m_copyAttributes(false),
m_removeStubLengthPRC(0)
{}
// IModeParser interface
public:
std::string getModeName() const
{
return "MAPCONVERT";
}
std::string getHelp() const
{
return "Mode options for Map Conversion:\n"\
" -co Output map type (to convert to)\n"\
" Possible input/output map types:\n"\
" - drawing\n"\
" - axial\n"\
" - segment\n"\
" - data\n"\
" - convex\n"\
" -con Output map name\n"\
" -cir Remove input map\n"\
" -coc Copy attributes to output map (Only between DATA, AXIAL and SEGMENT)\n"\
" -crsl <%> Percent of line length of axial stubs to remove (Only for AXIAL -> SEGMENT)\n\n";
}
void parse(int argc, char **argv);
void run(const CommandLineParser &clp, IPerformanceSink &perfWriter) const;
int outputMapType() const { return m_outMapType; }
std::string outputMapName() const { return m_outMapName; }
bool removeInputMap() const { return m_removeInputMap; }
bool copyAttributes() const { return m_copyAttributes; }
double removeStubLength() const { return m_removeStubLengthPRC; }
private:
int m_outMapType;
std::string m_outMapName;
bool m_removeInputMap;
bool m_copyAttributes;
double m_removeStubLengthPRC;
};