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

A Javascript data writer for vtkTable Writes a vtkTable into a Javascript data format. More...

#include <vtkJavaScriptDataWriter.h>

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

List of all members.

Public Types

typedef vtkWriter Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkJavaScriptDataWriterNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void SetOutputStream (ostream *my_stream)
ostream * GetOutputStream ()
virtual void SetVariableName (const char *)
virtual char * GetVariableName ()
virtual void SetFileName (const char *)
virtual char * GetFileName ()
virtual void SetIncludeFieldNames (bool)
virtual bool GetIncludeFieldNames ()

Static Public Member Functions

static vtkJavaScriptDataWriterNew ()
static int IsTypeOf (const char *type)
static vtkJavaScriptDataWriterSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkJavaScriptDataWriter ()
 ~vtkJavaScriptDataWriter ()
ofstream * OpenFile ()
virtual void WriteData ()
virtual void WriteTable (vtkTable *table, ostream *stream_ptr)
virtual int FillInputPortInformation (int port, vtkInformation *info)

Protected Attributes

char * VariableName
char * FileName
bool IncludeFieldNames
ostream * OutputStream

Detailed Description

A Javascript data writer for vtkTable Writes a vtkTable into a Javascript data format.

Definition at line 35 of file vtkJavaScriptDataWriter.h.


Member Typedef Documentation

Reimplemented from vtkWriter.

Definition at line 39 of file vtkJavaScriptDataWriter.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 vtkAlgorithm.

static int vtkJavaScriptDataWriter::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 vtkWriter.

virtual int vtkJavaScriptDataWriter::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 vtkWriter.

Reimplemented from vtkWriter.

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

Reimplemented from vtkWriter.

Reimplemented from vtkWriter.

void vtkJavaScriptDataWriter::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 vtkWriter.

virtual void vtkJavaScriptDataWriter::SetVariableName ( const char *  ) [virtual]

Get/set the name of the Javascript variable that the dataset will be assigned to. The default value is "data", so the javascript code generated by the filter will look like this: "var data = [ ... ];". If VariableName is set to NULL, then no assignment statement will be generated (i.e., only "[ ... ];" will be generated).

virtual char* vtkJavaScriptDataWriter::GetVariableName ( ) [virtual]

Get/set the name of the Javascript variable that the dataset will be assigned to. The default value is "data", so the javascript code generated by the filter will look like this: "var data = [ ... ];". If VariableName is set to NULL, then no assignment statement will be generated (i.e., only "[ ... ];" will be generated).

virtual void vtkJavaScriptDataWriter::SetFileName ( const char *  ) [virtual]

Get/Set the filename for the file.

virtual char* vtkJavaScriptDataWriter::GetFileName ( ) [virtual]

Get/Set the filename for the file.

virtual void vtkJavaScriptDataWriter::SetIncludeFieldNames ( bool  ) [virtual]

Get/Set the whether or not to include field names When field names are on you will get data output that looks like this: var data=[ {foo:3,time:"2009-11-04 16:09:42",bar:1 }, {foo:5,time:"2009-11-04 16:11:22",bar:0 }, without field names the data will be an array of arrays like this: var data=[ [3,"2009-11-04 16:09:42",1], [5,"2009-11-04 16:11:22",0], Default is ON (true)

Get/Set the whether or not to include field names When field names are on you will get data output that looks like this: var data=[ {foo:3,time:"2009-11-04 16:09:42",bar:1 }, {foo:5,time:"2009-11-04 16:11:22",bar:0 }, without field names the data will be an array of arrays like this: var data=[ [3,"2009-11-04 16:09:42",1], [5,"2009-11-04 16:11:22",0], Default is ON (true)

void vtkJavaScriptDataWriter::SetOutputStream ( ostream *  my_stream)
ofstream* vtkJavaScriptDataWriter::OpenFile ( ) [protected]
virtual void vtkJavaScriptDataWriter::WriteData ( ) [protected, virtual]

Implements vtkWriter.

virtual void vtkJavaScriptDataWriter::WriteTable ( vtkTable table,
ostream *  stream_ptr 
) [protected, virtual]
virtual int vtkJavaScriptDataWriter::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkAlgorithm.


Member Data Documentation

Definition at line 86 of file vtkJavaScriptDataWriter.h.

Definition at line 87 of file vtkJavaScriptDataWriter.h.

Definition at line 88 of file vtkJavaScriptDataWriter.h.

Definition at line 89 of file vtkJavaScriptDataWriter.h.


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