FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
CFSTRDB_Temperature.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_Temperature Ver.1.0
7*/
8
9#include "CFSTRDB.h"
10#include "CHECData.h"
11
12using namespace std;
13
15 : CFSTRDataBlock(FSTRDB_TEMPERATURE), ItemList() {}
16
18
20
22 if (ItemList.size() == 0) return;
23
24 hecd->WriteHeader("!TEMPERATURE");
25 vector<CItem>::iterator iter;
26
27 for (iter = ItemList.begin(); iter != ItemList.end(); iter++) {
28 hecd->WriteData("SF", iter->ngrp, iter->value);
29 }
30}
31
32bool CFSTRDB_Temperature::Read(CHECData *hecd, char *header_line) {
33 int rcode[5];
34
35 while (1) {
36 CItem item;
37
38 if (!hecd->ReadData(rcode, "SF", item.ngrp, &item.value)) break;
39
40 ItemList.push_back(item);
41 }
42
43 return true;
44}
@ FSTRDB_TEMPERATURE
Definition: CFSTRDB.h:39
char ngrp[hec_name_size]
Definition: CFSTRDB.h:283
std::vector< CItem > ItemList
Definition: CFSTRDB.h:292
virtual void Write(class CHECData *hecd)
virtual bool Read(class CHECData *hecd, char *header_line)
virtual bool ReadData(int *rcode, const char *fmt,...)
Definition: CHECData.cpp:548
virtual void WriteData(const char *fmt,...)
Definition: CHECData.cpp:162
virtual void WriteHeader(const char *name, const char *fmt="",...)
Definition: CHECData.cpp:68