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

strmod::strmod::GraphVizVisitor Class Reference

Generates output suitable for AT&T's Open Source GraphViz program, found at http://www.research.att.com/sw/tools/graphviz/. More...

#include <StrMod/GraphVizVisitor.h>

Inheritance diagram for strmod::strmod::GraphVizVisitor:

Inheritance graph
[legend]
List of all members.

Public Methods

 GraphVizVisitor ()
 Constructor, doesn't do much.

virtual ~GraphVizVisitor ()
 Destructor, also doesn't do much.

virtual int AreYouA (const lcore::ClassIdent &cid) const
 Asks if a class is of a particular type, or publicly derived from that type.

const StrChunkPtr visit (const StrChunkPtr &root, std::ostream &out)
 Visits the chunk DAG printing out a GraphViz parsable graph description, returning a StrChunk containing the data for the chunk DAG.


Static Public Attributes

const STR_ClassIdent identifier
 Globally unique identifier for this class.


Protected Methods

virtual const lcore::ClassIdent * i_GetIdent () const
 Returns the class identifier for the class the object actually is.

virtual void use_visitStrChunk (const StrChunkPtr &chunk, const LinearExtent &used) throw (halt_visitation)
 This is the Template Method function to visit a StrChunk. Called by the UseTracking machinery.

virtual void use_visitDataBlock (const void *start, size_t len, const void *realstart, size_t reallen) throw (halt_visitation)
 This is the Template Method function to visit an actual chunk of data. Called by the UseTracking machinery.

void printData (const void *data, size_t len)

Detailed Description

Generates output suitable for AT&T's Open Source GraphViz program, found at http://www.research.att.com/sw/tools/graphviz/.

Definition at line 43 of file GraphVizVisitor.h.


Member Function Documentation

virtual int strmod::strmod::GraphVizVisitor::AreYouA const lcore::ClassIdent &    cid const [inline, virtual]
 

Asks if a class is of a particular type, or publicly derived from that type.

Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.

Parameters:
cid Usually <class>::identifier for the class you want to ask if the object is an instance of.

Reimplemented from strmod::strmod::UseTrackingVisitor.

Definition at line 53 of file GraphVizVisitor.h.

virtual const lcore::ClassIdent* strmod::strmod::GraphVizVisitor::i_GetIdent   const [inline, protected, virtual]
 

Returns the class identifier for the class the object actually is.

Should always be overridden in any class that has a static identifier member.

Reimplemented from strmod::strmod::UseTrackingVisitor.

Definition at line 64 of file GraphVizVisitor.h.

void strmod::strmod::GraphVizVisitor::printData const void *    data,
size_t    len
[protected]
 

Prints out a chunk of data that may contain non-printable characters. It prints out the octal escape sequence for a non-printable character, or a '"' character. It captures '"' characters because those are used to delimit strings in GraphViz.

Definition at line 131 of file GraphVizVisitor.cxx.

void strmod::strmod::GraphVizVisitor::use_visitDataBlock const void *    start,
size_t    len,
const void *    realstart,
size_t    reallen
throw (halt_visitation) [protected, virtual]
 

This is the Template Method function to visit an actual chunk of data. Called by the UseTracking machinery.

Parameters:
start Start of the portion of the data area that's used.
len Length of the used part of the data area.
realstart Start of the actual data area, including the unused portions.
reallen Length of the actual data area, including the unsused portions.

Implements strmod::strmod::UseTrackingVisitor.

Definition at line 107 of file GraphVizVisitor.cxx.

void strmod::strmod::GraphVizVisitor::use_visitStrChunk const StrChunkPtr   chunk,
const LinearExtent   used
throw (halt_visitation) [protected, virtual]
 

This is the Template Method function to visit a StrChunk. Called by the UseTracking machinery.

Parameters:
chunk The chunk being visited.
extent Which extent of the chunk is used.

Implements strmod::strmod::UseTrackingVisitor.

Definition at line 90 of file GraphVizVisitor.cxx.

const StrChunkPtr strmod::strmod::GraphVizVisitor::visit const StrChunkPtr   root,
std::ostream &    out
 

Visits the chunk DAG printing out a GraphViz parsable graph description, returning a StrChunk containing the data for the chunk DAG.

Parameters:
root The root of the StrChunk DAG to be printed.
out The ostream to print the GraphViz parseable tree on.
Returns:
A pointer to a StrChunk containing the data in the DAG flattened into a single buffer.

Definition at line 49 of file GraphVizVisitor.cxx.


Member Data Documentation

const STR_ClassIdent strmod::strmod::GraphVizVisitor::identifier [static]
 

Globally unique identifier for this class.

Every class that might need to be identified should have a public static const identifier object in it.

Reimplemented from strmod::strmod::UseTrackingVisitor.


The documentation for this class was generated from the following files:
Generated on Wed Jan 29 00:32:53 2003 for libNet by doxygen1.3-rc1