diff --git a/dataforge-data/src/commonMain/kotlin/hep/dataforge/data/Data.kt b/dataforge-data/src/commonMain/kotlin/hep/dataforge/data/Data.kt index 14f98651..e8cd20e9 100644 --- a/dataforge-data/src/commonMain/kotlin/hep/dataforge/data/Data.kt +++ b/dataforge-data/src/commonMain/kotlin/hep/dataforge/data/Data.kt @@ -14,7 +14,7 @@ import kotlin.reflect.KClass */ interface Data : MetaRepr { /** - * Type marker for the data. The type is known before the calculation takes place so it could be cheched. + * Type marker for the data. The type is known before the calculation takes place so it could be checked. */ val type: KClass /** diff --git a/dataforge-io/build.gradle b/dataforge-io/build.gradle index a0011494..56384c09 100644 --- a/dataforge-io/build.gradle +++ b/dataforge-io/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.jetbrains.kotlin.multiplatform" + id("org.jetbrains.kotlin.multiplatform") } repositories { @@ -9,7 +9,7 @@ repositories { kotlin { targets { fromPreset(presets.jvm, 'jvm') - //fromPreset(presets.js, 'js') + fromPreset(presets.js, 'js') // For ARM, preset should be changed to presets.iosArm32 or presets.iosArm64 // For Linux, preset should be changed to e.g. presets.linuxX64 // For MacOS, preset should be changed to e.g. presets.macosX64 @@ -19,6 +19,19 @@ kotlin { commonMain { dependencies { api project(":dataforge-context") + api project(":dataforge-meta-io") + } + } + + jvmMain { + dependencies { + + } + } + + jsMain { + dependencies { + } } } diff --git a/dataforge-io/src/commonMain/kotlin/hep/dataforge/io/Output.kt b/dataforge-io/src/commonMain/kotlin/hep/dataforge/io/Output.kt new file mode 100644 index 00000000..0f45726d --- /dev/null +++ b/dataforge-io/src/commonMain/kotlin/hep/dataforge/io/Output.kt @@ -0,0 +1,12 @@ +package hep.dataforge.io + +import hep.dataforge.context.ContextAware +import hep.dataforge.meta.EmptyMeta +import hep.dataforge.meta.Meta + +/** + * A generic way to render any object in the output. + */ +interface Output : ContextAware { + fun render(obj: T, meta: Meta = EmptyMeta) +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 4a91be73..774ee96a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -12,5 +12,6 @@ include( ":dataforge-meta", ":dataforge-meta-io", ":dataforge-context", - ":dataforge-data" + ":dataforge-data", + ":dataforge-io" )