Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GLatexRenderer Class Reference

This class generates LaTeX-Output from the node data. More...

List of all members.

Public Member Functions

 GLatexRenderer (Document *a_data, int a_drawMode, IdTree *a_dispNodes, const QString &a_outName)
 Creates a LaTeX renderer.

 ~GLatexRenderer (void)
 Destroys this instance.

bool render (void)
 Renders the node data.


Private Member Functions

bool renderGenericNode (GenericNode *a_node, const NodeAddress &a_addrParent)
 Renders a generic node.

bool renderAtomNode (AtomNode *a_node, const NodeAddress &a_addrParent)
 Renders an atom node.

bool renderConjunctionNode (ConjunctionNode *a_node, const NodeAddress &a_addrParent)
 Renders a conjunction node.

bool renderDisjunctionNode (DisjunctionNode *a_node, const NodeAddress &a_addrParent)
 Renders a disjunction node.

bool renderFeatvalNode (FeatvalNode *a_node, const NodeAddress &a_addrParent)
 Renders a featval node.

bool renderFunctionNode (FunctionNode *a_node, const NodeAddress &a_addrParent)
 Renders a function node.

bool renderListNode (ListNode *a_node, const NodeAddress &a_addrParent)
 Renders a list node.

bool renderReentNode (ReentNode *a_node, const NodeAddress &a_addrParent)
 Renders a reent node.

bool renderRefNode (RefNode *a_node, const NodeAddress &a_addrParent)
 Renders a ref node.

bool renderRestNode (RestNode *a_node, const NodeAddress &a_addrParent)
 Renders a rest node.

bool renderSetNode (SetNode *a_node, const NodeAddress &a_addrParent)
 Renders a set node.

bool renderStrucNode (StrucNode *a_node, const NodeAddress &a_addrParent)
 Renders a struc node.

bool renderTailNode (TailNode *a_node, const NodeAddress &a_addrParent)
 Renders a tail node.

bool renderTreeNode (TreeNode *a_node, const NodeAddress &a_addrParent)
 Renders a tree node.

bool renderTypeNode (TypeNode *a_node, const NodeAddress &a_addrParent)
 Renders a type node.

bool writeLatexHeader (void)
 Writes the LaTeX header to the output file.

bool writeLatexFooter (void)
 Writes the necessary LaTeX closing statements to the output file.

bool writeAVMHeader (void)
 Writes the opening statements of an avm environment.

bool writeAVMFooter (void)
 Writes the closing statements of an avm environment.

char * latexifyString (const char *a_inStr)
 Modifies a string such that it prints properly in LaTeX.


Private Attributes

Documentdata
 The data.

IdTreedispNodes
 The displayable node data.

QString outName
 Name of the output file.

FILE * outFile
 Handle to the output file (NULL if no file opened).

int drawMode
 Indicates how the data should be displayed.


Detailed Description

This class generates LaTeX-Output from the node data.

Author:
Holger Wunsch


Constructor & Destructor Documentation

GLatexRenderer::GLatexRenderer Document a_data,
int  a_drawMode,
IdTree a_dispNodes,
const QString &  a_outName
 

Creates a LaTeX renderer.

Parameters:
a_data the data
a_drawMode either DRAW_STRUC, DRAW_TREE, or DRAW_AUTO. If DRAW_AUTO is given, tree output is generated when tree data is available, otherwise the data is rendered as feature structure.
a_dispNodes the displayable node data
a_outName the name of the output file.

GLatexRenderer::~GLatexRenderer void   ) 
 

Destroys this instance.


Member Function Documentation

char * GLatexRenderer::latexifyString const char *  a_inStr  )  [private]
 

Modifies a string such that it prints properly in LaTeX.

In LaTeX, several characters are command characters which must be escaped to make them print properly. These charaters are:

$, , {, }, &, #, _, ^

Parameters:
a_inStr the string to be modified
Returns:
a pointer to a static buffer which contains the modified string.

bool GLatexRenderer::render void   ) 
 

Renders the node data.

Returns:
true if the rendering process was successful, false if an error occurred.

bool GLatexRenderer::renderAtomNode AtomNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders an atom node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderConjunctionNode ConjunctionNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a conjunction node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderDisjunctionNode DisjunctionNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a disjunction node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderFeatvalNode FeatvalNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a featval node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderFunctionNode FunctionNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a function node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderGenericNode GenericNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a generic node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderListNode ListNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a list node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderReentNode ReentNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a reent node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderRefNode RefNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a ref node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderRestNode RestNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a rest node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderSetNode SetNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a set node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderStrucNode StrucNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a struc node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderTailNode TailNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a tail node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderTreeNode TreeNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a tree node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::renderTypeNode TypeNode a_node,
const NodeAddress a_addrParent
[private]
 

Renders a type node.

Parameters:
a_node the node.
a_addrParent the node address of the parent node.
Returns:
true if the node was written, false if not, for example because the node is hidden.

bool GLatexRenderer::writeAVMFooter void   )  [private]
 

Writes the closing statements of an avm environment.

Returns:
true if the statement was written sucessfully, false otherwise.

bool GLatexRenderer::writeAVMHeader void   )  [private]
 

Writes the opening statements of an avm environment.

Returns:
true if the statement was written sucessfully, false otherwise.

bool GLatexRenderer::writeLatexFooter void   )  [private]
 

Writes the necessary LaTeX closing statements to the output file.

Returns:
true if the header was written successfully, false otherwise.

bool GLatexRenderer::writeLatexHeader void   )  [private]
 

Writes the LaTeX header to the output file.

Returns:
true if the header was written successfully, false otherwise.


Member Data Documentation

Document* GLatexRenderer::data [private]
 

The data.

IdTree* GLatexRenderer::dispNodes [private]
 

The displayable node data.

int GLatexRenderer::drawMode [private]
 

Indicates how the data should be displayed.

The value must be one of the DRAW_xxx constants.

FILE* GLatexRenderer::outFile [private]
 

Handle to the output file (NULL if no file opened).

QString GLatexRenderer::outName [private]
 

Name of the output file.


Generated on Sun Apr 27 18:26:58 2003 for Grisu by doxygen1.3