forked from kscience/visionforge
Fix serializer module
This commit is contained in:
parent
f72d626b0b
commit
072b036fa2
@ -1,9 +1,9 @@
|
|||||||
package hep.dataforge.vision.gdml
|
package hep.dataforge.vision.gdml
|
||||||
|
|
||||||
import hep.dataforge.vision.solid.encodeToString
|
import hep.dataforge.vision.solid.encodeToString
|
||||||
|
import kscience.gdml.GDML
|
||||||
import nl.adaptivity.xmlutil.StAXReader
|
import nl.adaptivity.xmlutil.StAXReader
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import kscience.gdml.GDML
|
|
||||||
|
|
||||||
class TestConvertor {
|
class TestConvertor {
|
||||||
|
|
||||||
|
@ -12,9 +12,7 @@ import hep.dataforge.vision.Vision
|
|||||||
import hep.dataforge.vision.VisionForm
|
import hep.dataforge.vision.VisionForm
|
||||||
import hep.dataforge.vision.VisionManager
|
import hep.dataforge.vision.VisionManager
|
||||||
import hep.dataforge.vision.VisionManager.Companion.VISION_SERIAL_MODULE_TARGET
|
import hep.dataforge.vision.VisionManager.Companion.VISION_SERIAL_MODULE_TARGET
|
||||||
import kotlinx.serialization.DeserializationStrategy
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.ExperimentalSerializationApi
|
|
||||||
import kotlinx.serialization.KSerializer
|
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.modules.*
|
import kotlinx.serialization.modules.*
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
@ -114,6 +112,19 @@ public class SolidManager(meta: Meta) : AbstractPlugin(meta) {
|
|||||||
subclass(SolidLabel.serializer())
|
subclass(SolidLabel.serializer())
|
||||||
subclass(Sphere.serializer())
|
subclass(Sphere.serializer())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
polymorphic(Solid::class) {
|
||||||
|
subclass(SolidGroup.serializer())
|
||||||
|
subclass(Proxy.serializer())
|
||||||
|
subclass(Composite.serializer())
|
||||||
|
subclass(Tube.serializer())
|
||||||
|
subclass(Box.serializer())
|
||||||
|
subclass(Convex.serializer())
|
||||||
|
subclass(Extruded.serializer())
|
||||||
|
subclass(PolyLine.serializer())
|
||||||
|
subclass(SolidLabel.serializer())
|
||||||
|
subclass(Sphere.serializer())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val jsonForSolids = Json {
|
val jsonForSolids = Json {
|
||||||
|
Loading…
Reference in New Issue
Block a user