csect Class Reference

#include <dbcrst.h>

List of all members.

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

Detailed Description

Cross-section class

Created by Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 8 of file dbcrst.h.


Constructor & Destructor Documentation

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.

References inst, instu, ninst, ninstu, ridx, and type.

~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.

References inst, instu, ninst, and ridx.


Member Function Documentation

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.

Parameters:
ni - number of allocated instances
Returns:
The function does not return anything.

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.

Parameters:
ni - number of allocated instances
Returns:
The function does not return anything.

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.

Parameters:
in - opened text file with cross-section data.
Return values:
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().


Member Data Documentation

char** inst

array of strings with cross-section properties (cross-section indeces)

Definition at line 18 of file dbcrst.h.

Referenced by alloc(), csect(), read(), wr_crsecst(), and ~csect().

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().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2