sisc.ser
Class LibraryBuilder

java.lang.Object
  extended by sisc.ser.BerEncoding
      extended by sisc.ser.LibraryBuilder
All Implemented Interfaces:
ExpressionVisitor

public class LibraryBuilder
extends BerEncoding
implements ExpressionVisitor

Keeps track of entry points - points where serialization begins.


Constructor Summary
LibraryBuilder()
           
LibraryBuilder(AppContext ctx)
           
LibraryBuilder(AppContext ctx, boolean iae)
           
 
Method Summary
 int add(Expression val)
          Add a shared data structure
 int add(Symbol name, Expression val)
          Add an entry point.
 Library buildLibrary(java.lang.String name, java.io.OutputStream out)
           
 int get(Expression val)
           
 void setAppContext(AppContext ctx)
           
 boolean visit(ExpressionVisitee e)
           
 
Methods inherited from class sisc.ser.BerEncoding
readBer, readBerLong, readBerShort, writeBer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibraryBuilder

public LibraryBuilder()

LibraryBuilder

public LibraryBuilder(AppContext ctx)

LibraryBuilder

public LibraryBuilder(AppContext ctx,
                      boolean iae)
Method Detail

setAppContext

public void setAppContext(AppContext ctx)

add

public int add(Symbol name,
               Expression val)
Add an entry point.

Parameters:
name - the name of the entry point
val - the value of the entry point
Returns:
the index of the new (or existing) entry point

add

public int add(Expression val)
Add a shared data structure

Parameters:
val - the shared data structure
Returns:
the index of the new (or existing) shared data structure

get

public int get(Expression val)

buildLibrary

public Library buildLibrary(java.lang.String name,
                            java.io.OutputStream out)
                     throws java.io.IOException
Throws:
java.io.IOException

visit

public boolean visit(ExpressionVisitee e)
Specified by:
visit in interface ExpressionVisitor