CONFIG LIB 1.5
Configuration Files Library (by TGG 2020)
Loading...
Searching...
No Matches
txt_out_file.h
1/*********************************************************************/
2/* */
3/* Config files library - (C) TGG 2019 */
4/* */
5/*********************************************************************/
6/* Warszawa, 2019 */
7/*********************************************************************/
8/* */
9/* File: txt_out_file.h */
10/* */
11/* Author: T.Grabowski */
12/* */
13/* Contents - general output txt file */
14/* */
15/* */
16/*********************************************************************/
17/* */
18/* */
19
20#ifndef _TXT_OUT_FILE_H_
21#define _TXT_OUT_FILE_H_
22
23#include "iofun.h"
24
25#define NCOL_MAX 32
26
28
29class TXT_OUT_FILE : public IOFUN
30{
31 int file_flag;
32 char file_name[256];
33
34 public:
35
36 int nCol;
37 int nRow;
38
39 char cName[NCOL_MAX][32];
40
41 int iType;
44 int* iObj;
45 double** dResult;
46
48 TXT_OUT_FILE( int iTypeIn = 0 );
49 virtual ~TXT_OUT_FILE( void );
50
52 virtual void Clean( void );
54 virtual void CleanTabs( void );
56 virtual void InitTabs( int n, int m );
58 virtual void SetName( const char* FileName );
60 virtual char* GetName( void );
62 virtual int Read( const char* FileName );
64 virtual int Read( void );
66 virtual int Write( const char* FileName );
68 virtual int Write( void );
69};
70
71#endif /*_TXT_OUT_FILE_H_*/
Simple I/O functions class.
Definition iofun.h:42
General output text file.
virtual int Read(void)
reads the [.czy] file defined by SetName function
int nRow
number of rows
virtual int Write(void)
writes the [.czy] file defined by SetName function
char cName[NCOL_MAX][32]
array of variable names - up to NCOL_MAX names, 32 characters each
int nCol
number of columns/variables (up to NCOL_MAX)
int * iObj
pointer to array [nRow] first column value (int)
virtual char * GetName(void)
returns pathname of the output text file
TXT_OUT_FILE(int iTypeIn=0)
constructor
double ** dResult
pointer to array (size depends on iType) containing the results for all variables
virtual void InitTabs(int n, int m)
initialises arrays (n - number of columns, m - number of rows )
virtual void CleanTabs(void)
cleans (deletes) arrays
virtual void SetName(const char *FileName)
set pathname for of the output text file
virtual void Clean(void)
cleans local variables
int iType
type of txt file - possible types: 0 - nCol x nRow - only double type values 1 - (nCol-1) x nRow ...
This file contains some smart I/O functions.