text: /**
  	* \file PnlWdbeVarRec.h
  	* job handler for job PnlWdbeVarRec (declarations)
  	* \copyright (C) 2016-2020 MPSI Technologies GmbH
  	* \author Alexander Wirthmueller (auto-generation)
  	* \date created: 28 Nov 2020
  	*/
  // IP header --- ABOVE
  
  #ifndef PNLWDBEVARREC_H
  #define PNLWDBEVARREC_H
  
  // IP include.spec --- INSERT
  
  // IP include.cust --- INSERT
  
  #include "PnlWdbeVarDetail.h"
  
  #define VecVWdbeVarRecDo PnlWdbeVarRec::VecVDo
  
  #define ContInfWdbeVarRec PnlWdbeVarRec::ContInf
  #define StatAppWdbeVarRec PnlWdbeVarRec::StatApp
  #define StatShrWdbeVarRec PnlWdbeVarRec::StatShr
  #define TagWdbeVarRec PnlWdbeVarRec::Tag
  
  #define DpchAppWdbeVarRecDo PnlWdbeVarRec::DpchAppDo
  #define DpchEngWdbeVarRecData PnlWdbeVarRec::DpchEngData
  
  /**
  	* PnlWdbeVarRec
  	*/
  class PnlWdbeVarRec : public JobWdbe {
  
  public:
  	/**
  		* VecVDo (full: VecVWdbeVarRecDo)
  		*/
  	class VecVDo {
  
  	public:
  		static const Sbecore::uint BUTMINIMIZECLICK = 1;
  		static const Sbecore::uint BUTREGULARIZECLICK = 2;
  
  		static Sbecore::uint getIx(const std::string& sref);
  		static std::string getSref(const Sbecore::uint ix);
  	};
  
  	/**
  	  * ContInf (full: ContInfWdbeVarRec)
  	  */
  	class ContInf : public Sbecore::Block {
  
  	public:
  		static const Sbecore::uint TXTREF = 1;
  
  	public:
  		ContInf(const std::string& TxtRef = "");
  
  	public:
  		std::string TxtRef;
  
  	public:
  		void writeJSON(Json::Value& sup, std::string difftag = "");
  		void writeXML(xmlTextWriter* wr, std::string difftag = "", bool shorttags = true);
  		std::set<Sbecore::uint> comm(const ContInf* comp);
  		std::set<Sbecore::uint> diff(const ContInf* comp);
  	};
  
  	/**
  		* StatApp (full: StatAppWdbeVarRec)
  		*/
  	class StatApp {
  
  	public:
  		static void writeJSON(Json::Value& sup, std::string difftag = "", const bool initdoneDetail = false);
  		static void writeXML(xmlTextWriter* wr, std::string difftag = "", bool shorttags = true, const bool initdoneDetail = false);
  	};
  
  	/**
  		* StatShr (full: StatShrWdbeVarRec)
  		*/
  	class StatShr : public Sbecore::Block {
  
  	public:
  		static const Sbecore::uint IXWDBEVEXPSTATE = 1;
  		static const Sbecore::uint JREFDETAIL = 2;
  		static const Sbecore::uint BUTREGULARIZEACTIVE = 3;
  
  	public:
  		StatShr(const Sbecore::uint ixWdbeVExpstate = VecWdbeVExpstate::REGD, const Sbecore::ubigint jrefDetail = 0, const bool ButRegularizeActive = true);
  
  	public:
  		Sbecore::uint ixWdbeVExpstate;
  		Sbecore::ubigint jrefDetail;
  		bool ButRegularizeActive;
  
  	public:
  		void writeJSON(Json::Value& sup, std::string difftag = "");
  		void writeXML(xmlTextWriter* wr, std::string difftag = "", bool shorttags = true);
  		std::set<Sbecore::uint> comm(const StatShr* comp);
  		std::set<Sbecore::uint> diff(const StatShr* comp);
  	};
  
  	/**
  		* Tag (full: TagWdbeVarRec)
  		*/
  	class Tag {
  
  	public:
  		static void writeJSON(const Sbecore::uint ixWdbeVLocale, Json::Value& sup, std::string difftag = "");
  		static void writeXML(const Sbecore::uint ixWdbeVLocale, xmlTextWriter* wr, std::string difftag = "", bool shorttags = true);
  	};
  
  	/**
  		* DpchAppDo (full: DpchAppWdbeVarRecDo)
  		*/
  	class DpchAppDo : public DpchAppWdbe {
  
  	public:
  		static const Sbecore::uint JREF = 1;
  		static const Sbecore::uint IXVDO = 2;
  
  	public:
  		DpchAppDo();
  
  	public:
  		Sbecore::uint ixVDo;
  
  	public:
  		std::string getSrefsMask();
  
  		void readJSON(Json::Value& sup, bool addbasetag = false);
  		void readXML(xmlXPathContext* docctx, std::string basexpath = "", bool addbasetag = false);
  	};
  
  	/**
  		* DpchEngData (full: DpchEngWdbeVarRecData)
  		*/
  	class DpchEngData : public DpchEngWdbe {
  
  	public:
  		static const Sbecore::uint JREF = 1;
  		static const Sbecore::uint CONTINF = 2;
  		static const Sbecore::uint STATAPP = 3;
  		static const Sbecore::uint STATSHR = 4;
  		static const Sbecore::uint TAG = 5;
  		static const Sbecore::uint ALL = 6;
  
  	public:
  		DpchEngData(const Sbecore::ubigint jref = 0, ContInf* continf = NULL, StatShr* statshr = NULL, const std::set<Sbecore::uint>& mask = {NONE});
  
  	public:
  		ContInf continf;
  		StatShr statshr;
  
  	public:
  		std::string getSrefsMask();
  		void merge(DpchEngWdbe* dpcheng);
  
  		void writeJSON(const Sbecore::uint ixWdbeVLocale, Json::Value& sup);
  		void writeXML(const Sbecore::uint ixWdbeVLocale, xmlTextWriter* wr);
  	};
  
  	bool evalButRegularizeActive(DbsWdbe* dbswdbe);
  
  public:
  	PnlWdbeVarRec(XchgWdbe* xchg, DbsWdbe* dbswdbe, const Sbecore::ubigint jrefSup, const Sbecore::uint ixWdbeVLocale);
  	~PnlWdbeVarRec();
  
  public:
  	ContInf continf;
  	StatShr statshr;
  
  	PnlWdbeVarDetail* pnldetail;
  
  	WdbeMVariable recVar;
  
  	// IP vars.cust --- INSERT
  
  public:
  	// IP cust --- INSERT
  
  public:
  	DpchEngWdbe* getNewDpchEng(std::set<Sbecore::uint> items);
  
  	void refresh(DbsWdbe* dbswdbe, std::set<Sbecore::uint>& moditems, const bool unmute = false);
  
  	void updatePreset(DbsWdbe* dbswdbe, const Sbecore::uint ixWdbeVPreset, const Sbecore::ubigint jrefTrig, const bool notif = false);
  	void minimize(DbsWdbe* dbswdbe, const bool notif = false, DpchEngWdbe** dpcheng = NULL);
  	void regularize(DbsWdbe* dbswdbe, const bool notif = false, DpchEngWdbe** dpcheng = NULL);
  
  public:
  
  public:
  	void handleRequest(DbsWdbe* dbswdbe, ReqWdbe* req);
  
  private:
  
  	void handleDpchAppWdbeInit(DbsWdbe* dbswdbe, DpchAppWdbeInit* dpchappwdbeinit, DpchEngWdbe** dpcheng);
  
  	void handleDpchAppDoButMinimizeClick(DbsWdbe* dbswdbe, DpchEngWdbe** dpcheng);
  	void handleDpchAppDoButRegularizeClick(DbsWdbe* dbswdbe, DpchEngWdbe** dpcheng);
  
  public:
  	void handleCall(DbsWdbe* dbswdbe, Sbecore::Call* call);
  
  private:
  	bool handleCallWdbeVarUpd_refEq(DbsWdbe* dbswdbe, const Sbecore::ubigint jrefTrig);
  	bool handleCallWdbeVar_cluEq(DbsWdbe* dbswdbe, const Sbecore::ubigint jrefTrig, const Sbecore::ubigint refInv, bool& boolvalRet);
  
  };
  
  #endif
  