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) override
 
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)
 Returns true if the data from the output port can be written at all. More...
 
vtkSMProxyCreateWriter (const char *filename, vtkSMSourceProxy *, unsigned int outputport, bool proxyname=false)
 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)
 
const char * GetSupportedWriterProxies (vtkSMSourceProxy *source, unsigned int outputport)
 A variation on GetSupportedFileTypes that obtains a list of prototype proxy names. More...
 
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 vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

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)
 
static std::string CreatePrettyLabel (const std::string &name)
 Return a well-formated label using provided name by adding spaces between lower cases and upper cases: More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkSMWriterFactory ()
 
 ~vtkSMWriterFactory () override
 
- Protected Member Functions inherited from vtkSMObject
 vtkSMObject ()
 
 ~vtkSMObject () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

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 33 of file vtkSMWriterFactory.h.

Member Typedef Documentation

◆ Superclass

Definition at line 37 of file vtkSMWriterFactory.h.

Constructor & Destructor Documentation

◆ vtkSMWriterFactory()

vtkSMWriterFactory::vtkSMWriterFactory ( )
protected

◆ ~vtkSMWriterFactory()

vtkSMWriterFactory::~vtkSMWriterFactory ( )
overrideprotected

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 
)
overridevirtual

Reimplemented from vtkSMObject.

◆ 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 
)

Returns 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,
bool  proxyname = false 
)

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. The proxybyname flag tells the factory to use the proxy name rather than a filename.extension to lookup the right proxy.

◆ CreateWriter() [2/2]

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

Definition at line 67 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 80 of file vtkSMWriterFactory.h.

◆ GetSupportedWriterProxies()

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

A variation on GetSupportedFileTypes that obtains a list of prototype proxy names.

◆ 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 beginning of the application's execution before any sessions are created.


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