#ifndef __SL0101_H #define __SL0101_H #ifndef __ISAM_H #include #endif #ifndef __TREE_H #include #endif #ifndef __TREECTRL_H #include #endif /////////////////////////////////////////////////////////// // TSAL_tree /////////////////////////////////////////////////////////// enum TSAL_level { sl_documento, sl_fase1, sl_fase2, sl_fase3, sl_fase4, sl_distinta, sl_misura }; class TSAL_tree : public TObject_tree { TTree_field& _owner; TString4 _strFasi, _strDist, _strMisu; TString_array _picture_fasi; private: bool add_lastson(TObject* obj); bool add_lastson(const TObject& obj) { return add_lastson(obj.dup()); } protected: bool goto_last_fase(); bool goto_last_dist(); TSAL_level last_fase_level() const; bool goto_last_fase(TSAL_level sublevel); public: virtual bool could_have_son() const; virtual bool get_description(TString& str) const; virtual TFieldtypes get_var(const TString& name, TVariant& var) const; virtual TImage* image(bool sel) const; const TString& tipo_fasi() const { return _strFasi; } const TString& tipo_dist() const { return _strDist; } const TString& tipo_misu() const { return _strMisu; } TSAL_level level(const TRectype& rec) const; TSAL_level level() const; TRectype* new_row(TSAL_level level) const; TRectype* curr_row() const { return (TRectype*)curr_node(); } TTree_field& owner() const { return _owner; } TRectype* fase(const TString& fase, bool create = false); TRectype* dist(const TString& fase, int n, bool create = false); TRectype* misu(const TString& dist, int n, bool create = false); bool ricalcola(real& costo, real& prezzo); bool load(const TRectype& doc, int nsal = 0); TSAL_tree(TTree_field& owner); bool append_row(const TRectype& rec); }; #define RSAL_LEVEL RDOC_PRIORITY #endif