XPRMInitializeContext
- java.lang.Object
-
- com.dashoptimization.XPRMInitializeContext
-
public abstract class XPRMInitializeContext extends java.lang.ObjectContext used during an 'initializations from' block
-
-
Field Summary
Modifier and Type Field and Description static intCONTROL_CLOSELSTCode for ending a list of values in the initialization stream.static intCONTROL_CLOSENDXCode for ending a list of indices in the initialization stream.static intCONTROL_FLUSHCode to force a flush of the token queue.static intCONTROL_OPENLSTCode for starting a list of values in the initialization stream.static intCONTROL_OPENNDXCode for starting a list of indices in the initialization stream.static intCONTROL_SKIPCode for skipping a position in the initialization stream.
-
Constructor Summary
Constructor and Description XPRMInitializeContext()
-
Method Summary
Modifier and Type Method and Description voidsend(boolean b)Send a Boolean value to the initialization stream.voidsend(boolean b, boolean flush)Send a Boolean value to the initialization stream.voidsend(double r)Send a real value to the initialization stream.abstract voidsend(double r, boolean flush)Send a real value to the initialization stream.voidsend(int i)Send an integer value to the initialization stream.abstract voidsend(int i, boolean flush)Send an integer value to the initialization stream.voidsend(java.lang.String s)Send a text value to the initialization stream.abstract voidsend(java.lang.String s, boolean flush)Send a text value to the initialization stream.voidsendControl(int c)Send a control character to the initialization stream.abstract voidsendControl(int c, boolean flush)Send a control character to the initialization stream.
-
-
-
Field Detail
-
CONTROL_FLUSH
public static final int CONTROL_FLUSH
Code to force a flush of the token queue. When this control character is used, no new token is sent to the initialization stream but the queue of tokens is processed.- See Also:
-
sendControl(int, boolean), Constant Field Values
-
CONTROL_SKIP
public static final int CONTROL_SKIP
Code for skipping a position in the initialization stream. This control character may be used in place of an expected data token in order to skip the token. This corresponds to using*in a text initialization file.- See Also:
-
sendControl(int, boolean), Constant Field Values
-
CONTROL_OPENLST
public static final int CONTROL_OPENLST
Code for starting a list of values in the initialization stream. This control character indicates that a list of tokens is about to be sent. This corresponds to using[in a text initialization file.- See Also:
-
sendControl(int, boolean), Constant Field Values
-
CONTROL_CLOSELST
public static final int CONTROL_CLOSELST
Code for ending a list of values in the initialization stream. This control character closes a list of token previously started with the control characterCONTROL_OPENLST. This corresponds to using]in a text initialization file.- See Also:
-
sendControl(int, boolean), Constant Field Values
-
CONTROL_OPENNDX
public static final int CONTROL_OPENNDX
Code for starting a list of indices in the initialization stream. This control character indicates that a list of indices is about to be sent. This corresponds to using(in a text initialization file.- See Also:
-
sendControl(int, boolean), Constant Field Values
-
CONTROL_CLOSENDX
public static final int CONTROL_CLOSENDX
Code for ending a list of indices in the initialization stream. This control character closes a list of inidices previously started with the control characterCONTROL_OPENNDX. This corresponds to using)in a text initialization file.- See Also:
-
sendControl(int, boolean), Constant Field Values
-
-
Method Detail
-
send
public abstract void send(int i, boolean flush) throws java.io.IOExceptionSend an integer value to the initialization stream.- Parameters:
-
i- the integer data to be sent -
flush- iftrue, the queue of pending tokens is flushed otherwise, flush occurs only when the queue is full - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token.
-
send
public void send(int i) throws java.io.IOExceptionSend an integer value to the initialization stream.- Parameters:
-
i- the integer data to be sent - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token. - See Also:
-
send(i,false)
-
send
public abstract void send(double r, boolean flush) throws java.io.IOExceptionSend a real value to the initialization stream.- Parameters:
-
r- the double data to be sent -
flush- iftrue, the queue of pending tokens is flushed otherwise, flush occurs only when the queue is full - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token.
-
send
public void send(double r) throws java.io.IOExceptionSend a real value to the initialization stream.- Parameters:
-
r- the double data to be sent - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token. - See Also:
-
send(r,false)
-
send
public abstract void send(java.lang.String s, boolean flush) throws java.io.IOExceptionSend a text value to the initialization stream.- Parameters:
-
s- the string data to be sent -
flush- iftrue, the queue of pending tokens is flushed otherwise, flush occurs only when the queue is full - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token.
-
send
public void send(java.lang.String s) throws java.io.IOExceptionSend a text value to the initialization stream.- Parameters:
-
s- the string data to be sent - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token. - See Also:
-
send(s,false)
-
send
public void send(boolean b, boolean flush) throws java.io.IOExceptionSend a Boolean value to the initialization stream.- Parameters:
-
b- the Boolean data to be sent -
flush- iftrue, the queue of pending tokens is flushed otherwise, flush occurs only when the queue is full - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token.
-
send
public void send(boolean b) throws java.io.IOExceptionSend a Boolean value to the initialization stream.- Parameters:
-
b- the Boolean data to be sent - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token. - See Also:
-
send(b,false)
-
sendControl
public abstract void sendControl(int c, boolean flush) throws java.io.IOExceptionSend a control character to the initialization stream.- Parameters:
-
c- the control to be sent -
flush- iftrue, the queue of pending tokens is flushed otherwise, flush occurs only when the queue is full - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token. - See Also:
-
CONTROL_SKIP,CONTROL_OPENLST,CONTROL_CLOSELST,CONTROL_OPENNDX,CONTROL_CLOSENDX
-
sendControl
public void sendControl(int c) throws java.io.IOExceptionSend a control character to the initialization stream.- Parameters:
-
c- the control to be sent - Throws:
-
java.io.IOException- If the flush fails due to an unexpected token. - See Also:
-
sendControl(c,false),CONTROL_SKIP,CONTROL_OPENLST,CONTROL_CLOSELST,CONTROL_OPENNDX,CONTROL_CLOSENDX
-
-
