-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathline_decoder.hh
95 lines (83 loc) · 2.43 KB
/
line_decoder.hh
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//
// line_decoder.hh
//
// Created by Erick Li on 04/16/19.
// Copyright © 2019 Erick Li. All rights reserved.
//
#ifndef __LINE_DECODER_H__
#define __LINE_DECODER_H__
#include <fstream>
#include <string>
#include <iostream>
/**
* The main function of line pattern decoder.
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param the type:
* 0: Normal;
* 1: Symbol.
* \param the property, which can be `outline` etc.
*/
void decodeLinePattern(char **cursor, std::string &jstring, int level, int type,
std::string property);
/**
* Decode the pattern of Simple Line Symbol
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
void decodeSimpleLine(char **cursor, std::string &jstring, int level);
/**
* Decode the pattern of Cartographical Line Symbol
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
void decodeCartoLine(char **cursor, std::string &jstring, int level);
/**
* Decode the pattern of Hash Line Symbol
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
void decodeHashLine(char **cursor, std::string &jstring, int level);
/**
* Decode the pattern of Marker Line Symbol
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
void decodeMarkerLine(char **cursor, std::string &jstring, int level);
/**
* Decode the pattern of line caps
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
int decodeLineCaps(char **cursor, std::string &jstring, int level);
/**
* Decode the pattern of line joins
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
int decodeLineJoins(char **cursor, std::string &jstring, int level);
/**
* Decode the pattern of line styles
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
*/
int decodeLineStyle(char **cursor, std::string &jstring, int level);
/**
* Decode the line style
* TEMPLATE is for line dot-dash patterns.
* interval length -> line length -> gap length.
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param (See json_writer.hh)
* \param type type of template feed (0: hash/carto line; 1: marker line)
*/
void decodeTemplate(char **cursor, std::string &jstring, int level, int type);
#endif