FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
CFSTRDB_Write.cpp
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2019 FrontISTR Commons
3 * This software is released under the MIT License, see LICENSE.txt
4 *****************************************************************************/
5/*
6 CFSTRDB_Write Ver.1.0
7*/
8
9#include "CFSTRDB.h"
10#include "CHECData.h"
11
12using namespace std;
13
15 : CFSTRDataBlock(FSTRDB_WRITE), result(0), visual(0) {}
16
18
20
22 char header_s[256];
23 strcpy(header_s, "!WRITE");
24
25 if (result) strcat(header_s, ",RESULT");
26
27 if (visual) strcat(header_s, ",VISUAL");
28
29 hecd->WriteHeader(header_s);
30}
31
32bool CFSTRDB_Write::Read(CHECData *hecd, char *header_line) {
33 int rcode[10];
34
35 if (!hecd->ParseHeader(header_line, rcode, "EE", "RESULT", &result, "VISUAL",
36 &visual))
37 return false;
38
39 return true;
40}
@ FSTRDB_WRITE
Definition: CFSTRDB.h:31
virtual void Clear()
virtual bool Read(class CHECData *hecd, char *header_line)
virtual ~CFSTRDB_Write()
virtual void Write(class CHECData *hecd)
virtual bool ParseHeader(char *header_line, int *rcode, const char *fmt,...)
Definition: CHECData.cpp:506
virtual void WriteHeader(const char *name, const char *fmt="",...)
Definition: CHECData.cpp:68