Skip to content

Commit

Permalink
Minor documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentneo committed Feb 21, 2019
1 parent 96cc475 commit 9f69d4a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Classes/GPXElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

import Foundation

// MARK:- Constants

let kGPXInvalidGPXFormatNotification = "kGPXInvalidGPXFormatNotification"

let kGPXDescriptionKey = "kGPXDescriptionKey"

open class GPXElement: NSObject {

public var parent: GPXElement?

//from GPXConst
let kGPXInvalidGPXFormatNotification = "kGPXInvalidGPXFormatNotification"

let kGPXDescriptionKey = "kGPXDescriptionKey"


// MARK:- Tag

func tagName() -> String {
Expand Down
19 changes: 16 additions & 3 deletions Classes/GPXRoot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

import Foundation

/// Creation of a GPX file starts here
///
/// `GPXRoot` holds all `metadata`, `waypoints`, `tracks`, `routes` and `extensions` types together before being packaged as a GPX file, or formatted as per GPX schema's requirements.
///
open class GPXRoot: GPXElement {

public var version: String? = "1.1"
Expand All @@ -17,19 +21,28 @@ open class GPXRoot: GPXElement {
public var tracks = [GPXTrack]()
public var extensions: GPXExtensions?

// MARK: GPX v1.1 Namespaces

/// Link to the GPX v1.1 schema
let schema = "http://www.topografix.com/GPX/1/1"
/// Link to the schema locations. If extended, the extended schema should be added.
let schemaLocation = "http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
/// Link to XML schema instance
let xsi = "http://www.w3.org/2001/XMLSchema-instance"

// MARK:- Instance
// MARK:- Public Initializers

/// for initializing without a creator name
public required init() {
super.init()

creator = "Powered by Open Source CoreGPX Project"

}

/// for initializing with a creator name
///
/// - Parameters:
/// - creator: name of your app, or whichever product that ends up generating a GPX file
///
public init(creator: String) {
super.init()
self.creator = creator
Expand Down

0 comments on commit 9f69d4a

Please sign in to comment.