aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Model/DocumentationReference.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/Model/DocumentationReference.kt')
-rw-r--r--core/src/main/kotlin/Model/DocumentationReference.kt13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationReference.kt b/core/src/main/kotlin/Model/DocumentationReference.kt
index 8263cd6a..4f28d7c3 100644
--- a/core/src/main/kotlin/Model/DocumentationReference.kt
+++ b/core/src/main/kotlin/Model/DocumentationReference.kt
@@ -19,7 +19,7 @@ enum class RefKind {
HiddenAnnotation,
Deprecation,
TopLevelPage,
- SinceKotlin
+ Platform
}
data class DocumentationReference(val from: DocumentationNode, val to: DocumentationNode, val kind: RefKind) {
@@ -71,3 +71,14 @@ class NodeReferenceGraph
references.forEach { it.resolve() }
}
}
+
+@Singleton
+class PlatformNodeRegistry {
+ private val platformNodes = hashMapOf<String, DocumentationNode>()
+
+ operator fun get(platform: String): DocumentationNode {
+ return platformNodes.getOrPut(platform) {
+ DocumentationNode(platform, Content.Empty, NodeKind.Platform)
+ }
+ }
+}