VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkSQLGraphReader Class Reference

read a vtkGraph from a database More...

#include <vtkSQLGraphReader.h>

Inheritance diagram for vtkSQLGraphReader:
Inheritance graph
[legend]
Collaboration diagram for vtkSQLGraphReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkGraphAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkSQLGraphReaderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetDirected (bool)
virtual bool GetDirected ()
virtual void DirectedOn ()
virtual void DirectedOff ()
virtual void SetVertexQuery (vtkSQLQuery *q)
virtual vtkSQLQueryGetVertexQuery ()
virtual void SetEdgeQuery (vtkSQLQuery *q)
virtual vtkSQLQueryGetEdgeQuery ()
virtual void SetSourceField (const char *)
virtual char * GetSourceField ()
virtual void SetTargetField (const char *)
virtual char * GetTargetField ()
virtual void SetVertexIdField (const char *)
virtual char * GetVertexIdField ()
virtual void SetXField (const char *)
virtual char * GetXField ()
virtual void SetYField (const char *)
virtual char * GetYField ()
virtual void SetZField (const char *)
virtual char * GetZField ()
virtual void SetCollapseEdges (bool)
virtual bool GetCollapseEdges ()
virtual void CollapseEdgesOn ()
virtual void CollapseEdgesOff ()

Static Public Member Functions

