ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkSMWriterFactory Class Reference

is a factory or creating a writer based on the data type information from the output port. More...

#include <vtkSMWriterFactory.h>

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

Public Types

typedef vtkSMObject Superclass
 
- Public Types inherited from vtkSMObject
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void Initialize ()
 Cleanup all registered prototypes. More...
 
void RegisterPrototype (const char *xmlgroup, const char *xmlname)
 Register a prototype. More...
 
bool CanWrite (vtkSMSourceProxy *, unsigned int outputport)
 Retruns true if the data from the output port can be written at all. More...
 
vtkSMProxyCreateWriter (const char *filename, vtkSMSourceProxy *, unsigned int outputport)
 Create a new writer proxy to write the data from the specified output port to the file specified, if possible. More...
 
vtkSMProxyCreateWriter (const char *filename, vtkSMSourceProxy *pxy)
 
const char * GetSupportedFileTypes (vtkSMSourceProxy *source, unsigned int outputport)
 Returns a formatted string with all supported file types. More...
 
const char * GetSupportedFileTypes (vtkSMSourceProxy *source)
 
unsigned int GetNumberOfRegisteredPrototypes ()
 
void UpdateAvailableWriters ()
 Every time a new proxy definition is added we check to see if it is a writer and then we add it to the list of available writers. More...
 
void AddGroup (const char *groupName)
 Add/remove a group name to look for writers in. More...
 
void RemoveGroup (const char *groupName)
 Add/remove a group name to look for writers in. More...
 
void GetGroups (vtkStringList *groups)
 Add/remove a group name to look for writers in. More...
 
- Public Member Functions inherited from vtkSMObject
void PrintSelf (ostream &os, vtkIndent indent)
 

Static Public Member Functions

static vtkSMWriterFactoryNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMWriterFactorySafeDownCast (vtkObject *o)
 
static void AddWriterToWhitelist (const char *writerxmlgroup, const char *writerxmlname)
 This function is for ParaView based applications that only wish to expose a subset of the writers. More...
 
- Static Public Member Functions inherited from vtkSMObject
static vtkSMObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMObjectSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSMWriterFactory ()
 
 ~vtkSMWriterFactory ()
 
- Protected Member Functions inherited from vtkSMObject
 vtkSMObject ()
 
 ~vtkSMObject ()
 

Detailed Description

is a factory or creating a writer based on the data type information from the output port.

vtkSMWriterFactory is a factory for creating a writer to write the data provided at an output port. This is done whenever a new proxy definition is added in the writers group.

Alternatively, one can register prototypes using RegisterPrototype API. The proxy definitions for the writer proxies must provide hints that indicate the file extension and description for the writer.

Once the factory has been configured, the API to create writers, get available writers etc. can be used.

Definition at line 45 of file vtkSMWriterFactory.h.

Member Typedef Documentation

◆ Superclass

Definition at line 49 of file vtkSMWriterFactory.h.

Constructor & Destructor Documentation

◆ vtkSMWriterFactory()

vtkSMWriterFactory::vtkSMWriterFactory ( )
protected

◆ ~vtkSMWriterFactory()

vtkSMWriterFactory::~vtkSMWriterFactory ( )
protected

Member Function Documentation

◆ New()

static vtkSMWriterFactory* vtkSMWriterFactory::New ( )
static

◆ GetClassName()

virtual const char* vtkSMWriterFactory::GetClassName ( )
virtual

Reimplemented from vtkSMObject.

◆ IsTypeOf()

static int vtkSMWriterFactory::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkSMWriterFactory::IsA ( const char *  type)
virtual

Reimplemented from vtkSMObject.

◆ SafeDownCast()

static vtkSMWriterFactory* vtkSMWriterFactory::SafeDownCast ( vtkObject *  o)
static

◆ PrintSelf()

void vtkSMWriterFactory::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ Initialize()

void vtkSMWriterFactory::Initialize ( )

Cleanup all registered prototypes.

◆ RegisterPrototype()

void vtkSMWriterFactory::RegisterPrototype ( const char *  xmlgroup,
const char *  xmlname 
)

Register a prototype.

◆ CanWrite()

bool vtkSMWriterFactory::CanWrite ( vtkSMSourceProxy ,
unsigned int  outputport 
)

Retruns true if the data from the output port can be written at all.

◆ CreateWriter() [1/2]

vtkSMProxy* vtkSMWriterFactory::CreateWriter ( const char *  filename,
vtkSMSourceProxy ,
unsigned int  outputport 
)

Create a new writer proxy to write the data from the specified output port to the file specified, if possible.

As internally UpdatePipeline() will be called on the source proxy, in order to prevent a double pipeline execution when you want to write a given timestep, you should call updatePipeline( time ) before the CreateWriter call.

◆ CreateWriter() [2/2]

vtkSMProxy* vtkSMWriterFactory::CreateWriter ( const char *  filename,
vtkSMSourceProxy pxy 
)
inline

Definition at line 76 of file vtkSMWriterFactory.h.

◆ GetSupportedFileTypes() [1/2]

const char* vtkSMWriterFactory::GetSupportedFileTypes ( vtkSMSourceProxy source,
unsigned int  outputport 
)

Returns a formatted string with all supported file types.

An example returned string would look like:

* "PVD Files (*.pvd);;VTK Files (*.vtk)"
* 

◆ GetSupportedFileTypes() [2/2]

const char* vtkSMWriterFactory::GetSupportedFileTypes ( vtkSMSourceProxy source)
inline

Definition at line 89 of file vtkSMWriterFactory.h.

◆ GetNumberOfRegisteredPrototypes()

unsigned int vtkSMWriterFactory::GetNumberOfRegisteredPrototypes ( )

◆ UpdateAvailableWriters()

void vtkSMWriterFactory::UpdateAvailableWriters ( )

Every time a new proxy definition is added we check to see if it is a writer and then we add it to the list of available writers.

◆ AddGroup()

void vtkSMWriterFactory::AddGroup ( const char *  groupName)

Add/remove a group name to look for writers in.

By default "writers" is included.

◆ RemoveGroup()

void vtkSMWriterFactory::RemoveGroup ( const char *  groupName)

Add/remove a group name to look for writers in.

By default "writers" is included.

◆ GetGroups()

void vtkSMWriterFactory::GetGroups ( vtkStringList groups)

Add/remove a group name to look for writers in.

By default "writers" is included.

◆ AddWriterToWhitelist()

static void vtkSMWriterFactory::AddWriterToWhitelist ( const char *  writerxmlgroup,
const char *  writerxmlname 
)
static

This function is for ParaView based applications that only wish to expose a subset of the writers.

If this function is never called, the reader factory will expose all the writers as it has in the past. However, if any writers are specified by passing their group name and reader name to this function, then only those writers will be available in any reader factories created by the application. This is intended to be called at the begining of the application's execution before any sessions are created.


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