vtkLSDynaSummaryParser.h 1.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkLSDynaSummaryParser.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.

=========================================================================*/
15 16 17 18 19 20 21
/**
 * @class   vtkLSDynaSummaryParser
 *
 * This is a helper class used by vtkLSDynaReader to read XML files.
 * @sa
 * vtkLSDynaReader
*/
22

23 24
#ifndef vtkLSDynaSummaryParser_h
#define vtkLSDynaSummaryParser_h
25

26
#include "vtkIOLSDynaModule.h" // For export macro
27 28 29 30
#include "vtkXMLParser.h"
#include "vtkStdString.h" //needed for vtkStdString

class LSDynaMetaData;
31
class VTKIOLSDYNA_EXPORT vtkLSDynaSummaryParser : public vtkXMLParser
32 33 34 35
{
public:
  vtkTypeMacro(vtkLSDynaSummaryParser,vtkXMLParser);
  static vtkLSDynaSummaryParser* New();
36
  void PrintSelf(ostream &os, vtkIndent indent) override;
37 38 39



40 41 42 43 44
  /// Must be set before calling Parse();
  LSDynaMetaData* MetaData;

protected:
  vtkLSDynaSummaryParser();
45
  ~vtkLSDynaSummaryParser() override { };
46

47 48 49
  void StartElement(const char* name, const char** atts) override;
  void EndElement(const char* name) override;
  void CharacterDataHandler(const char* data, int length) override;
50 51 52 53 54 55 56 57 58 59

  vtkStdString PartName;
  int PartId;
  int PartStatus;
  int PartMaterial;
  int InPart;
  int InDyna;
  int InName;

private:
60 61
  vtkLSDynaSummaryParser( const vtkLSDynaSummaryParser& ) = delete;
  void operator = ( const vtkLSDynaSummaryParser& ) = delete;
62 63
};

64
#endif //vtkLSDynaReader_h