vtkWebUtilities.h 1.93 KB
Newer Older
Zach's avatar
Zach committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkWebUtilities.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkWebUtilities - collection of utility functions for ParaView Web.
// .SECTION Description
// vtkWebUtilities consolidates miscellaneous utility functions useful for
// Python scripts designed for ParaView Web.

20 21
#ifndef vtkWebUtilities_h
#define vtkWebUtilities_h
Zach's avatar
Zach committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

#include "vtkObject.h"
#include "vtkWebCoreModule.h" // needed for exports
#include <string>

class vtkDataSet;

class VTKWEBCORE_EXPORT vtkWebUtilities : public vtkObject
{
public:
  static vtkWebUtilities* New();
  vtkTypeMacro(vtkWebUtilities, vtkObject);
  void PrintSelf(ostream& os, vtkIndent indent);

  static std::string WriteAttributesToJavaScript(int field_type, vtkDataSet*);
  static std::string WriteAttributeHeadersToJavaScript(
    int field_type, vtkDataSet*);

  // Description
  // This method is similar to the ProcessRMIs() method on the GlobalController
  // except that it is Python friendly in the sense that it will release the
  // Python GIS lock, so when run in a thread, this will trully work in the
  // background without locking the main one.
  static void ProcessRMIs();
  static void ProcessRMIs(int reportError, int dont_loop=0);
//BTX
protected:
  vtkWebUtilities();
  ~vtkWebUtilities();

private:
  vtkWebUtilities(const vtkWebUtilities&); // Not implemented
  void operator=(const vtkWebUtilities&); // Not implemented
//ETX
};

#endif
// VTK-HeaderTest-Exclude: vtkWebUtilities.h