-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinpoperator.h
27 lines (23 loc) · 922 Bytes
/
inpoperator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef INPOPERATOR_H
#define INPOPERATOR_H
#include <QString>
#include <QTextStream>
#include <map>
#include <vector>
#include "tantriangle.h"
class InpOperator
{
public:
static bool ReadInpFile(const QString & input, std::vector<TanTriangle> & triangles);
static bool WriteInpFile(const QString & output, const std::vector<TanTriangle> & triangles);
private:
static bool ReadOneNode(const QString & line, std::map<long, long> & mapIdOld2New);
static bool ReadOneElement(const QString & line,
const std::map<long, long> & mapIdOld2New,
std::vector<TanTriangle> & triangles);
static void WriteHeader(QTextStream & txt);
static void WriteFooter(QTextStream & txt);
static void WriteNodes(QTextStream & txt);
static void WriteElements(QTextStream & txt, const std::vector<TanTriangle> & triangles);
};
#endif // INPOPERATOR_H