static vtkSQLGraphReaderNew ()
static int IsTypeOf (const char *type)
static vtkSQLGraphReaderSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkSQLGraphReader ()
 ~vtkSQLGraphReader ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestDataObject (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

bool Directed
bool CollapseEdges
vtkSQLQueryEdgeQuery
vtkSQLQueryVertexQuery
char * SourceField
char * TargetField
char * VertexIdField
char * XField
char * YField
char * ZField

Detailed Description

read a vtkGraph from a database

Creates a vtkGraph using one or two vtkSQLQuery's. The first (required) query must have one row for each arc in the graph. The query must have two columns which represent the source and target node ids.

The second (optional) query has one row for each node in the graph. The table must have a field whose values match those in the arc table. If the node table is not given, a node will be created for each unique source or target identifier in the arc table.

The source, target, and node ID fields must be of the same type, and must be either vtkStringArray or a subclass of vtkDataArray.

All columns in the queries, including the source, target, and node index fields, are copied into the arc data and node data of the resulting vtkGraph. If the node query is not given, the node data will contain a single "id" column with the same type as the source/target id arrays.

If parallel arcs are collected, not all the arc data is not copied into the output. Only the source and target id arrays will be transferred. An additional vtkIdTypeArray column called "weight" is created which contains the number of times each arc appeared in the input.

If the node query contains positional data, the user may specify the names of these fields. These arrays must be data arrays. The z-coordinate array is optional, and if not given the z-coordinates are set to zero.

Tests:
vtkSQLGraphReader (Tests)

Definition at line 66 of file vtkSQLGraphReader.h.


Member Typedef Documentation

Reimplemented from vtkGraphAlgorithm.

Definition at line 70 of file vtkSQLGraphReader.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkGraphAlgorithm.

static int vtkSQLGraphReader::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkGraphAlgorithm.

virtual int vtkSQLGraphReader::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

virtual vtkObjectBase* vtkSQLGraphReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

void vtkSQLGraphReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkGraphAlgorithm.

virtual void vtkSQLGraphReader::SetDirected ( bool  ) [virtual]

When set, creates a directed graph, as opposed to an undirected graph.

virtual bool vtkSQLGraphReader::GetDirected ( ) [virtual]

When set, creates a directed graph, as opposed to an undirected graph.

virtual void vtkSQLGraphReader::DirectedOn ( ) [virtual]

When set, creates a directed graph, as opposed to an undirected graph.

virtual void vtkSQLGraphReader::DirectedOff ( ) [virtual]

When set, creates a directed graph, as opposed to an undirected graph.

virtual void vtkSQLGraphReader::SetVertexQuery ( vtkSQLQuery q) [virtual]

The query that retrieves the node information.

The query that retrieves the node information.

virtual void vtkSQLGraphReader::SetEdgeQuery ( vtkSQLQuery q) [virtual]

The query that retrieves the arc information.

The query that retrieves the arc information.

virtual void vtkSQLGraphReader::SetSourceField ( const char *  ) [virtual]

The name of the field in the arc query for the source node of each arc.

virtual char* vtkSQLGraphReader::GetSourceField ( ) [virtual]

The name of the field in the arc query for the source node of each arc.

virtual void vtkSQLGraphReader::SetTargetField ( const char *  ) [virtual]

The name of the field in the arc query for the target node of each arc.

virtual char* vtkSQLGraphReader::GetTargetField ( ) [virtual]

The name of the field in the arc query for the target node of each arc.

virtual void vtkSQLGraphReader::SetVertexIdField ( const char *  ) [virtual]

The name of the field in the node query for the node ID.

virtual char* vtkSQLGraphReader::GetVertexIdField ( ) [virtual]

The name of the field in the node query for the node ID.

virtual void vtkSQLGraphReader::SetXField ( const char *  ) [virtual]

The name of the field in the node query for the node's x coordinate.

virtual char* vtkSQLGraphReader::GetXField ( ) [virtual]

The name of the field in the node query for the node's x coordinate.

virtual void vtkSQLGraphReader::SetYField ( const char *  ) [virtual]

The name of the field in the node query for the node's y coordinate.

virtual char* vtkSQLGraphReader::GetYField ( ) [virtual]

The name of the field in the node query for the node's y coordinate.

virtual void vtkSQLGraphReader::SetZField ( const char *  ) [virtual]

The name of the field in the node query for the node's z coordinate.

virtual char* vtkSQLGraphReader::GetZField ( ) [virtual]

The name of the field in the node query for the node's z coordinate.

virtual void vtkSQLGraphReader::SetCollapseEdges ( bool  ) [virtual]

When set, creates a graph with no parallel arcs. Parallel arcs are combined into one arc. No cell fields are passed to the output, except the vtkGhostLevels array if it exists, but a new field "weight" is created that holds the number of duplicates of that arc in the input.

virtual bool vtkSQLGraphReader::GetCollapseEdges ( ) [virtual]

When set, creates a graph with no parallel arcs. Parallel arcs are combined into one arc. No cell fields are passed to the output, except the vtkGhostLevels array if it exists, but a new field "weight" is created that holds the number of duplicates of that arc in the input.

virtual void vtkSQLGraphReader::CollapseEdgesOn ( ) [virtual]

When set, creates a graph with no parallel arcs. Parallel arcs are combined into one arc. No cell fields are passed to the output, except the vtkGhostLevels array if it exists, but a new field "weight" is created that holds the number of duplicates of that arc in the input.

virtual void vtkSQLGraphReader::CollapseEdgesOff ( ) [virtual]

When set, creates a graph with no parallel arcs. Parallel arcs are combined into one arc. No cell fields are passed to the output, except the vtkGhostLevels array if it exists, but a new field "weight" is created that holds the number of duplicates of that arc in the input.

virtual int vtkSQLGraphReader::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.


Member Data Documentation

bool vtkSQLGraphReader::Directed [protected]

Definition at line 146 of file vtkSQLGraphReader.h.

Definition at line 147 of file vtkSQLGraphReader.h.

Definition at line 148 of file vtkSQLGraphReader.h.

Definition at line 149 of file vtkSQLGraphReader.h.

char* vtkSQLGraphReader::SourceField [protected]

Definition at line 150 of file vtkSQLGraphReader.h.

char* vtkSQLGraphReader::TargetField [protected]

Definition at line 151 of file vtkSQLGraphReader.h.

Definition at line 152 of file vtkSQLGraphReader.h.

char* vtkSQLGraphReader::XField [protected]

Definition at line 153 of file vtkSQLGraphReader.h.

char* vtkSQLGraphReader::YField [protected]

Definition at line 154 of file vtkSQLGraphReader.h.

char* vtkSQLGraphReader::ZField [protected]

Definition at line 155 of file vtkSQLGraphReader.h.


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