opale
Class OpaleObject
java.lang.Object
|
+--opale.OpaleObject
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- MarkType, Object2D, ObjectODE, OIJ
- public abstract class OpaleObject
- extends java.lang.Object
- implements java.lang.Cloneable
Many classes of Opale extend this abstract class. It make it possible to read/write in a stream with a user language.
- Since:
- OpaleV1b5
Method Summary |
void |
read(java.io.StreamTokenizer f,
OpaleSession session)
This method read the data in a file at format '.opa' . |
abstract int |
readKeyWord(java.lang.String s,
java.io.StreamTokenizer f,
OpaleSession session)
Abstract method to read a key word in a file '*.ode'. |
abstract void |
write(java.io.PrintWriter f,
OpaleSession session)
Abstrcat method to write the current object in a stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OpaleObject
public OpaleObject()
read
public void read(java.io.StreamTokenizer f,
OpaleSession session)
throws java.io.IOException,
InvalidFormatException
- This method read the data in a file at format '.opa' . It calls the abstract method
readKeyword
implemented in the derivated classes.
- Parameters:
StreamTokenizer
- f, stream to read.OpaleSession
- session, the group of object that are read in the stream.
readKeyWord
public abstract int readKeyWord(java.lang.String s,
java.io.StreamTokenizer f,
OpaleSession session)
throws java.io.IOException,
InvalidFormatException
- Abstract method to read a key word in a file '*.ode'.
- Parameters:
String
- s, key word to read.StreamTokenizer
- f, stream to read.OpaleSession
- session, the group of 'Opale' object- Returns:
- int, 0 if the key word is correct, -1 otherwise.
write
public abstract void write(java.io.PrintWriter f,
OpaleSession session)
throws InvalidFormatException
- Abstrcat method to write the current object in a stream.
- Parameters:
printWriter
- f, a stream.OpaleSession
- session, the set of 'Opale' object.