added iOS source code
[wl-app.git] / iOS / Pods / RealmSwift / RealmSwift / Aliases.swift
1 ////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright 2014 Realm Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 ////////////////////////////////////////////////////////////////////////////
18
19 import Foundation
20 import Realm
21
22 // These types don't change when wrapping in Swift
23 // so we just typealias them to remove the 'RLM' prefix
24
25 // MARK: Aliases
26
27 /**
28  `PropertyType` is an enum describing all property types supported in Realm models.
29
30  For more information, see [Realm Models](https://realm.io/docs/swift/latest/#models).
31
32  ### Primitive types
33
34  * `Int`
35  * `Bool`
36  * `Float`
37  * `Double`
38
39  ### Object types
40
41  * `String`
42  * `Data`
43  * `Date`
44
45  ### Relationships: Array (in Swift, `List`) and `Object` types
46
47  * `Object`
48  * `Array`
49 */
50 public typealias PropertyType = RLMPropertyType
51
52 /**
53  An opaque token which is returned from methods which subscribe to changes to a Realm.
54
55  - see: `Realm.observe(_:)`
56  */
57 public typealias NotificationToken = RLMNotificationToken
58
59 extension NotificationToken {
60     @available(*, unavailable, renamed: "invalidate()")
61     @nonobjc public func stop() { fatalError() }
62 }