Skip to content

Commit

Permalink
Documentation for 0.7.0
Browse files Browse the repository at this point in the history
100% documented!
  • Loading branch information
vincentneo committed Sep 11, 2019
1 parent ff2669b commit b284150
Show file tree
Hide file tree
Showing 78 changed files with 2,120 additions and 13,498 deletions.
2 changes: 2 additions & 0 deletions Classes/GPXParser.swift
Expand Up @@ -256,11 +256,13 @@ extension GPXParser: XMLParserDelegate {
stack.removeLast()
}

/// Handling of XML parser's thrown error. (if there is any)
public func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error) {
errorAtLine = parser.lineNumber
parserError = parseError
}

/// Handles GPX errors during parse, unrelated to XML formatting.
private func parserGPXErrorHandling(_ parser: XMLParser, elementName: String, attributeDict: [String : String]) {
if elementName == "gpx" && attributeDict["version"] != "1.1" && !shouldContinueAfterFirstError {
parserError = GPXError.parser.unsupportedVersion
Expand Down
4 changes: 4 additions & 0 deletions Classes/GPXPointSegment.swift
Expand Up @@ -24,6 +24,10 @@ open class GPXPointSegment: GPXElement, Codable {
super.init()
}

/// Inits native element from raw parser value
///
/// - Parameters:
/// - raw: Raw element expected from parser
init(raw: GPXRawElement) {
for child in raw.children {
if child.name == "pt" {
Expand Down
1 change: 1 addition & 0 deletions Classes/GPXRawElement.swift
Expand Up @@ -12,6 +12,7 @@ import Foundation
///
/// Should not be used as is, and should be disposed off once done with parsing.
final class GPXRawElement {

/// name tag of element
var name: String

Expand Down
1 change: 1 addition & 0 deletions Classes/GPXRoot.swift
Expand Up @@ -194,6 +194,7 @@ public final class GPXRoot: GPXElement, Codable {
}
}

/// Remove waypoint from root's array at index.
public func remove(WaypointAtIndex index: Int) {
self.waypoints.remove(at: index)
}
Expand Down
5 changes: 5 additions & 0 deletions Classes/GPXRoutePoint.swift
Expand Up @@ -7,6 +7,11 @@

import Foundation

/**
A route point is just like a waypoint or track point, but is suited to be part of a route.
These route points in collective, forms a valid route.
*/
public final class GPXRoutePoint: GPXWaypoint {

/// Default initializer
Expand Down
4 changes: 2 additions & 2 deletions Classes/GPXTrackPoint.swift
Expand Up @@ -15,13 +15,13 @@ import Foundation
*/
public final class GPXTrackPoint: GPXWaypoint {

// MARK:- Initializers

/// Default Initializer.
public required init() {
super.init()
}

// MARK:- Instance

public override init(latitude: Double, longitude: Double) {
super.init(latitude: latitude, longitude: longitude)
}
Expand Down
277 changes: 92 additions & 185 deletions docs/Classes.html

Large diffs are not rendered by default.

381 changes: 0 additions & 381 deletions docs/Classes/Convert.html

This file was deleted.

95 changes: 20 additions & 75 deletions docs/Classes/GPXAuthor.html
Expand Up @@ -14,7 +14,7 @@
<a title="GPXAuthor Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">CoreGPX 0.6.5 Docs</a> (83% documented)</p>
<p><a href="../index.html">CoreGPX 0.7.0 Docs</a> (100% documented)</p>
<p class="header-right"><a href="https://www.github.com/vincentneo/CoreGPX"><img src="../img/gh.png"/>View on GitHub</a></p>
</div>
</header>
Expand All @@ -31,9 +31,6 @@
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Convert.html">Convert</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXAuthor.html">GPXAuthor</a>
</li>
Expand All @@ -43,9 +40,6 @@
<li class="nav-group-task">
<a href="../Classes/GPXCopyright.html">GPXCopyright</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXDateParser.html">GPXDateParser</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXElement.html">GPXElement</a>
</li>
Expand All @@ -56,10 +50,10 @@
<a href="../Classes/GPXExtensions.html">GPXExtensions</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXLink.html">GPXLink</a>
<a href="../Classes/GPXExtensionsElement.html">GPXExtensionsElement</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXLink/CodingKeys.html">– CodingKeys</a>
<a href="../Classes/GPXLink.html">GPXLink</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXMetadata.html">GPXMetadata</a>
Expand All @@ -82,36 +76,21 @@
<li class="nav-group-task">
<a href="../Classes/GPXRoute.html">GPXRoute</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXRoute/CodingKeys.html">– CodingKeys</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXRoutePoint.html">GPXRoutePoint</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXTrack.html">GPXTrack</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXTrack/CodingKeys.html">– CodingKeys</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXTrackPoint.html">GPXTrackPoint</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXTrackSegment.html">GPXTrackSegment</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXTrackSegment/CodingKeys.html">– CodingKeys</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXType.html">GPXType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXWaypoint.html">GPXWaypoint</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GPXWaypoint/CodingKeys.html">– CodingKeys</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand All @@ -123,10 +102,16 @@
</ul>
</li>
<li class="nav-group-name">
<a href="../Extensions.html">Extensions</a>
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Extensions/NSMutableString.html">NSMutableString</a>
<a href="../Structs/GPXError.html">GPXError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/GPXError/coordinates.html">– coordinates</a>
</li>
<li class="nav-group-task">
<a href="../Structs/GPXError/parser.html">– parser</a>
</li>
</ul>
</li>
Expand All @@ -138,7 +123,7 @@
<h1>GPXAuthor</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">GPXAuthor</span> <span class="p">:</span> <span class="kt"><a href="../Classes/GPXPerson.html">GPXPerson</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">GPXAuthor</span> <span class="p">:</span> <span class="kt"><a href="../Classes/GPXPerson.html">GPXPerson</a></span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -173,77 +158,37 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://www.github.com/vincentneo/CoreGPX/tree/0.6.5/Classes/GPXAuthor.swift#L14-L16">Show on GitHub</a>
<a href="https://www.github.com/vincentneo/CoreGPX/tree/0.7.0/Classes/GPXAuthor.swift#L16-L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:7CoreGPX9GPXAuthorC10dictionaryACSDyS2SG_tcfc"></a>
<a name="//apple_ref/swift/Method/init(dictionary:)" class="dashAnchor"></a>
<a class="token" href="#/s:7CoreGPX9GPXAuthorC10dictionaryACSDyS2SG_tcfc">init(dictionary:)</a>
<a name="/s:7CoreGPX9GPXAuthorC4fromACs7Decoder_p_tKcfc"></a>
<a name="//apple_ref/swift/Method/init(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:7CoreGPX9GPXAuthorC4fromACs7Decoder_p_tKcfc">init(from:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Internal use only. For parsing use.</p>

</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">override</span> <span class="nf">init</span><span class="p">(</span><span class="nv">dictionary</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">String</span><span class="p">])</span></code></pre>
<p>Decoder handling (from superclass)</p>

</div>
</div>
<div class="slightly-smaller">
<a href="https://www.github.com/vincentneo/CoreGPX/tree/0.6.5/Classes/GPXAuthor.swift#L19-L21">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Tag"></a>
<a name="//apple_ref/swift/Section/Tag" class="dashAnchor"></a>
<a href="#/Tag">
<h3 class="section-name">Tag</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:7CoreGPX9GPXAuthorC7tagNameSSyF"></a>
<a name="//apple_ref/swift/Method/tagName()" class="dashAnchor"></a>
<a class="token" href="#/s:7CoreGPX9GPXAuthorC7tagNameSSyF">tagName()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">tagName</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>
<pre class="highlight swift"><code><span class="kd">required</span> <span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">from</span> <span class="nv">decoder</span><span class="p">:</span> <span class="kt">Decoder</span><span class="p">)</span> <span class="k">throws</span></code></pre>

</div>
</div>
<div class="slightly-smaller">
<a href="https://www.github.com/vincentneo/CoreGPX/tree/0.6.5/Classes/GPXAuthor.swift#L25-L27">Show on GitHub</a>
<a href="https://www.github.com/vincentneo/CoreGPX/tree/0.7.0/Classes/GPXAuthor.swift#L26-L28">Show on GitHub</a>
</div>
</section>
</div>
Expand All @@ -253,7 +198,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="https://www.github.com/vincentneo" target="_blank" rel="external">Vincent</a>. All rights reserved. (Last updated: 2019-07-07)</p>
<p>&copy; 2019 <a class="link" href="https://www.github.com/vincentneo" target="_blank" rel="external">Vincent</a>. All rights reserved. (Last updated: 2019-09-11)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down

0 comments on commit b284150

Please sign in to comment.