#include <dbcrst.h>
Public Member Functions | |
void | alloc (long ni) |
alllocates memory for storage of cross section parameters as strings | |
void | alloctc (long ni) |
alllocates memory for storage of cross section parameters in transcrsec | |
csect (void) | |
long | read (XFILE *in) |
reading cross-section | |
~csect (void) | |
Public Attributes | |
char ** | inst |
array of strings with cross-section properties (cross-section indeces) | |
long * | instu |
array indicators of indeces which are used | |
long | ninst |
number of indeces | |
long | ninstu |
counter used indeces this cross-section type | |
long * | ridx |
array with renumbered used indeces | |
crsectypet | type |
Cross-section class
Created by Tomas Koudelka, koudelka@cml.fsv.cvut.cz
Definition at line 8 of file dbcrst.h.
csect | ( | void | ) |
Constructor which initializes data members with null or zero values.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 16 of file dbcrst.cpp.
~csect | ( | void | ) |
Destructor which deletes each string with cross-section properties.
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 33 of file dbcrst.cpp.
void alloc | ( | long | ni | ) |
alllocates memory for storage of cross section parameters as strings
The function allocates memory for ni sets of cross section parameters that will be read as strings.
ni | - number of allocated instances |
Created by Tomas Koudelka, 1.7.2014
Definition at line 58 of file dbcrst.cpp.
References inst, instu, memset(), ninst, and ridx.
Referenced by read().
void alloctc | ( | long | ni | ) |
alllocates memory for storage of cross section parameters in transcrsec
The function allocates memory for ni sets of cross section parameters that will be read/stored via transcrsec procedures.
ni | - number of allocated instances |
Created by Tomas Koudelka, 1.7.2014
Definition at line 81 of file dbcrst.cpp.
References instu, memset(), ninst, and ridx.
Referenced by dbcrst::readtc().
long read | ( | XFILE * | in | ) |
reading cross-section
This method reads one type cross section with different parameters from the opened text file in. The parameters are stored as strings.
in | - opened text file with cross-section data. |
0 | - on succes | |
1 | - error reading cross-section type and number of different parametre sets of given cross-section type | |
2 | - error reading cross-section properties string |
Created by Tomas Koudelka koudelka@cml.fsv.cvut.cz, 11. 2001
Definition at line 104 of file dbcrst.cpp.
References alloc(), XFILE::col, crsectypet_kwdset(), XFILE::fname, inst, XFILE::line, memset(), ninst, print_err(), skipline(), type, and xfscanf().
char** inst |
long* instu |
array indicators of indeces which are used
Definition at line 19 of file dbcrst.h.
Referenced by alloc(), alloctc(), csect(), dbcrst::mark_used(), wr_crsecst(), and ~csect().
long ninst |
number of indeces
Definition at line 17 of file dbcrst.h.
Referenced by alloc(), alloctc(), csect(), read(), dbcrst::readtc(), dbcrst::renumber_id(), wr_crsecst(), and ~csect().
long ninstu |
counter used indeces this cross-section type
Definition at line 21 of file dbcrst.h.
Referenced by csect(), dbcrst::mark_used(), and wr_crsecst().
long* ridx |
array with renumbered used indeces
Definition at line 20 of file dbcrst.h.
Referenced by alloc(), alloctc(), csect(), dbcrst::renumber_id(), wr_crsecst(), wr_elementst(), wr_nodest(), and ~csect().
Definition at line 16 of file dbcrst.h.
Referenced by csect(), read(), dbcrst::readtc(), and wr_crsecst().