Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,26 @@ data class OCProtocol(
}

fun baseMethods(): List<OCMethod> {
// // fixme: I believe this function was devised in a misconception that only one of these
// // fields could be non-null per instance.
return (instanceMethods ?: listOf()) +
(classMethods ?: listOf()) +
(optionalInstanceMethods ?: listOf()) +
(optionalClassMethods ?: listOf())
}
}

data class OCCategory(
override val name: String,
var contents: List<OCCategoryClassEntry>,
) : OCFieldContainer(name)

data class OCCategoryClassEntry(
val category: OCCategory,
val klass: OCClass,
val instanceMethods: List<OCMethod>?,
val classMethods: List<OCMethod>?,
val protocols: List<OCProtocol>?,
) : OCFieldContainer("${klass.name} (${category.name})")

data class OCMethod(
var parent: OCFieldContainer,
override val name: String,
Expand Down