text: /**
  	* \file PnlWdbeUsgHeadbar_blks.cpp
  	* job handler for job PnlWdbeUsgHeadbar (implementation of blocks)
  	* \copyright (C) 2016-2020 MPSI Technologies GmbH
  	* \author Alexander Wirthmueller (auto-generation)
  	* \date created: 28 Nov 2020
  	*/
  // IP header --- ABOVE
  
  using namespace std;
  using namespace Sbecore;
  using namespace Xmlio;
  
  /******************************************************************************
   class PnlWdbeUsgHeadbar::StgInf
   ******************************************************************************/
  
  void PnlWdbeUsgHeadbar::StgInf::writeJSON(
  			const uint ixWdbeVLocale
  			, Json::Value& sup
  			, string difftag
  		) {
  	if (difftag.length() == 0) difftag = "StgInfWdbeUsgHeadbar";
  
  	Json::Value& me = sup[difftag] = Json::Value(Json::objectValue);
  
  	if (ixWdbeVLocale == VecWdbeVLocale::ENUS) {
  		me["MenAppCptwidth"] = "120";
  		me["MenAppWidth"] = "190";
  		me["MenCrdCptwidth"] = "100";
  		me["MenCrdWidth"] = "323";
  	};
  };
  
  void PnlWdbeUsgHeadbar::StgInf::writeXML(
  			const uint ixWdbeVLocale
  			, xmlTextWriter* wr
  			, string difftag
  			, bool shorttags
  		) {
  	if (difftag.length() == 0) difftag = "StgInfWdbeUsgHeadbar";
  
  	string itemtag;
  	if (shorttags) itemtag = "Si";
  	else itemtag = "StgitemInfWdbeUsgHeadbar";
  
  	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
  		if (ixWdbeVLocale == VecWdbeVLocale::ENUS) {
  			writeStringAttr(wr, itemtag, "sref", "MenAppCptwidth", "120");
  			writeStringAttr(wr, itemtag, "sref", "MenAppWidth", "190");
  			writeStringAttr(wr, itemtag, "sref", "MenCrdCptwidth", "100");
  			writeStringAttr(wr, itemtag, "sref", "MenCrdWidth", "323");
  		};
  	xmlTextWriterEndElement(wr);
  };
  
  /******************************************************************************
   class PnlWdbeUsgHeadbar::Tag
   ******************************************************************************/
  
  void PnlWdbeUsgHeadbar::Tag::writeJSON(
  			const uint ixWdbeVLocale
  			, Json::Value& sup
  			, string difftag
  		) {
  	if (difftag.length() == 0) difftag = "TagWdbeUsgHeadbar";
  
  	Json::Value& me = sup[difftag] = Json::Value(Json::objectValue);
  
  	if (ixWdbeVLocale == VecWdbeVLocale::ENUS) {
  		me["MenApp"] = "WhizniumDBE";
  		me["MenCrd"] = "User group";
  	};
  };
  
  void PnlWdbeUsgHeadbar::Tag::writeXML(
  			const uint ixWdbeVLocale
  			, xmlTextWriter* wr
  			, string difftag
  			, bool shorttags
  		) {
  	if (difftag.length() == 0) difftag = "TagWdbeUsgHeadbar";
  
  	string itemtag;
  	if (shorttags) itemtag = "Ti";
  	else itemtag = "TagitemWdbeUsgHeadbar";
  
  	xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
  		if (ixWdbeVLocale == VecWdbeVLocale::ENUS) {
  			writeStringAttr(wr, itemtag, "sref", "MenApp", "WhizniumDBE");
  			writeStringAttr(wr, itemtag, "sref", "MenCrd", "User group");
  		};
  	xmlTextWriterEndElement(wr);
  };
  
  /******************************************************************************
   class PnlWdbeUsgHeadbar::DpchEngData
   ******************************************************************************/
  
  PnlWdbeUsgHeadbar::DpchEngData::DpchEngData(
  			const ubigint jref
  			, const set<uint>& mask
  		) :
  			DpchEngWdbe(VecWdbeVDpch::DPCHENGWDBEUSGHEADBARDATA, jref)
  		{
  	if (find(mask, ALL)) this->mask = {JREF, STGINF, TAG};
  	else this->mask = mask;
  
  };
  
  string PnlWdbeUsgHeadbar::DpchEngData::getSrefsMask() {
  	vector<string> ss;
  	string srefs;
  
  	if (has(JREF)) ss.push_back("jref");
  	if (has(STGINF)) ss.push_back("stginf");
  	if (has(TAG)) ss.push_back("tag");
  
  	StrMod::vectorToString(ss, srefs);
  
  	return(srefs);
  };
  
  void PnlWdbeUsgHeadbar::DpchEngData::merge(
  			DpchEngWdbe* dpcheng
  		) {
  	DpchEngData* src = (DpchEngData*) dpcheng;
  
  	if (src->has(JREF)) {jref = src->jref; add(JREF);};
  	if (src->has(STGINF)) add(STGINF);
  	if (src->has(TAG)) add(TAG);
  };
  
  void PnlWdbeUsgHeadbar::DpchEngData::writeJSON(
  			const uint ixWdbeVLocale
  			, Json::Value& sup
  		) {
  	Json::Value& me = sup["DpchEngWdbeUsgHeadbarData"] = Json::Value(Json::objectValue);
  
  	if (has(JREF)) me["scrJref"] = Scr::scramble(jref);
  	if (has(STGINF)) StgInf::writeJSON(ixWdbeVLocale, me);
  	if (has(TAG)) Tag::writeJSON(ixWdbeVLocale, me);
  };
  
  void PnlWdbeUsgHeadbar::DpchEngData::writeXML(
  			const uint ixWdbeVLocale
  			, xmlTextWriter* wr
  		) {
  	xmlTextWriterStartElement(wr, BAD_CAST "DpchEngWdbeUsgHeadbarData");
  	xmlTextWriterWriteAttribute(wr, BAD_CAST "xmlns", BAD_CAST "http://www.mpsitech.com/wdbe");
  		if (has(JREF)) writeString(wr, "scrJref", Scr::scramble(jref));
  		if (has(STGINF)) StgInf::writeXML(ixWdbeVLocale, wr);
  		if (has(TAG)) Tag::writeXML(ixWdbeVLocale, wr);
  	xmlTextWriterEndElement(wr);
  };
  