VTK
|
read a vtkGraph from a database More...
#include <vtkSQLGraphReader.h>
Public Types | |
typedef vtkGraphAlgorithm | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkSQLGraphReader * | NewInstance () 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 vtkSQLQuery * | GetVertexQuery () |
virtual void | SetEdgeQuery (vtkSQLQuery *q) |
virtual vtkSQLQuery * | GetEdgeQuery () |
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 vtkSQLGraphReader * | New () |
static int | IsTypeOf (const char *type) |
static vtkSQLGraphReader * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkSQLGraphReader () | |
~vtkSQLGraphReader () | |
virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
virtual int | RequestDataObject (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
Protected Attributes | |
bool | Directed |
bool | CollapseEdges |
vtkSQLQuery * | EdgeQuery |
vtkSQLQuery * | VertexQuery |
char * | SourceField |
char * | TargetField |
char * | VertexIdField |
char * | XField |
char * | YField |
char * | ZField |
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.
Definition at line 66 of file vtkSQLGraphReader.h.
Reimplemented from vtkGraphAlgorithm.
Definition at line 70 of file vtkSQLGraphReader.h.
vtkSQLGraphReader::vtkSQLGraphReader | ( | ) | [protected] |
vtkSQLGraphReader::~vtkSQLGraphReader | ( | ) | [protected] |
static vtkSQLGraphReader* vtkSQLGraphReader::New | ( | ) | [static] |
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.
static vtkSQLGraphReader* vtkSQLGraphReader::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkGraphAlgorithm.
virtual vtkObjectBase* vtkSQLGraphReader::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkGraphAlgorithm.
vtkSQLGraphReader* vtkSQLGraphReader::NewInstance | ( | ) | const |
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.
virtual vtkSQLQuery* vtkSQLGraphReader::GetVertexQuery | ( | ) | [virtual] |
The query that retrieves the node information.
virtual void vtkSQLGraphReader::SetEdgeQuery | ( | vtkSQLQuery * | q | ) | [virtual] |
The query that retrieves the arc information.
virtual vtkSQLQuery* vtkSQLGraphReader::GetEdgeQuery | ( | ) | [virtual] |
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.
virtual int vtkSQLGraphReader::RequestDataObject | ( | vtkInformation * | , |
vtkInformationVector ** | , | ||
vtkInformationVector * | |||
) | [protected, virtual] |
Reimplemented from vtkGraphAlgorithm.
bool vtkSQLGraphReader::Directed [protected] |
Definition at line 146 of file vtkSQLGraphReader.h.
bool vtkSQLGraphReader::CollapseEdges [protected] |
Definition at line 147 of file vtkSQLGraphReader.h.
vtkSQLQuery* vtkSQLGraphReader::EdgeQuery [protected] |
Definition at line 148 of file vtkSQLGraphReader.h.
vtkSQLQuery* vtkSQLGraphReader::VertexQuery [protected] |
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.
char* vtkSQLGraphReader::VertexIdField [protected] |
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.