csec Class Reference

#include <dbcrs.h>

List of all members.

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

Detailed Description

Cross-section class

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

Definition at line 8 of file dbcrs.h.


Constructor & Destructor Documentation

csec ( 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 dbcrs.cpp.

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

~csec ( 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 dbcrs.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 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.

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

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 dbcrs.cpp.

References alloc(), XFILE::col, crsectype_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 dbcrs.h.

Referenced by alloc(), csec(), read(), wr_crsecs(), and ~csec().

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


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

Generated by  doxygen 1.6.2