1994-12-28 11:01:33 +00:00
|
|
|
#ifndef __PREFIX_H
|
|
|
|
#define __PREFIX_H
|
|
|
|
|
|
|
|
#ifndef __EXTCTYPE_H
|
|
|
|
#include <extctype.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __FILES_H
|
|
|
|
#include <files.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __STRINGS_H
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// @C
|
|
|
|
// class TPrefix : public TObject
|
|
|
|
// @END
|
|
|
|
|
|
|
|
class TPrefix : public TObject
|
|
|
|
{
|
|
|
|
// @DPRIV
|
|
|
|
TString _prefix;
|
|
|
|
int* _dirfl;
|
|
|
|
int* _recfl;
|
|
|
|
long _filelevel;
|
|
|
|
int _items;
|
|
|
|
|
|
|
|
SecDef* _fdir;
|
|
|
|
SecDef* _rdir;
|
|
|
|
|
|
|
|
bool test(const char* s) const ;
|
|
|
|
void put();
|
|
|
|
|
|
|
|
public:
|
|
|
|
// @FPUB
|
|
|
|
void set(const char* name = NULL, bool force = FALSE, TFilelock mode = _manulock);
|
|
|
|
bool exist(long codditta) const;
|
|
|
|
bool test(long codditta) const;
|
|
|
|
long get_codditta() const ;
|
|
|
|
bool set_codditta(long codditta, bool force = FALSE);
|
|
|
|
const char* name() const { return _prefix;}
|
|
|
|
long filelevel() const {return _filelevel;}
|
|
|
|
|
|
|
|
int items() const { return _items; }
|
|
|
|
const char* description(const char* cod) const;
|
|
|
|
const char* description(int cod) const;
|
1995-02-02 18:08:50 +00:00
|
|
|
bool is_firm() const { return _prefix.len() == 6 && _prefix[5] == 'a';}
|
|
|
|
bool is_com() const { return !is_firm();}
|
1994-12-28 11:01:33 +00:00
|
|
|
|
|
|
|
TPrefix();
|
|
|
|
virtual ~TPrefix();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const char* firm2dir(long codditta);
|
|
|
|
|
|
|
|
#ifdef __PREFIX_CPP
|
|
|
|
#define extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// @DPUB
|
|
|
|
extern TPrefix* prefhndl
|
|
|
|
// @END
|
|
|
|
#ifdef __PREFIX_CPP
|
|
|
|
= NULL ;
|
|
|
|
#undef extern
|
|
|
|
#else
|
|
|
|
;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // __PREFIX_H
|
|
|
|
|