Package mdp :: Package hinet :: Module htmlvisitor :: Class HiNetHTMLVisitor
[hide private]
[frames] | no frames]

Class HiNetHTMLVisitor


Class to convert a hinet flow to HTML.

This class implements the visitor pattern. It relies on the 'html'
extension to get custom representations for normal node classes.

Instance Methods [hide private]
 
__init__(self, html_file, show_size=False)
Initialize the HMTL converter.
 
_close_node_env(self, node, type_id='node')
Close the HTML environment for the node internals.
 
_open_node_env(self, node, type_id='node')
Open the HTML environment for the node internals.
 
_visit_clonelayer(self, layer)
 
_visit_flownode(self, flownode)
 
_visit_layer(self, layer)
 
_visit_node(self, node)
Translate a node and return the translation.
 
_visit_sameinputlayer(self, layer)
 
_visit_standard_node(self, node)
 
_write_node_header(self, node, type_id='node')
Write the header content for the node into the HTML file.
 
convert_flow(self, flow)
Convert the flow into HTML and write it into the internal file.

Inherited from unreachable.newobject: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
hinet_css(cls)
Return the standard CSS string.
Class Variables [hide private]
  _CSS_FILENAME = 'hinet.css'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, html_file, show_size=False)
(Constructor)

 
Initialize the HMTL converter.

html_file -- File object into which the representation is written
    (only the write method is used).
show_size -- Show the approximate memory footprint of all nodes.

Overrides: object.__init__

_close_node_env(self, node, type_id='node')

 
Close the HTML environment for the node internals.

node -- The node itself.
type_id -- The id string as used in the CSS.

_open_node_env(self, node, type_id='node')

 
Open the HTML environment for the node internals.

node -- The node itself.
type_id -- The id string as used in the CSS.

_visit_clonelayer(self, layer)

 

_visit_flownode(self, flownode)

 

_visit_layer(self, layer)

 

_visit_node(self, node)

 
Translate a node and return the translation.

Depending on the type of the node this can be delegated to more
specific methods.

_visit_sameinputlayer(self, layer)

 

_visit_standard_node(self, node)

 

_write_node_header(self, node, type_id='node')

 
Write the header content for the node into the HTML file.

convert_flow(self, flow)

 
Convert the flow into HTML and write it into the internal file.

hinet_css(cls)
Class Method

 
Return the standard CSS string.

The CSS should be embedded in the final HTML file.


Class Variable Details [hide private]

_CSS_FILENAME

Value:
'hinet.css'