|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.unitesk.atp.text.generation.BasicGenerator
com.unitesk.atp.tree.generation.TextGeneratorServer
public class TextGeneratorServer
Text Generator Server implements TextGenerator functionality.
| Field Summary | |
|---|---|
protected IndentFilter |
indentFilter
Indent manager filter. |
protected LineSplitFilter |
lineSplitFilter
Line splitter. |
protected TextReceiver |
out
Client receiving results of text generation. |
| Fields inherited from class com.unitesk.atp.text.generation.BasicGenerator |
|---|
client, name_to_func, name_to_var, pattern_filter, variable_map |
| Fields inherited from interface com.unitesk.atp.tree.generation.TextGenerator |
|---|
endl |
| Fields inherited from interface com.unitesk.atp.text.generation.Generator |
|---|
DEFAULT_NAME |
| Constructor Summary | |
|---|---|
TextGeneratorServer(TextReceiver client)
Constructs Text Generator Server with the given client and default indent step. |
|
TextGeneratorServer(TextReceiver client,
int indentStep)
Constructs Text Generator Server with the given client and indent step. |
|
| Method Summary | |
|---|---|
void |
decIndent()
Decreases indent level at one indent step. |
int |
getIndent()
Returns the current indent level. |
Node |
getNode()
Returns current node. |
void |
incIndent()
Increases indent level at one indent step. |
void |
list(String index,
int start,
int end,
String str,
String separator)
Prints list of strings. |
void |
nl()
Starts a new line of text. |
void |
popIndent()
Restores previous indent level. |
void |
popNode()
Restore previous node. |
void |
pushIndent(int indent)
Makes indent current indent level. |
void |
pushNode(Node node)
Sets default node for all operations with attributes. |
void |
txtAsIs(String str)
Print string as is, don't treat it as pattern and don't split lines. |
| Methods inherited from class com.unitesk.atp.text.generation.BasicGenerator |
|---|
getFunction, getVariable, mustBeID, param, setFunction, setVariable, txt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.unitesk.atp.text.generation.Generator |
|---|
getFunction, getVariable, setFunction, setVariable, txt |
| Field Detail |
|---|
protected LineSplitFilter lineSplitFilter
protected IndentFilter indentFilter
lineSplitFilter
protected TextReceiver out
indentFilter
| Constructor Detail |
|---|
public TextGeneratorServer(TextReceiver client)
client - The client receiving results of text generation.
public TextGeneratorServer(TextReceiver client,
int indentStep)
client - The client receiving results of text generation.indentStep - Indent step.| Method Detail |
|---|
public void pushNode(Node node)
node for all operations with attributes.
pushNode in interface TextGeneratornode - The new default node.public Node getNode()
getNode in interface TextGeneratorpublic void popNode()
popNode in interface TextGeneratorpublic void pushIndent(int indent)
indent current indent level.
The previous indent level can be restored by TextGenerator.popIndent()
pushIndent in interface TextGeneratorindent - the new indent levelpublic int getIndent()
getIndent in interface TextGeneratorpublic void incIndent()
TextGenerator.popIndent()
incIndent in interface TextGeneratorpublic void decIndent()
TextGenerator.popIndent()
decIndent in interface TextGeneratorpublic void popIndent()
popIndent in interface TextGeneratorTextGenerator.pushIndent(int),
TextGenerator.incIndent(),
TextGenerator.decIndent()
public void list(String index,
int start,
int end,
String str,
String separator)
list in interface TextGeneratorindex - The variable name to store current index of list element.start - The starting value of an indexend - if start < end thenstr - The string to print for each list element using
txt( str )separator - The separator to print between strings
for list elements using
txt( str )public void nl()
nl in interface TextGeneratorpublic void txtAsIs(String str)
txtAsIs in interface GeneratortxtAsIs in class BasicGeneratorstr - The string to pass as is.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||