XFILE Struct Reference

#include <xfile.h>

List of all members.

Public Member Functions

long give_maxlnsize ()
 returns size of line buffer
void set_maxlnsize (long lnsize)
 sets size of line buffer
 XFILE ()
 ~XFILE ()

Public Attributes

xfsectionasect
 pointer to actual section
long col
 actual column
FILE * file
 pointer to standard file structure
char * fname
 name of opened file
long id_sec
 index of actual section
long ignorecase
 flag for case sensitive(=0)/case insensitive(=1) keyword searching
long index_created
 flag for created index of particular sections
kwd_handling kwdmode
 keyword handling mode
long line
 actual line
long lnfpos
 actual position of actual line beginning in file
char * lnpostf
 postfix string of line end (for XFILE output)
long lnpostfl
 length of lnpostf string
char * lnpref
 prefix string of line beginning (for XFILE output)
long lnprefl
 length of lnpref string
char * lnstr
 line buffer where the actual file line is stored
long maxlnover
 flag with the number of last oversized line (=0 if no oversized line detected)
long num_sec
 number of detected sections
xfsectionsect
 array with descriptions of detected sections
int warning
 flag which handles warning (0=no warning/1=print warning/2=treat warning as an error)

Private Attributes

long maxlnsize
 max line size

Detailed Description

Structure of file description. This file type is used for xfscanf function and it has extended functionality comparing with traditional FILE type -

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

Definition at line 45 of file xfile.h.


Constructor & Destructor Documentation

XFILE (  ) 
~XFILE (  ) 

Definition at line 30 of file xfile.cpp.

References fname, lnstr, and sect.


Member Function Documentation

long give_maxlnsize (  ) 

returns size of line buffer

The function returns actual value of maximum line length i.e. size of line buffer for the given XFILE.

Returns:
Returns the maximum accepted line length.

Created by Tomas Koudelka, 11.9.2013

Definition at line 46 of file xfile.cpp.

References maxlnsize.

Referenced by check_maxlnsize(), getgkwid(), getkwd_sect(), getnprop(), input_elem_edgebc(), input_elem_surfbc(), input_elem_vertbc(), main(), skip_space(), xf_resetsec(), xfclose(), xfdetect_sect(), and xfscanf().

void set_maxlnsize ( long  lnsize  ) 

sets size of line buffer

The function sets new value of maximum line length i.e. size of line buffer for the given XFILE. The size of line buffer is given by parameter lnsize.

Parameters:
lnsize - size of line buffer
Returns:
The function does not return anything but it changes maxlnsize and lnstr data members.

Created by Tomas Koudelka, 11.9.2013

Definition at line 65 of file xfile.cpp.

References lnstr, maxlnsize, and memset().

Referenced by xfopen().


Member Data Documentation

pointer to actual section

Definition at line 64 of file xfile.h.

Referenced by check_feof_eos(), checkeos(), cut_str_sec(), getkwd_sect(), skip_space(), xf_copysec(), xf_resetsec(), xf_setsec(), xfdetect_sect(), XFILE(), xfopen(), and xfscanf().

long col
FILE* file
char* fname
long id_sec

index of actual section

Definition at line 63 of file xfile.h.

Referenced by getkwd_sect(), xf_resetsec(), xf_setsec(), xfdetect_sect(), XFILE(), and xfopen().

long ignorecase

flag for created index of particular sections

Definition at line 62 of file xfile.h.

Referenced by check_reqsec(), check_reqsec_t(), getkwd_sect(), dbcrs::readmc(), dbmat::readmm(), dbcrst::readtc(), dbmatt::readtm(), skip_space(), xf_resetsec(), xf_setsec(), xfdetect_sect(), XFILE(), and xfopen().

long line
long lnfpos

actual position of actual line beginning in file

Definition at line 50 of file xfile.h.

Referenced by getgkwid(), getkwd_sect(), proc_new_ln_fmt(), skip_space(), xf_resetsec(), xfdetect_sect(), XFILE(), xfopen(), and xfscanf().

char* lnpostf

postfix string of line end (for XFILE output)

Definition at line 69 of file xfile.h.

Referenced by proc_new_ln_fmt(), and XFILE().

long lnpostfl

length of lnpostf string

Definition at line 71 of file xfile.h.

Referenced by XFILE().

char* lnpref

prefix string of line beginning (for XFILE output)

Definition at line 68 of file xfile.h.

Referenced by proc_new_ln_fmt(), and XFILE().

long lnprefl

length of lnpref string

Definition at line 70 of file xfile.h.

Referenced by XFILE().

char* lnstr

line buffer where the actual file line is stored

Definition at line 52 of file xfile.h.

Referenced by getkwd_sect(), set_maxlnsize(), skipline(), xf_resetsec(), xfdetect_sect(), XFILE(), xfscanf(), and ~XFILE().

long maxlnover

flag with the number of last oversized line (=0 if no oversized line detected)

Definition at line 56 of file xfile.h.

Referenced by check_maxlnsize(), xfclose(), XFILE(), xfopen(), and xfscanf().

long maxlnsize [private]

max line size

Definition at line 74 of file xfile.h.

Referenced by give_maxlnsize(), set_maxlnsize(), and XFILE().

long num_sec

number of detected sections

Definition at line 65 of file xfile.h.

Referenced by getkwd_sect(), xf_resetsec(), xf_setsec(), xfdetect_sect(), XFILE(), and xfopen().

array with descriptions of detected sections

Definition at line 66 of file xfile.h.

Referenced by xf_setsec(), xfdetect_sect(), XFILE(), xfopen(), and ~XFILE().

int warning

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

Generated by  doxygen 1.6.2