RealmSwift-Swift.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. // Generated by Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)
  2. #pragma clang diagnostic push
  3. #pragma clang diagnostic ignored "-Wgcc-compat"
  4. #if !defined(__has_include)
  5. # define __has_include(x) 0
  6. #endif
  7. #if !defined(__has_attribute)
  8. # define __has_attribute(x) 0
  9. #endif
  10. #if !defined(__has_feature)
  11. # define __has_feature(x) 0
  12. #endif
  13. #if !defined(__has_warning)
  14. # define __has_warning(x) 0
  15. #endif
  16. #if __has_attribute(external_source_symbol)
  17. # define SWIFT_STRINGIFY(str) #str
  18. # define SWIFT_MODULE_NAMESPACE_PUSH(module_name) _Pragma(SWIFT_STRINGIFY(clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in=module_name, generated_declaration))), apply_to=any(function, enum, objc_interface, objc_category, objc_protocol))))
  19. # define SWIFT_MODULE_NAMESPACE_POP _Pragma("clang attribute pop")
  20. #else
  21. # define SWIFT_MODULE_NAMESPACE_PUSH(module_name)
  22. # define SWIFT_MODULE_NAMESPACE_POP
  23. #endif
  24. #if __has_include(<swift/objc-prologue.h>)
  25. # include <swift/objc-prologue.h>
  26. #endif
  27. #pragma clang diagnostic ignored "-Wauto-import"
  28. #include <objc/NSObject.h>
  29. #include <stdint.h>
  30. #include <stddef.h>
  31. #include <stdbool.h>
  32. #if !defined(SWIFT_TYPEDEFS)
  33. # define SWIFT_TYPEDEFS 1
  34. # if __has_include(<uchar.h>)
  35. # include <uchar.h>
  36. # elif !defined(__cplusplus) || __cplusplus < 201103L
  37. typedef uint_least16_t char16_t;
  38. typedef uint_least32_t char32_t;
  39. # endif
  40. typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
  41. typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
  42. typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
  43. typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
  44. typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
  45. typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
  46. typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
  47. typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
  48. typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
  49. typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
  50. typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
  51. typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
  52. #endif
  53. #if !defined(SWIFT_PASTE)
  54. # define SWIFT_PASTE_HELPER(x, y) x##y
  55. # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
  56. #endif
  57. #if !defined(SWIFT_METATYPE)
  58. # define SWIFT_METATYPE(X) Class
  59. #endif
  60. #if !defined(SWIFT_CLASS_PROPERTY)
  61. # if __has_feature(objc_class_property)
  62. # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
  63. # else
  64. # define SWIFT_CLASS_PROPERTY(...)
  65. # endif
  66. #endif
  67. #if __has_attribute(objc_runtime_name)
  68. # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
  69. #else
  70. # define SWIFT_RUNTIME_NAME(X)
  71. #endif
  72. #if __has_attribute(swift_name)
  73. # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
  74. #else
  75. # define SWIFT_COMPILE_NAME(X)
  76. #endif
  77. #if __has_attribute(objc_method_family)
  78. # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
  79. #else
  80. # define SWIFT_METHOD_FAMILY(X)
  81. #endif
  82. #if __has_attribute(noescape)
  83. # define SWIFT_NOESCAPE __attribute__((noescape))
  84. #else
  85. # define SWIFT_NOESCAPE
  86. #endif
  87. #if __has_attribute(warn_unused_result)
  88. # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
  89. #else
  90. # define SWIFT_WARN_UNUSED_RESULT
  91. #endif
  92. #if __has_attribute(noreturn)
  93. # define SWIFT_NORETURN __attribute__((noreturn))
  94. #else
  95. # define SWIFT_NORETURN
  96. #endif
  97. #if !defined(SWIFT_CLASS_EXTRA)
  98. # define SWIFT_CLASS_EXTRA
  99. #endif
  100. #if !defined(SWIFT_PROTOCOL_EXTRA)
  101. # define SWIFT_PROTOCOL_EXTRA
  102. #endif
  103. #if !defined(SWIFT_ENUM_EXTRA)
  104. # define SWIFT_ENUM_EXTRA
  105. #endif
  106. #if !defined(SWIFT_CLASS)
  107. # if __has_attribute(objc_subclassing_restricted)
  108. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
  109. # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  110. # else
  111. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  112. # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  113. # endif
  114. #endif
  115. #if !defined(SWIFT_PROTOCOL)
  116. # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  117. # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  118. #endif
  119. #if !defined(SWIFT_EXTENSION)
  120. # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
  121. #endif
  122. #if !defined(OBJC_DESIGNATED_INITIALIZER)
  123. # if __has_attribute(objc_designated_initializer)
  124. # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
  125. # else
  126. # define OBJC_DESIGNATED_INITIALIZER
  127. # endif
  128. #endif
  129. #if !defined(SWIFT_ENUM_ATTR)
  130. # if defined(__has_attribute) && __has_attribute(enum_extensibility)
  131. # define SWIFT_ENUM_ATTR __attribute__((enum_extensibility(open)))
  132. # else
  133. # define SWIFT_ENUM_ATTR
  134. # endif
  135. #endif
  136. #if !defined(SWIFT_ENUM)
  137. # define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_ATTR SWIFT_ENUM_EXTRA _name : _type
  138. # if __has_feature(generalized_swift_name)
  139. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR SWIFT_ENUM_EXTRA _name : _type
  140. # else
  141. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) SWIFT_ENUM(_type, _name)
  142. # endif
  143. #endif
  144. #if !defined(SWIFT_UNAVAILABLE)
  145. # define SWIFT_UNAVAILABLE __attribute__((unavailable))
  146. #endif
  147. #if !defined(SWIFT_UNAVAILABLE_MSG)
  148. # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
  149. #endif
  150. #if !defined(SWIFT_AVAILABILITY)
  151. # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
  152. #endif
  153. #if !defined(SWIFT_DEPRECATED)
  154. # define SWIFT_DEPRECATED __attribute__((deprecated))
  155. #endif
  156. #if !defined(SWIFT_DEPRECATED_MSG)
  157. # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
  158. #endif
  159. #if __has_feature(attribute_diagnose_if_objc)
  160. # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
  161. #else
  162. # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
  163. #endif
  164. #if __has_feature(modules)
  165. @import Realm;
  166. @import ObjectiveC;
  167. @import Foundation;
  168. @import Realm.Private;
  169. #endif
  170. #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
  171. #pragma clang diagnostic ignored "-Wduplicate-method-arg"
  172. #if __has_warning("-Wpragma-clang-attribute")
  173. # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
  174. #endif
  175. #pragma clang diagnostic ignored "-Wunknown-pragmas"
  176. #pragma clang diagnostic ignored "-Wnullability"
  177. SWIFT_MODULE_NAMESPACE_PUSH("RealmSwift")
  178. @class RLMRealm;
  179. @class RLMObjectSchema;
  180. @class RLMSchema;
  181. /// <code>Object</code> is a class used to define Realm model objects.
  182. /// In Realm you define your model classes by subclassing <code>Object</code> and adding properties to be managed.
  183. /// You then instantiate and use your custom subclasses instead of using the <code>Object</code> class directly.
  184. /// \code
  185. /// class Dog: Object {
  186. /// @objc dynamic var name: String = ""
  187. /// @objc dynamic var adopted: Bool = false
  188. /// let siblings = List<Dog>()
  189. /// }
  190. ///
  191. /// \endcode<h3>Supported property types</h3>
  192. /// <ul>
  193. /// <li>
  194. /// <code>String</code>, <code>NSString</code>
  195. /// </li>
  196. /// <li>
  197. /// <code>Int</code>
  198. /// </li>
  199. /// <li>
  200. /// <code>Int8</code>, <code>Int16</code>, <code>Int32</code>, <code>Int64</code>
  201. /// </li>
  202. /// <li>
  203. /// <code>Float</code>
  204. /// </li>
  205. /// <li>
  206. /// <code>Double</code>
  207. /// </li>
  208. /// <li>
  209. /// <code>Bool</code>
  210. /// </li>
  211. /// <li>
  212. /// <code>Date</code>, <code>NSDate</code>
  213. /// </li>
  214. /// <li>
  215. /// <code>Data</code>, <code>NSData</code>
  216. /// </li>
  217. /// <li>
  218. /// <code>RealmOptional<Value></code> for optional numeric properties
  219. /// </li>
  220. /// <li>
  221. /// <code>Object</code> subclasses, to model many-to-one relationships
  222. /// </li>
  223. /// <li>
  224. /// <code>List<Element></code>, to model many-to-many relationships
  225. /// </li>
  226. /// </ul>
  227. /// <code>String</code>, <code>NSString</code>, <code>Date</code>, <code>NSDate</code>, <code>Data</code>, <code>NSData</code> and <code>Object</code> subclass properties can be declared as optional.
  228. /// <code>Int</code>, <code>Int8</code>, <code>Int16</code>, <code>Int32</code>, <code>Int64</code>, <code>Float</code>, <code>Double</code>, <code>Bool</code>, and <code>List</code> properties cannot. To store an optional
  229. /// number, use <code>RealmOptional<Int></code>, <code>RealmOptional<Float></code>, <code>RealmOptional<Double></code>, or <code>RealmOptional<Bool></code> instead,
  230. /// which wraps an optional numeric value.
  231. /// All property types except for <code>List</code> and <code>RealmOptional</code> <em>must</em> be declared as <code>@objc dynamic var</code>. <code>List</code> and
  232. /// <code>RealmOptional</code> properties must be declared as non-dynamic <code>let</code> properties. Swift <code>lazy</code> properties are not allowed.
  233. /// Note that none of the restrictions listed above apply to properties that are configured to be ignored by Realm.
  234. /// <h3>Querying</h3>
  235. /// You can retrieve all objects of a given type from a Realm by calling the <code>objects(_:)</code> instance method.
  236. /// <h3>Relationships</h3>
  237. /// See our <a href="http://realm.io/docs/cocoa">Cocoa guide</a> for more details.
  238. SWIFT_CLASS_NAMED("Object")
  239. @interface RealmSwiftObject : RLMObjectBase
  240. /// Creates an unmanaged instance of a Realm object.
  241. /// Call <code>add(_:)</code> on a <code>Realm</code> instance to add an unmanaged object into that Realm.
  242. /// <ul>
  243. /// <li>
  244. /// see: <code>Realm().add(_:)</code>
  245. /// </li>
  246. /// </ul>
  247. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  248. /// Indicates if the object can no longer be accessed because it is now invalid.
  249. /// An object can no longer be accessed if the object has been deleted from the Realm that manages it, or if
  250. /// <code>invalidate()</code> is called on that Realm.
  251. @property (nonatomic, readonly, getter=isInvalidated) BOOL invalidated;
  252. /// A human-readable description of the object.
  253. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  254. /// WARNING: This is an internal helper method not intended for public use.
  255. /// It is not considered part of the public API.
  256. /// :nodoc:
  257. + (Class _Nonnull)objectUtilClass:(BOOL)isSwift SWIFT_WARN_UNUSED_RESULT;
  258. /// Override this method to specify the name of a property to be used as the primary key.
  259. /// Only properties of types <code>String</code> and <code>Int</code> can be designated as the primary key. Primary key properties enforce
  260. /// uniqueness for each value whenever the property is set, which incurs minor overhead. Indexes are created
  261. /// automatically for primary key properties.
  262. ///
  263. /// returns:
  264. /// The name of the property designated as the primary key, or <code>nil</code> if the model has no primary key.
  265. + (NSString * _Nullable)primaryKey SWIFT_WARN_UNUSED_RESULT;
  266. /// Override this method to specify the names of properties to ignore. These properties will not be managed by
  267. /// the Realm that manages the object.
  268. ///
  269. /// returns:
  270. /// An array of property names to ignore.
  271. + (NSArray<NSString *> * _Nonnull)ignoredProperties SWIFT_WARN_UNUSED_RESULT;
  272. /// Returns an array of property names for properties which should be indexed.
  273. /// Only string, integer, boolean, <code>Date</code>, and <code>NSDate</code> properties are supported.
  274. ///
  275. /// returns:
  276. /// An array of property names.
  277. + (NSArray<NSString *> * _Nonnull)indexedProperties SWIFT_WARN_UNUSED_RESULT;
  278. - (id _Nullable)objectForKeyedSubscript:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
  279. - (void)setObject:(id _Nullable)value forKeyedSubscript:(NSString * _Nonnull)key;
  280. /// WARNING: This is an internal initializer not intended for public use.
  281. /// :nodoc:
  282. - (nonnull instancetype)initWithRealm:(RLMRealm * _Nonnull)realm schema:(RLMObjectSchema * _Nonnull)schema OBJC_DESIGNATED_INITIALIZER;
  283. /// WARNING: This is an internal initializer not intended for public use.
  284. /// :nodoc:
  285. - (nonnull instancetype)initWithValue:(id _Nonnull)value schema:(RLMSchema * _Nonnull)schema OBJC_DESIGNATED_INITIALIZER;
  286. @end
  287. /// Object interface which allows untyped getters and setters for Objects.
  288. /// :nodoc:
  289. SWIFT_CLASS("_TtC10RealmSwift13DynamicObject")
  290. @interface DynamicObject : RealmSwiftObject
  291. - (id _Nullable)objectForKeyedSubscript:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
  292. - (void)setObject:(id _Nullable)value forKeyedSubscript:(NSString * _Nonnull)key;
  293. /// :nodoc:
  294. - (id _Nullable)valueForUndefinedKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
  295. /// :nodoc:
  296. - (void)setValue:(id _Nullable)value forUndefinedKey:(NSString * _Nonnull)key;
  297. /// :nodoc:
  298. + (BOOL)shouldIncludeInDefaultSchema SWIFT_WARN_UNUSED_RESULT;
  299. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  300. - (nonnull instancetype)initWithRealm:(RLMRealm * _Nonnull)realm schema:(RLMObjectSchema * _Nonnull)schema OBJC_DESIGNATED_INITIALIZER;
  301. - (nonnull instancetype)initWithValue:(id _Nonnull)value schema:(RLMSchema * _Nonnull)schema OBJC_DESIGNATED_INITIALIZER;
  302. @end
  303. /// :nodoc:
  304. /// Internal class. Do not use directly. Used for reflection and initialization
  305. SWIFT_CLASS("_TtC10RealmSwift18LinkingObjectsBase")
  306. @interface LinkingObjectsBase : NSObject <NSFastEnumeration>
  307. - (NSInteger)countByEnumeratingWithState:(NSFastEnumerationState * _Nonnull)state objects:(id _Nullable * _Nonnull)buffer count:(NSInteger)len SWIFT_WARN_UNUSED_RESULT;
  308. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  309. @end
  310. /// :nodoc:
  311. /// Internal class. Do not use directly.
  312. SWIFT_CLASS("_TtC10RealmSwift8ListBase")
  313. @interface ListBase : RLMListBase
  314. /// Returns a human-readable description of the objects contained in the List.
  315. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  316. - (nonnull instancetype)initWithArray:(RLMArray<id> * _Nonnull)array OBJC_DESIGNATED_INITIALIZER;
  317. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  318. @end
  319. /// :nodoc:
  320. /// Internal class. Do not use directly.
  321. SWIFT_CLASS_NAMED("ObjectUtil")
  322. @interface RealmSwiftObjectUtil : NSObject
  323. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  324. @end
  325. SWIFT_MODULE_NAMESPACE_POP
  326. #pragma clang diagnostic pop