cupertino-docs/docs/driverkit/documentation_driverkit_osset_withobjects.json

27 lines
2.5 KiB
JSON

{
"abstract" : "Creates and initializes an OSSet populated with objects provided.",
"codeExamples" : [
],
"contentHash" : "f7c96679ba6b501cf36a1e9ecad0572270d8afff6de39cdf56d9e05a97c7ae3c",
"crawledAt" : "2025-12-05T14:35:50Z",
"declaration" : {
"code" : "static OSSetPtr withObjects(const OSObject * * values, uint32_t count, uint32_t capacity);",
"language" : "swift"
},
"id" : "4CABCC8D-36EB-4850-91E8-529573D5E53B",
"kind" : "unknown",
"language" : "occ",
"module" : "DriverKit",
"overview" : "## Return Value\n\nAn instance of OSSet containing the objects provided, with a retain count of 1; `NULL` on failure.\n\n## Discussion\n\n`objects` must be non-`NULL`, and `count` must be nonzero. If `capacity` is nonzero, it must be greater than or equal to `count`. The new OSSet will grow as needed to accommodate more objects (*unlike*[doc:\/\/com.apple.documentation\/documentation\/CoreFoundation\/CFMutableSet], for which the initial capacity is a hard limit).\n\nThe objects in `objects` are retained for storage in the new set, not copied.",
"platforms" : [
"Unsupported OS: driverkit"
],
"rawMarkdown" : "---\nsource: https:\/\/developer.apple.com\/documentation\/DriverKit\/OSSet\/withObjects\ncrawled: 2025-12-05T14:35:50Z\n---\n\n# withObjects\n\n**Static Method**\n\nCreates and initializes an OSSet populated with objects provided.\n\n## Declaration\n\n```swift\nstatic OSSetPtr withObjects(const OSObject * * values, uint32_t count, uint32_t capacity);\n```\n\n## Parameters\n\n- **values**: A C array of OSMetaClassBase-derived objects.\n- **count**: The number of objects to be placed into the set.\n- **capacity**: The initial storage capacity of the new set object. If 0, `count` is used; otherwise this value must be greater than or equal to `count`.\n\n## Return Value\n\nAn instance of OSSet containing the objects provided, with a retain count of 1; `NULL` on failure.\n\n## Discussion\n\n`objects` must be non-`NULL`, and `count` must be nonzero. If `capacity` is nonzero, it must be greater than or equal to `count`. The new OSSet will grow as needed to accommodate more objects (*unlike*[doc:\/\/com.apple.documentation\/documentation\/CoreFoundation\/CFMutableSet], for which the initial capacity is a hard limit).\n\nThe objects in `objects` are retained for storage in the new set, not copied.\n\n",
"sections" : [
],
"source" : "appleJSON",
"title" : "withObjects",
"url" : "https:\/\/developer.apple.com\/documentation\/DriverKit\/OSSet\/withObjects"
}