Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

TEXGraphOutputStrategy Class Template Reference

This strategy writes the nodes in TEX format. More...

#include <nodeprint.h>

Inheritance diagram for TEXGraphOutputStrategy:

Inheritance graph
[legend]
Collaboration diagram for TEXGraphOutputStrategy:

Collaboration graph
[legend]
List of all members.

Public Methods

 TEXGraphOutputStrategy (std::ostream *out=&std::cout, double scale=1, double border=5)
virtual TEXGraphOutputStrategy<
_TContent > * 
construct () const
virtual TEXGraphOutputStrategy<
_TContent > * 
clone () const
virtual ~TEXGraphOutputStrategy ()
virtual void writeHeader ()
 Write the TEX header.

virtual void writeFooter ()
 Write the TEX footer.

virtual void writeNormalNode (const NormalNode< _TContent > *node)
 Write the normalNode content.

virtual void writeRootNode (const RootNode< _TContent > *node)
 Write the RootNode content.

virtual void setScale (double scale)
virtual void setPositionMap (std::map< const Node< _TContent > *, Position > pMap)

Protected Methods

virtual void writeEdge (const Node< _TContent > *node)
 Write the edge to the parent.

virtual std::string formatName (std::string name)
 Takes the word in quotation marks as name if existing.

virtual int getMapIndex (const Node< _TContent > *node)
 Returns the index of the node in the position map.


Protected Attributes

std::map< const Node< _TContent > *,
Position
m_pMap
double m_width
double m_height
double m_scale
double m_border

Detailed Description

template<class _TContent>
class treecomp::TEXGraphOutputStrategy< _TContent >

This strategy writes the nodes in TEX format.

It uses a position-map that is created by 'LayoutVisitor' and set with the method 'setMap()'.

Definition at line 97 of file nodeprint.h.


Constructor & Destructor Documentation

TEXGraphOutputStrategy std::ostream *    out = &std::cout,
double    scale = 1,
double    border = 5
[inline, explicit]
 

virtual ~TEXGraphOutputStrategy   [inline, virtual]
 

Definition at line 104 of file nodeprint.h.


Member Function Documentation

virtual TEXGraphOutputStrategy<_TContent>* clone   const [inline, virtual]
 

Reimplemented from StreamOutputStrategy.

Definition at line 103 of file nodeprint.h.

virtual TEXGraphOutputStrategy<_TContent>* construct   const [inline, virtual]
 

Definition at line 102 of file nodeprint.h.

std::string formatName std::string    name [protected, virtual]
 

Takes the word in quotation marks as name if existing.

Definition at line 348 of file nodeprint.h.

Referenced by TEXGraphOutputStrategy::writeFooter(), TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

int getMapIndex const Node< _TContent > *    node [protected, virtual]
 

Returns the index of the node in the position map.

Definition at line 363 of file nodeprint.h.

References TEXGraphOutputStrategy::m_pMap.

Referenced by TEXGraphOutputStrategy::writeEdge(), TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

virtual void setPositionMap std::map< const Node< _TContent > *, Position   pMap [inline, virtual]
 

Definition at line 112 of file nodeprint.h.

References TEXGraphOutputStrategy::m_pMap.

virtual void setScale double    scale [inline, virtual]
 

Definition at line 111 of file nodeprint.h.

void writeEdge const Node< _TContent > *    node [protected, virtual]
 

Write the edge to the parent.

Definition at line 326 of file nodeprint.h.

References TEXGraphOutputStrategy::getMapIndex(), Node::getParent(), Node::isFixed(), and StreamOut::m_out.

Referenced by TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

void writeFooter   [virtual]
 

Write the TEX footer.

Implements StreamOutputStrategy.

Definition at line 259 of file nodeprint.h.

References TEXGraphOutputStrategy::formatName(), Node::getName(), Node::getParent(), StreamOut::m_out, and TEXGraphOutputStrategy::m_pMap.

void writeHeader   [virtual]
 

Write the TEX header.

Implements StreamOutputStrategy.

Definition at line 230 of file nodeprint.h.

References TEXGraphOutputStrategy::m_border, TEXGraphOutputStrategy::m_height, StreamOut::m_out, TEXGraphOutputStrategy::m_pMap, TEXGraphOutputStrategy::m_scale, and TEXGraphOutputStrategy::m_width.

void writeNormalNode const NormalNode< _TContent > *    node [virtual]
 

Write the normalNode content.

Implements StreamOutputStrategy.

Definition at line 284 of file nodeprint.h.

References TEXGraphOutputStrategy::formatName(), TEXGraphOutputStrategy::getMapIndex(), Node::getName(), TEXGraphOutputStrategy::m_border, TEXGraphOutputStrategy::m_height, StreamOut::m_out, TEXGraphOutputStrategy::m_pMap, TEXGraphOutputStrategy::m_scale, and TEXGraphOutputStrategy::writeEdge().

void writeRootNode const RootNode< _TContent > *    node [virtual]
 

Write the RootNode content.

Implements StreamOutputStrategy.

Definition at line 305 of file nodeprint.h.

References TEXGraphOutputStrategy::formatName(), TEXGraphOutputStrategy::getMapIndex(), Node::getName(), TEXGraphOutputStrategy::m_border, TEXGraphOutputStrategy::m_height, StreamOut::m_out, TEXGraphOutputStrategy::m_pMap, TEXGraphOutputStrategy::m_scale, and TEXGraphOutputStrategy::writeEdge().


Member Data Documentation

double m_border [protected]
 

Definition at line 122 of file nodeprint.h.

Referenced by TEXGraphOutputStrategy::writeHeader(), TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

double m_height [protected]
 

Definition at line 120 of file nodeprint.h.

Referenced by TEXGraphOutputStrategy::writeHeader(), TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

std::map<const Node<_TContent>*, Position> m_pMap [protected]
 

Definition at line 118 of file nodeprint.h.

Referenced by TEXGraphOutputStrategy::getMapIndex(), TEXGraphOutputStrategy::setPositionMap(), TEXGraphOutputStrategy::writeFooter(), TEXGraphOutputStrategy::writeHeader(), TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

double m_scale [protected]
 

Definition at line 121 of file nodeprint.h.

Referenced by TEXGraphOutputStrategy::writeHeader(), TEXGraphOutputStrategy::writeNormalNode(), and TEXGraphOutputStrategy::writeRootNode().

double m_width [protected]
 

Definition at line 119 of file nodeprint.h.

Referenced by TEXGraphOutputStrategy::writeHeader().


The documentation for this class was generated from the following file:
Generated on Mon Jan 6 12:02:31 2003 for TreeComp by doxygen1.2.17