#include <dbcrs.h>
Public Member Functions | |
void | alloc (long ni) |
alllocates memory for storage of cross section parameters as strings | |
void | allocmc (long ni) |
alllocates memory for storage of cross section parameters in mechcrsec | |
csec (void) | |
long | read (XFILE *in) |
reading cross-section | |
~csec (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 | |
crsectype | type |
Cross-section class
Created by Tomas Koudelka, koudelka@cml.fsv.cvut.cz
Definition at line 8 of file dbcrs.h.
csec | ( | void | ) |
~csec | ( | void | ) |
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 dbcrs.cpp.
References inst, instu, memset(), ninst, and ridx.
Referenced by read().
void allocmc | ( | long | ni | ) |
alllocates memory for storage of cross section parameters in mechcrsec
The function allocates memory for ni sets of cross section parameters that will be read/stored via mechcrsec procedures.
ni | - number of allocated instances |
Created by Tomas Koudelka, 1.7.2014
Definition at line 81 of file dbcrs.cpp.
References instu, memset(), ninst, and ridx.
Referenced by dbcrs::readmc().
long read | ( | XFILE * | in | ) |
reading cross-section
This method reads one type crosssection 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 dbcrs.cpp.
References alloc(), XFILE::col, crsectype_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 dbcrs.h.
Referenced by alloc(), allocmc(), csec(), dbcrs::mark_used(), wr_crsecs(), and ~csec().
long ninst |
number of indeces
Definition at line 17 of file dbcrs.h.
Referenced by alloc(), allocmc(), csec(), read(), dbcrs::readmc(), dbcrs::renumber_id(), wr_crsecs(), and ~csec().
long ninstu |
counter used indeces this cross-section type
Definition at line 21 of file dbcrs.h.
Referenced by csec(), dbcrs::mark_used(), and wr_crsecs().
long* ridx |
array with renumbered used indeces
Definition at line 20 of file dbcrs.h.
Referenced by alloc(), allocmc(), csec(), dbcrs::renumber_id(), wr_crsecs(), wr_elements(), wr_lay_elements(), wr_lay_nodes(), wr_nodes(), and ~csec().
Definition at line 16 of file dbcrs.h.
Referenced by csec(), read(), dbcrs::readmc(), and wr_crsecs().