Module gml :: Class gml_node
[show private | hide private]
[frames | no frames]

Class gml_node


Nodes contain a number of attributes that describe the size, shape, color, label etc. of the displayable blocks. Relevant getters and setters exist for manipulating node attributes. The render() routine should be used for returning a node description suitable for inclusion in a GML file.
Method Summary
  __init__(self)
Set the default attributes for the newly created node.
  __module_test__(self)
Run a few basic tests to ensure the class is working.
DWORD get_block(self)
Get the block address for the node.
DWORD get_function(self)
Get the address of the function the node belongs to.
HTML RGB string (ex: #CCFFCC) get_g_fill(self)
Get the fill color of the node from the graphics sub-header.
Float get_g_height(self)
Get the height of the node from the graphics sub-header.
HTML RGB string (ex: #CCFFCC) get_g_line_fill(self)
Get the fill color of this line from the graphics sub-header.
Float get_g_line_width(self)
Get the width of the border line for the node from the graphics sub-header.
String get_g_pattern(self)
Get the pattern type for the node from the graphics sub-header.
Integer get_g_stipple(self)
Get the stipple value for the node from the graphics sub-header.
String get_g_type(self)
Get the shape for the node from the graphics sub-header.
Float get_g_width(self)
Get the width of the node from the graphics sub-header.
Integer get_g_width_shape(self)
Get the shape width value for the node from the graphics sub-header.
Integer get_id(self)
Get the identifier for the node.
String get_label(self)
Get the label (disassembly) of the node.
String get_label_stripped(self)
Get the label (disassembly) of the node with all HTML entities stripped.
String get_name(self)
Get the name (if any) of the node.
Tuple get_register(self, register)
Get the values associated with the specified register for this node.
String get_template(self)
Get the template for the node.
Integer get_uid(self)
Get the unique identifier for the node.
String render(self)
Render a node description suitable for use in a GML file using the set internal attributes.
  set_block(self, address)
Set the block address for the node.
  set_function(self, address)
Set the address of the function the node belongs to.
  set_g_fill(self, color)
Set the fill color of the node in the graphics sub-header.
  set_g_height(self, pixels)
Set the height of the node in the graphics sub-header.
  set_g_line_fill(self, color)
Set the fill color of this line in the graphics sub-header.
  set_g_line_width(self, pixels)
Set the width of the border line for the node in the graphics sub-header.
  set_g_pattern(self, pattern)
Set the pattern type for the node in the graphics sub-header.
  set_g_stipple(self, stipple)
Set the stipple value for the node in the graphics sub-header.
  set_g_type(self, type)
Set the shape for the node in the graphics sub-header.
  set_g_width(self, pixels)
Set the width of the node in the graphics sub-header.
  set_g_width_shape(self, pixels)
Set the shape width value for the node in the graphics sub-header.
  set_id(self, id)
Set the identifier for the node.
  set_label(self, data)
Set the label (disassembly) of the node.
  set_name(self, name)
Set the name of the node.
  set_register(self, register, value, single_location, single_data, double_location, double_data)
Set a register value for this node.
  set_template(self, template)
Set the template for the node.
  set_uid(self, uid)
Set the unique identifier for the node.

Method Details

__init__(self)
(Constructor)

Set the default attributes for the newly created node. See the source if you want to modify the default creation values.

__module_test__(self)

Run a few basic tests to ensure the class is working.

get_block(self)

Get the block address for the node.
Returns:
Block address
           (type=DWORD)

get_function(self)

Get the address of the function the node belongs to.
Returns:
Function address
           (type=DWORD)

get_g_fill(self)

Get the fill color of the node from the graphics sub-header.
Returns:
Color
           (type=HTML RGB string (ex: #CCFFCC))

get_g_height(self)

Get the height of the node from the graphics sub-header.
Returns:
Node height in pixels
           (type=Float)

get_g_line_fill(self)

Get the fill color of this line from the graphics sub-header.
Returns:
Color
           (type=HTML RGB string (ex: #CCFFCC))

get_g_line_width(self)

Get the width of the border line for the node from the graphics sub-header.
Returns:
Line width in pixels
           (type=Float)

get_g_pattern(self)

Get the pattern type for the node from the graphics sub-header.
Returns:
Pattern type
           (type=String)

get_g_stipple(self)

Get the stipple value for the node from the graphics sub-header.
Returns:
Stipple value
           (type=Integer)

get_g_type(self)

Get the shape for the node from the graphics sub-header. For the purposes of Process Stalker this value will be "rectangle".
Returns:
Shape type
           (type=String)

get_g_width(self)

Get the width of the node from the graphics sub-header.
Returns:
Node width in pixels
           (type=Float)

get_g_width_shape(self)

Get the shape width value for the node from the graphics sub-header. I'm actually unsure as to what exactly this attribute affects. For the purposes of Process Stalker this value will always be 1.
Returns:
Shape width
           (type=Integer)

get_id(self)

Get the identifier for the node. This identifier can *not* be assumed to be unique. See get_uid().
Returns:
Identifier
           (type=Integer)

get_label(self)

Get the label (disassembly) of the node.
Returns:
Node label (disassembly)
           (type=String)

get_label_stripped(self)

Get the label (disassembly) of the node with all HTML entities stripped.
Returns:
Node label (disassembly) stripped
           (type=String)

To Do: There may be some Python routines that can do some of this work for us.

get_name(self)

Get the name (if any) of the node.
Returns:
Node name
           (type=String)

get_register(self, register)

Get the values associated with the specified register for this node. Values are returned in the following list:
   (value, single_location, single_data, double_location, double_data)
Parameters:
register - One of EAX, EBX, ECX, EDX, ESI, EDI, EBP
           (type=String)
Returns:
Data for specified register or 'False' on error.
           (type=Tuple)

get_template(self)

Get the template for the node. For the purposes of Process Stalker this value will always be "oreas:std:rect".
Returns:
Template
           (type=String)

get_uid(self)

Get the unique identifier for the node. The ID member variable stores the original value from the GML file. The purpose of the UID is to uniquely identify the node among a list of loaded nodes that may potentially have overlapping IDs. The parser class will automatically assign an incremented value.
Returns:
Unique identifier
           (type=Integer)

render(self)

Render a node description suitable for use in a GML file using the set internal attributes.
Returns:
GML node description
           (type=String)

set_block(self, address)

Set the block address for the node.
Parameters:
address - Block address
           (type=DWORD)

set_function(self, address)

Set the address of the function the node belongs to.
Parameters:
address - Function address
           (type=DWORD)

set_g_fill(self, color)

Set the fill color of the node in the graphics sub-header.
Parameters:
color - Color
           (type=HTML RGB string (ex: #CCFFCC))

set_g_height(self, pixels)

Set the height of the node in the graphics sub-header.
Parameters:
pixels - Node height in pixels
           (type=Float)

set_g_line_fill(self, color)

Set the fill color of this line in the graphics sub-header.
Parameters:
color - Color
           (type=HTML RGB string (ex: #CCFFCC))

set_g_line_width(self, pixels)

Set the width of the border line for the node in the graphics sub-header.
Parameters:
pixels - Line width in pixels
           (type=Float)

set_g_pattern(self, pattern)

Set the pattern type for the node in the graphics sub-header.
Parameters:
pattern - Pattern type
           (type=String)

set_g_stipple(self, stipple)

Set the stipple value for the node in the graphics sub-header.
Parameters:
stipple - Stipple value
           (type=Integer)

set_g_type(self, type)

Set the shape for the node in the graphics sub-header. For the purposes of Process Stalker this value will be "rectangle".
Parameters:
type - Shape type
           (type=String)

set_g_width(self, pixels)

Set the width of the node in the graphics sub-header.
Parameters:
pixels - Node width in pixels
           (type=Float)

set_g_width_shape(self, pixels)

Set the shape width value for the node in the graphics sub-header. I'm actually unsure as to what exactly this attribute affects. For the purposes of Process Stalker this value will always be 1.
Parameters:
pixels - Shape width
           (type=Float)

set_id(self, id)

Set the identifier for the node. This identifier can *not* be assumed to be unique. See set_uid().
Parameters:
id - Identifier
           (type=Integer)

set_label(self, data)

Set the label (disassembly) of the node.
Parameters:
data - Node label (disassembly)
           (type=String)

set_name(self, name)

Set the name of the node.
Parameters:
name - Node name
           (type=String)

set_register(self, register, value, single_location='', single_data='', double_location='', double_data='')

Set a register value for this node.
Parameters:
register - One of EAX, EBX, ECX, EDX, ESI, EDI, EBP
           (type=String)
value - 32-bit register value
           (type=DWORD)
single_location - Optional string specifying the location ("HEAP" or "STACK") *register "points" to.
           (type=String)
single_data - Optional string containing the data stored at *register.
           (type=String)
double_location - Optional string specifying the location ("HEAP" or "STACK") **register "points" to.
           (type=String)
double_data - Optional string containing the data stored at **register.
           (type=String)

set_template(self, template)

Set the template for the node. For the purposes of Process Stalker this value will always be "oreas:std:rect".
Parameters:
template - Template
           (type=String)

set_uid(self, uid)

Set the unique identifier for the node. The ID member variable stores the original value from the GML file. The purpose of the UID is to uniquely identify the node among a list of loaded nodes that may potentially have overlapping IDs. The parser class will automatically assign an incremented value.
Parameters:
uid - Unique identifier
           (type=Integer)

Generated by Epydoc 2.1 on Tue Jul 05 12:05:31 2005 http://epydoc.sf.net