-
Notifications
You must be signed in to change notification settings - Fork 210
/
ParseNode.swift
23 lines (23 loc) · 1.03 KB
/
ParseNode.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Foundation
public protocol ParseNode {
func getChileNode(key: String) throws -> ParseNode?
func getObjectValue<T:Parsable>(ctor: ParsableFactory) throws -> T?
func getCollectionOfObjectValues<T:Parsable>(ctor: ParsableFactory) throws -> [T]?
func getCollectionOfPrimitiveValues<T>() throws -> [T]?
func getStringValue() throws -> String?
func getBoolValue() throws -> Bool?
func getUint8Value() throws -> UInt8?
func getInt8Value() throws -> Int8?
func getInt32Value() throws -> Int32?
func getInt64Value() throws -> Int64?
func getFloat32Value() throws -> Float32?
func getFloat64Value() throws -> Float64?
func getByteArrayValue() throws -> [UInt8]?
func getDateValue() throws -> Date? //TODO
func getTimeOnlyValue() throws -> Date? //TODO
func getDateOnlyValue() throws -> Date?
func getDurationValue() throws -> Date? //TODO
func getUUIDValue() throws -> UUID?
func getAdditionalData() throws -> [String:Any]?
//TODO get enum value & get collection of enum values
}