vtkbone
AbaqusInputReaderHelper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 vtkbone
4
5 VTK classes for building and analyzing Numerics88 finite element models.
6
7 Copyright (c) 2010, Numerics88 Solutions Ltd.
8 All rights reserved.
9
10=========================================================================*/
11
12#ifndef __AbaqusInputReaderHelper_h
13#define __AbaqusInputReaderHelper_h
14
16
17// Forward declarations
18class vtkAlgorithm;
20class vtkObject;
21
39{
40public:
41
42 // Interval of lines read at which to make a progress update call.
43 static const int progessInterval = 1000;
44
45 // Constructor
46 // stream - An already-opened input stream (file or string)
47 // streamSize - File size. You can set it to zero if you don't know it
48 // in advance, but then no progress updates occur.
49 // boss - The vtk object to which to report progress updates. Usually this
50 // will be the calling object. You may set it to NULL, in which
51 // case no progress updates will occur.
52 // model - Object in which to store read data.
54 long streamSize,
57
59
60 // Typedef for a function call that handles messages.
61 typedef void (*messageHandler_t)(vtkObject*, const std::string&);
62
63 // Set a VTK object to report messages to, also set (typically static)
64 // functions to handle debug/warning messages.
66 messageHandler_t debugCall,
67 messageHandler_t warningCall);
68
69protected:
70
71 virtual int Finish();
72
73 // Override DebugMessage and WarningMessage from CommandStyleDataReader
74 // with out own that will use the VTK Debug/Warning facilities
75 virtual void DebugMessage (const std::string& msg);
76 virtual void WarningMessage (const std::string& msg);
77
78 // Reimplemented from the base class to support progress indicator
79 // and abortExecute flag.
80 int GetLine();
81
82 int IsCommand ();
84
85 // The following are all Section Handlers.
86 // They are registered in the constructor.
88 int Read_NODE();
90 int Read_NSET();
95 int Read_STEP();
100
104
109
110 typedef std::map<std::string, std::string> parameters_t;
112
113 std::string currentMaterial;
114 std::string allElementsSet;
115
116};
117
118#endif // __AbaqusInputReaderHelper_h
A class to read Abaqus Data files.
void RegisterMessageObject(vtkObject *obj, messageHandler_t debugCall, messageHandler_t warningCall)
std::map< std::string, std::string > parameters_t
virtual void WarningMessage(const std::string &msg)
void(* messageHandler_t)(vtkObject *, const std::string &)
vtkboneFiniteElementModel * model
AbaqusInputReaderHelper(std::istream &stream, long streamSize, vtkAlgorithm *boss, vtkboneFiniteElementModel *model)
virtual void DebugMessage(const std::string &msg)
An abstract base class for reading data files that are structured as text with a fixed maximum line l...
data model for finite element meshes