1
package org.perl6.nqp.sixmodel;
2
import org.perl6.nqp.runtime.ThreadContext;
5
* A scalar container has a ContainerSpec hung off its STable. It should be a
6
* subclass of this abstract base class.
8
public abstract class ContainerSpec {
9
/* Fetches a value out of a container. Used for decontainerization. */
10
public abstract SixModelObject fetch(ThreadContext tc, SixModelObject cont);
12
/* Stores a value in a container. Used for assignment. */
13
public abstract void store(ThreadContext tc, SixModelObject cont, SixModelObject obj);
15
/* Stores a value in a container, without any checking of it (this
16
* assumes an optimizer or something else already did it). Used for
18
public abstract void storeUnchecked(ThreadContext tc, SixModelObject cont, SixModelObject obj);
20
/* Name of this container specification. */
21
public abstract String name();
23
/* Serializes the container data, if any. */
24
public abstract void serialize(ThreadContext tc, STable st, SerializationWriter writer);
26
/* Deserializes the container data, if any. */
27
public abstract void deserialize(ThreadContext tc, STable st, SerializationReader reader);