GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Member Functions | Protected Attributes | List of all members
GenericGraphModelItem< NodeType, EdgeType > Class Template Reference

#include <graph_model_item.h>

Inheritance diagram for GenericGraphModelItem< NodeType, EdgeType >:
Inheritance graph
[legend]
Collaboration diagram for GenericGraphModelItem< NodeType, EdgeType >:
Collaboration graph
[legend]

Public Member Functions

 GenericGraphModelItem (NodeType *node, std::vector< EdgeType * > *edges, std::vector< EdgeType * > *incoming_edges, GraphModelItem *parent=0, EdgeType *parent_edge=0)
 
NodeType * node ()
 Return the underlying node.
 
std::vector< EdgeType * > * edges ()
 Return the list of edge datas belonging to this node.
 
std::vector< EdgeType * > * incoming_edges ()
 Return the list of edge datas belonging to this node.
 
bool self_referential () const
 Whether this is a node that is a child of itself.
 
virtual QVariant data (int column) const
 
- Public Member Functions inherited from GraphModelItem
 GraphModelItem (GraphModelItem *parent=0)
 If this is not in a tree, you can leave the parent as 0.
 
void appendChild (GraphModelItem *child)
 Append a child to this node.
 
GraphModelItemchild (int row)
 Returns a specific child (the one identified by row number row) of this node.
 
GraphModelItemparent ()
 Returns the parent of this node.
 
int childCount () const
 Return the number of child columns in this node.
 
int columnCount () const
 Return the number of columns in this node (see the num above.
 
int row () const
 Return the row number this node has.
 
void set_xy (int x, int y)
 Set the x,y coordinate properties for this node.
 
void set_circular (bool circular)
 
bool circular () const
 
void set_num_of_modules (uint)
 Set the number of modules for this item.
 
void set_degree (uint)
 Set the degree of this item.
 
void set_num_of_files (uint)
 Set the number of files for this item.
 
void set_opacity (int opacity)
 
void set_color (QColor color)
 
void set_edge_opacity (int opacity)
 
void set_edge_color (QColor color)
 
void set_mem_type (std::string type)
 

Protected Attributes

NodeType * node_
 Information about underlying graph.
 
EdgeType * parent_edge_
 The edge that was used to reach this node in the tree.
 
std::vector< EdgeType * > * edges_
 List of all outgoing edges (non-hierarchical data)
 
std::vector< EdgeType * > * incoming_edges_
 List of all incoming edges (non-hierarchical data)
 
- Protected Attributes inherited from GraphModelItem
GraphModelItemparent_item_
 

Additional Inherited Members

- Public Types inherited from GraphModelItem
enum  column_index {
  NAME, DEPENDENCIES, DEPENDENTS, MODULES,
  FILES, DEGREE, CIRCULAR, SELF_REF,
  XPOS, YPOS, ABSOLUTE, IN_RUN_BLOCK,
  MEM_TYPE, COLOR, OPACITY, EDGE_COLOR,
  EDGE_OPACITY, NUM_COLS
}
 

Detailed Description

template<typename NodeType, typename EdgeType>
class GenericGraphModelItem< NodeType, EdgeType >

Generic parent class for functions implemented by subclasses. I made this separate from GraphModelItem because I was unsure about how the generic type of class would work when using the base class in other parts of the code. Perhaps they can be merged at a later point in refactoring.

Constructor & Destructor Documentation

template<typename NodeType, typename EdgeType>
GenericGraphModelItem< NodeType, EdgeType >::GenericGraphModelItem ( NodeType *  node,
std::vector< EdgeType * > *  edges,
std::vector< EdgeType * > *  incoming_edges,
GraphModelItem parent = 0,
EdgeType *  parent_edge = 0 
)
inline

Constructor for the Generic version. It stores a list of all outgoing edges as well as information about the incoming edge

Parameters
edgesA list of outgoing edges from this node.
parent_edgeis here the incoming edge from which this item was reached via its parent.

Member Function Documentation

template<typename NodeType, typename EdgeType>
virtual QVariant GenericGraphModelItem< NodeType, EdgeType >::data ( int  column) const
inlinevirtual

This reimplements the data method to pick out the data provided by this layer. In this case the only data we can provide is whether it is self

Reimplemented from GraphModelItem.

Reimplemented in SWUGraphModelItem, and ModuleGraphModelItem.


The documentation for this class was generated from the following file: